From c53aa5058ad5ca8876a47d6639ad4d4f2c5ed584 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 16 Nov 2012 08:08:23 +0000 Subject: [PATCH] net: use right lock in __dev_remove_offload offload_base is protected by offload_lock, not ptype_lock Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Acked-by: Vlad Yasevich Signed-off-by: David S. Miller --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index cf105e886cca..2705a2ab89af 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -513,7 +513,7 @@ void __dev_remove_offload(struct packet_offload *po) struct list_head *head = &offload_base; struct packet_offload *po1; - spin_lock(&ptype_lock); + spin_lock(&offload_lock); list_for_each_entry(po1, head, list) { if (po == po1) { @@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po) pr_warn("dev_remove_offload: %p not found\n", po); out: - spin_unlock(&ptype_lock); + spin_unlock(&offload_lock); } EXPORT_SYMBOL(__dev_remove_offload); -- GitLab