roy.qing.li@gmail.com
e049f28883
neigh: fix rcu splat in neigh_update()
when use dst_get_neighbour to get neighbour, we need
rcu_read_lock to protect, since dst_get_neighbour uses
rcu_dereference.
The bug was reported by Ari Savolainen <ari.m.savolainen@gmail.com>
[ 105.612095]
[ 105.612096] ===================================================
[ 105.612100] [ INFO: suspicious rcu_dereference_check() usage. ]
[ 105.612101] ---------------------------------------------------
[ 105.612103] include/net/dst.h:91 invoked rcu_dereference_check()
without protection!
[ 105.612105]
[ 105.612106] other info that might help us debug this:
[ 105.612106]
[ 105.612108]
[ 105.612108] rcu_scheduler_active = 1, debug_locks = 0
[ 105.612110] 1 lock held by dnsmasq/2618:
[ 105.612111] #0: (rtnl_mutex){+.+.+.}, at: [<ffffffff815df8c7>]
rtnl_lock+0x17/0x20
[ 105.612120]
[ 105.612121] stack backtrace:
[ 105.612123] Pid: 2618, comm: dnsmasq Not tainted 3.1.0-rc1 #41
[ 105.612125] Call Trace:
[ 105.612129] [<ffffffff810ccdcb>] lockdep_rcu_dereference+0xbb/0xc0
[ 105.612132] [<ffffffff815dc5a9>] neigh_update+0x4f9/0x5f0
[ 105.612135] [<ffffffff815da001>] ? neigh_lookup+0xe1/0x220
[ 105.612139] [<ffffffff81639298>] arp_req_set+0xb8/0x230
[ 105.612142] [<ffffffff8163a59f>] arp_ioctl+0x1bf/0x310
[ 105.612146] [<ffffffff810baa40>] ? lock_hrtimer_base.isra.26+0x30/0x60
[ 105.612150] [<ffffffff8163fb75>] inet_ioctl+0x85/0x90
[ 105.612154] [<ffffffff815b5520>] sock_do_ioctl+0x30/0x70
[ 105.612157] [<ffffffff815b55d3>] sock_ioctl+0x73/0x280
[ 105.612162] [<ffffffff811b7698>] do_vfs_ioctl+0x98/0x570
[ 105.612165] [<ffffffff811a5c40>] ? fget_light+0x340/0x3a0
[ 105.612168] [<ffffffff811b7bbf>] sys_ioctl+0x4f/0x80
[ 105.612172] [<ffffffff816fdcab>] system_call_fastpath+0x16/0x1b
Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Signed-off-by: RongQing <roy.qing.li@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19 19:38:51 -04:00
..
2011-09-06 08:17:15 -05:00
2011-08-02 04:29:23 -07:00
2011-09-15 17:32:26 -04:00
2011-10-19 03:10:46 -04:00
2011-09-22 03:23:13 -04:00
2011-04-17 00:48:31 -07:00
2011-10-07 13:38:43 -04:00
2011-10-11 15:35:42 -04:00
2011-10-07 13:38:43 -04:00
2011-10-03 13:45:49 -04:00
2011-10-17 19:22:46 -04:00
2011-09-29 19:58:58 -07:00
2011-10-19 19:38:51 -04:00
2011-10-06 15:49:51 -04:00
2011-08-07 23:20:26 -07:00
2011-08-02 04:29:23 -07:00
2011-03-17 11:59:32 +11:00
2011-08-17 20:22:03 -07:00
2011-07-03 20:05:16 -07:00
2011-09-15 14:49:44 -04:00
2011-09-15 15:36:35 -04:00
2011-10-19 19:24:39 -04:00
2011-10-19 19:26:16 -04:00
2011-03-21 18:16:39 -07:00
2011-09-22 03:23:13 -04:00
2011-10-13 16:05:07 -04:00
2011-06-16 23:19:27 -04:00
2011-10-18 23:33:44 -04:00
2011-09-16 19:20:20 -04:00
2011-04-11 18:59:05 -07:00
2011-10-17 15:05:26 -04:00
2011-10-07 13:38:43 -04:00
2011-08-20 10:39:12 -07:00
2011-09-28 13:29:50 -04:00
2011-07-01 16:11:16 -07:00
2011-09-27 14:34:10 -04:00
2011-10-18 23:22:07 -04:00
2011-08-02 04:29:23 -07:00
2011-10-07 13:38:43 -04:00
2011-10-03 15:19:19 -04:00
2011-07-07 02:41:59 -07:00
2011-05-19 18:51:50 -04:00
2011-09-22 03:23:13 -04:00
2011-10-13 16:05:07 -04:00
2011-08-02 04:29:23 -07:00
2011-09-17 22:55:15 -04:00
2011-09-28 13:29:50 -04:00
2011-03-31 11:26:23 -03:00
2011-10-14 14:48:23 -04:00
2011-07-01 16:11:16 -07:00
2011-10-19 03:10:46 -04:00
2011-05-05 11:10:14 -07:00
2011-07-05 15:26:57 -04:00
2011-07-05 15:26:57 -04:00
2010-10-15 15:53:27 +02:00
2011-09-22 03:23:13 -04:00