Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108388301
D42368.id129478.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42368.id129478.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);
}
}
@@ -1694,7 +1699,6 @@
fs_get_parent(fte, dst);
fs_get_parent(fg, fte);
- mutex_lock(&fg->base.lock);
memcpy(match_value, fte->val, sizeof(fte->val));
/* ft can't be changed as fg is locked */
fs_get_parent(ft, fg);
@@ -1714,7 +1718,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
Sat, Jan 25, 9:32 AM (11 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16135728
Default Alt Text
D42368.id129478.diff (1 KB)
Attached To
Mode
D42368: mlx5: fix deadlock in mlx5_fs_tree.c
Attached
Detach File
Event Timeline
Log In to Comment