Thread (17 messages) 17 messages, 4 authors, 2008-06-27
STALE6557d

[PATCH 3/4] sky2: Hold RTNL while calling dev_close()

From: Ben Hutchings <hidden>
Date: 2008-05-06 18:41:43
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <redacted>
---
 drivers/net/sky2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index f226bca..9b046dd 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2952,7 +2952,9 @@ static void sky2_restart(struct work_struct *work)
 			if (err) {
 				printk(KERN_INFO PFX "%s: could not restart %d\n",
 				       dev->name, err);
+				rtnl_lock();
 				dev_close(dev);
+				rtnl_unlock();
 			}
 		}
 	}
-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help