Skip to content
Commit 93102782 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

net: rose: fix netdev reference changes



Bernard reported that trying to unload rose module would lead
to infamous messages:

unregistered_netdevice: waiting for rose0 to become free. Usage count = xx

This patch solves the issue, by making sure each socket referring to
a netdevice holds a reference count on it, and properly releases it
in rose_release().

rose_dev_first() is also fixed to take a device reference
before leaving the rcu_read_locked section.

Following patch will add ref_tracker annotations to ease
future bug hunting.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Reported-by: default avatarBernard Pidoux <f6bvp@free.fr>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Tested-by: default avatarBernard Pidoux <f6bvp@free.fr>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9936e07e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment