use rtnl_lock_interruptible in 8139 to avoid shutdown hang
Subsystems (2)
PATCH 2/2 use rtnl_lock_interruptible in 8139 to avoid shutdown hang
The 8139too thread needs to use rtnl_lock_interruptible so it can avoid doing the actual work once it's been kill_proc()ed on module removal time.
Based on debugging and an earlier patch that adds a driver-private semaphore from Herbert Xu.
drivers/net/8139too.c +2 -1
@@ -1636,7 +1636,8 @@if (tp->time_to_die)break ; -rtnl_lock (); +if (rtnl_lock_interruptible ()) +break ;rtl8139_thread_iter (dev, tp, tp->mmio_addr);rtnl_unlock (); }
David S. Miller
maintainerQuoted 6 lines · On Sun, 9 Jan 2005 13:16:30 +0100 Christoph Hellwig <[email protected]> wrote:
The 8139too thread needs to use
rtnl_lock_interruptibleso it can avoid doing the actual work once it's been kill_proc()ed on module removal time.Based on debugging and an earlier patch that adds a driver-private semaphore from Herbert Xu.
I've applied these two patches, they look perfectly fine. Thanks Christoph.
Quoted 7 lines · David S. Miller
Quoted 4 lines · On Sun, 9 Jan 2005 13:16:30 +0100 Christoph Hellwig <[email protected]> wrote:
The 8139too thread needs to use
rtnl_lock_interruptibleso it can avoid doing the actual work once it's been kill_proc()ed on module removal time.
Quoted 5 lines
Quoted 2 lines
Based on debugging and an earlier patch that adds a driver-private semaphore from Herbert Xu.
I've applied these two patches, they look perfectly fine. Thanks Christoph.
Btw, there's some confusing between rtnl_lock and rtnl_shlock (similar for the other variants). Is there an agenda behind this versions or would you take a patch that unifies the lock assecors?
David S. Miller
maintainerQuoted 3 lines · On Mon, 10 Jan 2005 22:45:22 +0100 Christoph Hellwig <[email protected]> wrote:
Btw, there's some confusing between
rtnl_lockandrtnl_shlock(similar for the other variants). Is there an agenda behind this versions or would you take a patch that unifies the lock assecors?
What exactly do you plan to change?