net: use right lock in __dev_remove_offload
authorEric Dumazet <edumazet@google.com>
Fri, 16 Nov 2012 08:08:23 +0000 (08:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Nov 2012 18:41:08 +0000 (13:41 -0500)
offload_base is protected by offload_lock, not ptype_lock

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index cf105e886ccad8a78ab386f60b8ab1a94f934288..2705a2ab89af6a0b91e935dc3994b17f690ff34d 100644 (file)
@@ -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);