From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net] ipv6: addrconf: Avoid calling netdevice notifiers with RCU read-side lock Date: Wed, 15 Aug 2012 11:10:23 +0800 Message-ID: <1345000223.29572.2.camel@cr0> References: <1344940096-5548-1-git-send-email-amwang@redhat.com> <1344970491.2690.8.camel@bwh-desktop.uk.solarflarecom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: David Miller , netdev@vger.kernel.org, John Fastabend , Greg Rose , Thomas Graf , Eric Dumazet To: Ben Hutchings Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10216 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467Ab2HODKj (ORCPT ); Tue, 14 Aug 2012 23:10:39 -0400 In-Reply-To: <1344970491.2690.8.camel@bwh-desktop.uk.solarflarecom.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2012-08-14 at 19:54 +0100, Ben Hutchings wrote: > Cong Wang reports that lockdep detected suspicious RCU usage while > enabling IPV6 forwarding: > > [ 1123.310275] =============================== > [ 1123.442202] [ INFO: suspicious RCU usage. ] > [ 1123.558207] 3.6.0-rc1+ #109 Not tainted > [ 1123.665204] ------------------------------- > [ 1123.768254] include/linux/rcupdate.h:430 Illegal context switch in RCU read-side critical section! > [ 1123.992320] > [ 1123.992320] other info that might help us debug this: > [ 1123.992320] > [ 1124.307382] > [ 1124.307382] rcu_scheduler_active = 1, debug_locks = 0 > [ 1124.522220] 2 locks held by sysctl/5710: > [ 1124.648364] #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_trylock+0x15/0x17 > [ 1124.882211] #1: (rcu_read_lock){.+.+.+}, at: [] rcu_lock_acquire+0x0/0x29 > [ 1125.085209] > [ 1125.085209] stack backtrace: > [ 1125.332213] Pid: 5710, comm: sysctl Not tainted 3.6.0-rc1+ #109 > [ 1125.441291] Call Trace: > [ 1125.545281] [] lockdep_rcu_suspicious+0x109/0x112 > [ 1125.667212] [] rcu_preempt_sleep_check+0x45/0x47 > [ 1125.781838] [] __might_sleep+0x1e/0x19b > [...] > [ 1127.445223] [] call_netdevice_notifiers+0x4a/0x4f > [...] > [ 1127.772188] [] dev_disable_lro+0x32/0x6b > [ 1127.885174] [] dev_forward_change+0x30/0xcb > [ 1128.013214] [] addrconf_forward_change+0x85/0xc5 > [...] > > addrconf_forward_change() uses RCU iteration over the netdev list, > which is unnecessary since it already holds the RTNL lock. We also > cannot reasonably require netdevice notifier functions not to sleep. > > Reported-by: Cong Wang > Signed-off-by: Ben Hutchings Thanks for your patch, Ben!