提交 c53aa505 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: use right lock in __dev_remove_offload

offload_base is protected by offload_lock, not ptype_lock
Signed-off-by: NEric Dumazet <edumazet@google.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: NVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 545b2901
...@@ -513,7 +513,7 @@ void __dev_remove_offload(struct packet_offload *po) ...@@ -513,7 +513,7 @@ void __dev_remove_offload(struct packet_offload *po)
struct list_head *head = &offload_base; struct list_head *head = &offload_base;
struct packet_offload *po1; struct packet_offload *po1;
spin_lock(&ptype_lock); spin_lock(&offload_lock);
list_for_each_entry(po1, head, list) { list_for_each_entry(po1, head, list) {
if (po == po1) { if (po == po1) {
...@@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po) ...@@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po)
pr_warn("dev_remove_offload: %p not found\n", po); pr_warn("dev_remove_offload: %p not found\n", po);
out: out:
spin_unlock(&ptype_lock); spin_unlock(&offload_lock);
} }
EXPORT_SYMBOL(__dev_remove_offload); EXPORT_SYMBOL(__dev_remove_offload);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册