Message ID | 1431672946-300-4-git-send-email-ying.xue@windriver.com |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5595db3..433b617 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -689,8 +689,10 @@ void neigh_destroy(struct neighbour *neigh) return; } - if (neigh_del_timer(neigh)) - pr_warn("Impossible event\n"); + if (timer_pending(&neigh->timer)) { + pr_warn("Timer is pending, impossible event %p\n", neigh); + dump_stack(); + } write_lock_bh(&neigh->lock); __skb_queue_purge(&neigh->arp_queue);
The timer of neighbour should be stopped before neigh_destroy(), otherwise, this is definitely a bug. Even if we do the deletion of the timer in neigh_destroy(), it's meaningless as its neighbour would be freed shortly. So it's better to add a warning message when detectting timer is pending in neigh_destroy(). Signed-off-by: Ying Xue <ying.xue@windriver.com> --- net/core/neighbour.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)