[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1344969651.2690.6.camel@bwh-desktop.uk.solarflarecom.com>
Date: Tue, 14 Aug 2012 19:40:51 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Cong Wang <amwang@...hat.com>
CC: <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
John Fastabend <john.r.fastabend@...el.com>,
Greg Rose <gregory.v.rose@...el.com>,
Thomas Graf <tgraf@...g.ch>, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [Patch] net: allow calling rtmsg_ifinfo() in atomic
On Tue, 2012-08-14 at 18:28 +0800, Cong Wang wrote:
> (Against net tree.)
>
> When running 'systemctl restart network.service', I got the following
> warning:
>
> [ 1123.199677]
> [ 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: [<ffffffff81768498>] rtnl_trylock+0x15/0x17
> [ 1124.882211] #1: (rcu_read_lock){.+.+.+}, at: [<ffffffff81871df8>] rcu_lock_acquire+0x0/0x29
[...]
> This is due to that we call rtmsg_ifinfo() with RCU read lock held,
> and because rtmsg_ifinfo() may block, this is invalid.
>
> This patch fixes it by allowing callees to specify GFP when
> calling it. In this case, netdev_features_change() calls it
> with GFP_ATOMIC.
[...]
This is not the right fix; netdev notifiers *should* be able to assume
they are called with only the RTNL lock held. Anyway,
addrconf_forward_change() is called with the RTNL lock held so there is
no need for it to use RCU-protected iteration.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists