Subject: Re: preempting while holding rtnl_lock

From: Ben Hutchings <[email-masked]>
Date: Fri, 15 Jul 2011 00:06:31 +0100

On Thu, 2011-07-14 at 18:15 -0300, Flavio Leitner wrote:
> Hi,
> 
> I was reviewing driver sources and found that
> ethtool ops holds rtnl_lock() and there are few
> drivers (for example: tg3, bnx2) that use napi_disable()
> in this context.
[...]
> The msleep() above will preempt.  I believe this is wrong.
[...]
> What am I missing?

The RTNL lock is a mutex so it's OK to sleep (but preferably not very
long) while holding it.

Ben.

-- 
Ben Hutchings, Senior Software 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.