[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130211.191945.29632365432532819.davem@davemloft.net>
Date: Mon, 11 Feb 2013 19:19:45 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: nhorman@...driver.com
Cc: netdev@...r.kernel.org, amwang@...hat.com, eric.dumazet@...il.com
Subject: Re: [PATCH v2 1/2] netpoll: Fix __netpoll_rcu_free so that it can
hold the rtnl lock
From: Neil Horman <nhorman@...driver.com>
Date: Mon, 11 Feb 2013 15:25:30 -0500
> __netpoll_rcu_free is used to free netpoll structures when the rtnl_lock is
> already held. The mechanism is used to asynchronously call __netpoll_cleanup
> outside of the holding of the rtnl_lock, so as to avoid deadlock.
> Unfortunately, __netpoll_cleanup modifies pointers (dev->np), which means the
> rtnl_lock must be held while calling it. Further, it cannot be held, because
> rcu callbacks may be issued in softirq contexts, which cannot sleep.
>
> Fix this by converting the rcu callback to a work queue that is guaranteed to
> get scheduled in process context, so that we can hold the rtnl properly while
> calling __netpoll_cleanup
>
> Tested successfully by myself.
>
> Signed-off-by: Neil Horman <nhorman@...driver.com>
Applied.
--
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