https://github.com/torvalds/linux
Revision 58ec3b4db9eb5a28e3aec5f407a54e28f7039c19 authored by Herbert Xu on 07 October 2008, 22:50:03 UTC, committed by David S. Miller on 07 October 2008, 22:50:03 UTC
Benjamin Thery tracked down a bug that explains many instances of the error unregister_netdevice: waiting for %s to become free. Usage count = %d It turns out that netdev_run_todo can dead-lock with itself if a second instance of it is run in a thread that will then free a reference to the device waited on by the first instance. The problem is really quite silly. We were trying to create parallelism where none was required. As netdev_run_todo always follows a RTNL section, and that todo tasks can only be added with the RTNL held, by definition you should only need to wait for the very ones that you've added and be done with it. There is no need for a second mutex or spinlock. This is exactly what the following patch does. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 742201e
Tip revision: 58ec3b4db9eb5a28e3aec5f407a54e28f7039c19 authored by Herbert Xu on 07 October 2008, 22:50:03 UTC
net: Fix netdev_run_todo dead-lock
net: Fix netdev_run_todo dead-lock
Tip revision: 58ec3b4
File | Mode | Size |
---|---|---|
async_tx | ||
Kconfig | -rw-r--r-- | 19.3 KB |
Makefile | -rw-r--r-- | 2.6 KB |
ablkcipher.c | -rw-r--r-- | 8.8 KB |
aead.c | -rw-r--r-- | 12.2 KB |
aes_generic.c | -rw-r--r-- | 13.5 KB |
ahash.c | -rw-r--r-- | 4.7 KB |
algapi.c | -rw-r--r-- | 14.1 KB |
anubis.c | -rw-r--r-- | 27.8 KB |
api.c | -rw-r--r-- | 9.8 KB |
arc4.c | -rw-r--r-- | 2.0 KB |
authenc.c | -rw-r--r-- | 13.0 KB |
blkcipher.c | -rw-r--r-- | 19.0 KB |
blowfish.c | -rw-r--r-- | 17.5 KB |
camellia.c | -rw-r--r-- | 35.2 KB |
cast5.c | -rw-r--r-- | 34.1 KB |
cast6.c | -rw-r--r-- | 21.5 KB |
cbc.c | -rw-r--r-- | 7.4 KB |
ccm.c | -rw-r--r-- | 21.5 KB |
chainiv.c | -rw-r--r-- | 8.0 KB |
cipher.c | -rw-r--r-- | 3.3 KB |
compress.c | -rw-r--r-- | 1.3 KB |
crc32c.c | -rw-r--r-- | 5.1 KB |
cryptd.c | -rw-r--r-- | 15.3 KB |
crypto_null.c | -rw-r--r-- | 4.7 KB |
cryptomgr.c | -rw-r--r-- | 4.4 KB |
ctr.c | -rw-r--r-- | 10.8 KB |
cts.c | -rw-r--r-- | 9.8 KB |
deflate.c | -rw-r--r-- | 5.5 KB |
des_generic.c | -rw-r--r-- | 35.3 KB |
digest.c | -rw-r--r-- | 5.7 KB |
ecb.c | -rw-r--r-- | 4.9 KB |
eseqiv.c | -rw-r--r-- | 6.2 KB |
fcrypt.c | -rw-r--r-- | 18.0 KB |
gcm.c | -rw-r--r-- | 19.8 KB |
gf128mul.c | -rw-r--r-- | 13.2 KB |
hash.c | -rw-r--r-- | 4.8 KB |
hmac.c | -rw-r--r-- | 7.2 KB |
internal.h | -rw-r--r-- | 3.9 KB |
khazad.c | -rw-r--r-- | 51.8 KB |
lrw.c | -rw-r--r-- | 7.5 KB |
lzo.c | -rw-r--r-- | 2.5 KB |
md4.c | -rw-r--r-- | 6.2 KB |
md5.c | -rw-r--r-- | 7.3 KB |
michael_mic.c | -rw-r--r-- | 3.5 KB |
pcbc.c | -rw-r--r-- | 7.7 KB |
proc.c | -rw-r--r-- | 2.8 KB |
ripemd.h | -rw-r--r-- | 974 bytes |
rmd128.c | -rw-r--r-- | 10.2 KB |
rmd160.c | -rw-r--r-- | 12.7 KB |
rmd256.c | -rw-r--r-- | 10.6 KB |
rmd320.c | -rw-r--r-- | 13.1 KB |
salsa20_generic.c | -rw-r--r-- | 7.3 KB |
scatterwalk.c | -rw-r--r-- | 2.9 KB |
seed.c | -rw-r--r-- | 17.4 KB |
seqiv.c | -rw-r--r-- | 8.2 KB |
serpent.c | -rw-r--r-- | 19.8 KB |
sha1_generic.c | -rw-r--r-- | 3.1 KB |
sha256_generic.c | -rw-r--r-- | 12.2 KB |
sha512_generic.c | -rw-r--r-- | 9.6 KB |
tcrypt.c | -rw-r--r-- | 48.6 KB |
tcrypt.h | -rw-r--r-- | 285.8 KB |
tea.c | -rw-r--r-- | 7.1 KB |
tgr192.c | -rw-r--r-- | 31.1 KB |
twofish.c | -rw-r--r-- | 6.3 KB |
twofish_common.c | -rw-r--r-- | 37.7 KB |
wp512.c | -rw-r--r-- | 60.3 KB |
xcbc.c | -rw-r--r-- | 9.0 KB |
xor.c | -rw-r--r-- | 3.6 KB |
xts.c | -rw-r--r-- | 7.1 KB |
Computing file changes ...