diff options
author | Eric Dumazet <edumazet@google.com> | 2012-11-16 03:08:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-16 13:41:08 -0500 |
commit | c53aa5058ad5ca8876a47d6639ad4d4f2c5ed584 (patch) | |
tree | cff2b24d78e6fcbfa37e168c67703a8800885966 | |
parent | 545b29019c8959c805abfe8194d47e989f1a6e5f (diff) |
net: use right lock in __dev_remove_offload
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>
-rw-r--r-- | net/core/dev.c | 4 |
1 files 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) | |||
513 | struct list_head *head = &offload_base; | 513 | struct list_head *head = &offload_base; |
514 | struct packet_offload *po1; | 514 | struct packet_offload *po1; |
515 | 515 | ||
516 | spin_lock(&ptype_lock); | 516 | spin_lock(&offload_lock); |
517 | 517 | ||
518 | list_for_each_entry(po1, head, list) { | 518 | list_for_each_entry(po1, head, list) { |
519 | if (po == po1) { | 519 | if (po == po1) { |
@@ -524,7 +524,7 @@ void __dev_remove_offload(struct packet_offload *po) | |||
524 | 524 | ||
525 | pr_warn("dev_remove_offload: %p not found\n", po); | 525 | pr_warn("dev_remove_offload: %p not found\n", po); |
526 | out: | 526 | out: |
527 | spin_unlock(&ptype_lock); | 527 | spin_unlock(&offload_lock); |
528 | } | 528 | } |
529 | EXPORT_SYMBOL(__dev_remove_offload); | 529 | EXPORT_SYMBOL(__dev_remove_offload); |
530 | 530 | ||