Page MenuHomeFreeBSD

D42368.id130201.diff
No OneTemporary

D42368.id130201.diff

diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
--- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
@@ -229,14 +229,19 @@
{
struct fs_base *node = container_of(kref, struct fs_base, refcount);
- if (node->parent)
+ if (node->parent) {
+ if (node->type == FS_TYPE_FLOW_DEST)
+ mutex_lock(&node->parent->parent->lock);
mutex_lock(&node->parent->lock);
+ }
mutex_lock(&node->lock);
cmd_remove_node(node);
mutex_unlock(&node->lock);
complete(&node->complete);
if (node->parent) {
mutex_unlock(&node->parent->lock);
+ if (node->type == FS_TYPE_FLOW_DEST)
+ mutex_unlock(&node->parent->parent->lock);
_fs_put(node->parent, _fs_remove_node, false);
}
}
@@ -1719,7 +1724,7 @@
fs_get_parent(fte, dst);
fs_get_parent(fg, fte);
- mutex_lock(&fg->base.lock);
+ sx_assert(&fg->base.lock.sx, SX_XLOCKED);
memcpy(match_value, fte->val, sizeof(fte->val));
/* ft can't be changed as fg is locked */
fs_get_parent(ft, fg);
@@ -1739,7 +1744,6 @@
}
call_to_del_rule_notifiers(dst, fte);
err:
- mutex_unlock(&fg->base.lock);
kvfree(match_value);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 25, 9:46 AM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16136172
Default Alt Text
D42368.id130201.diff (1 KB)

Event Timeline