Skip to content

Commit

Permalink
net: use right lock in __dev_remove_offload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 16, 2012
1 parent 545b290 commit c53aa50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand Down

0 comments on commit c53aa50

Please sign in to comment.