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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 May 2008 17:51:53 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	fubar@...ibm.com
Cc:	netdev@...r.kernel.org, jgarzik@...ox.com, xemul@...nvz.org
Subject: Re: [PATCH 3/4] bonding: Deadlock between bonding_store_bonds and
 bond_destroy_sysfs.

From: Jay Vosburgh <fubar@...ibm.com>
Date: Fri,  2 May 2008 17:49:39 -0700

> From: Pavel Emelyanov <xemul@...nvz.org>
> 
> The sysfs layer has an internal protection, that ensures, that
> all the process sitting inside ->sore/->show callback exits
> before the appropriate entry is unregistered (the calltraces
> are rather big, but I can provide them if required).
> 
> On the other hand, bonding takes rtnl_lock in
> a) the bonding_store_bonds, i.e. in ->store callback,
> b) module exit before calling the sysfs unregister routines.
> 
> Thus, the classical AB-BA deadlock may occur. To reproduce run
> # while :; do modprobe bonding; rmmod bonding; done
> and
> # while :; do echo '+bond%d' > /sys/class/net/bonding_masters ; done
> in parallel.
> 
> The fix is to move the bond_destroy_sysfs out of the rtnl_lock,
> but _before_ bond_free_all to make sure no bonding devices exist
> after module unload.
> 
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
> Acked-by: Jay Vosburgh <fubar@...ibm.com>

Acked-by: David S. Miller <davem@...emloft.net>
--
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