浏览代码

[NEIGH] Print stack trace in neigh_add_timer

Stack traces are very helpful in determining the exact nature of a bug.
So let's print a stack trace when the timer is added twice.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert Xu 19 年之前
父节点
当前提交
203755029e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/core/neighbour.c

+ 1 - 0
net/core/neighbour.c

@@ -732,6 +732,7 @@ static inline void neigh_add_timer(struct neighbour *n, unsigned long when)
 	if (unlikely(mod_timer(&n->timer, when))) {
 	if (unlikely(mod_timer(&n->timer, when))) {
 		printk("NEIGH: BUG, double timer add, state is %x\n",
 		printk("NEIGH: BUG, double timer add, state is %x\n",
 		       n->nud_state);
 		       n->nud_state);
+		dump_stack();
 	}
 	}
 }
 }