Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144622938
D42368.1775841074.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42368.1775841074.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 5:11 PM (12 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28317812
Default Alt Text
D42368.1775841074.diff (1 KB)
Attached To
Mode
D42368: mlx5: fix deadlock in mlx5_fs_tree.c
Attached
Detach File
Event Timeline
Log In to Comment