Message ID | 1314077562.4791.21.camel@edumazet-laptop |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Tue, 23 Aug 2011 07:32:42 +0200 > [PATCH] arp: fix rcu lockdep splat in arp_process() > > Dave Jones reported a lockdep splat triggered by an arp_process() call > from parp_redo(). > > Commit faa9dcf793be (arp: RCU changes) is the origin of the bug, since > it assumed arp_process() was called under rcu_read_lock(), which is not > true in this particular path. > > Instead of adding rcu_read_lock() in parp_redo(), I chose to add it in > neigh_proxy_process() to take care of IPv6 side too. ... > Reported-by: Dave Jones <davej@redhat.com> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Applied and queued up for -stable, thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 8fab9b0..1334d7e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1319,11 +1319,15 @@ static void neigh_proxy_process(unsigned long arg) if (tdif <= 0) { struct net_device *dev = skb->dev; + __skb_unlink(skb, &tbl->proxy_queue); - if (tbl->proxy_redo && netif_running(dev)) + if (tbl->proxy_redo && netif_running(dev)) { + rcu_read_lock(); tbl->proxy_redo(skb); - else + rcu_read_unlock(); + } else { kfree_skb(skb); + } dev_put(dev); } else if (!sched_next || tdif < sched_next)