lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 12 Dec 2012 23:37:33 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Ben Greear <greearb@...delatech.com>
CC:	netdev <netdev@...r.kernel.org>
Subject: Re: Any good documentation on RTNL

On Wed, 2012-12-12 at 15:15 -0800, Ben Greear wrote:
> I'm wondering if anyone could point me to some documentation on
> the finer points of what the rtnl_lock() does?  I can't find anything
> overly useful in google or the kernel docs.
> 
> For instance, can the packet rx-logic run (on other threads?) while rtnl is held?
>
> How about tx-logic?

rtnl_lock() is just mutex_lock() on a particular global mutex.  Since
the RX and TX paths obviously don't take such a mutex, it has no effect
on them.

All rtnetlink operations and most net device ioctls are serialised by
this mutex (it's the BKL of networking!).

> In particular, I'm interested to know if it is valid to have
> this state:
> 
> thread 1 holds RTNL, and blocks on thread 2 due to trying to flush a work-queue.
> 
> thread 2 is processing an item on that work-queue, and the work item is sending packets
>    (and blocking for up to 200ms timeout trying to flush a wifi driver's queues).

So long as the workqueue is private (if you're flushing it, I suppose it
must be) then I don't see any problem with that.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ