Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/2] DM9000B: Fix reg_save after spin_lock in dm9000_timeout
@ 2011-02-20 21:44 Henry Nestler
  0 siblings, 0 replies; only message in thread
From: Henry Nestler @ 2011-02-20 21:44 UTC (permalink / raw)
  To: netdev; +Cc: trivial, akpm, tori

The spin_lock should hold before reading register.
---
Kernel version 2.6.38-rc5

 drivers/net/dm9000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 2d4c4fc..2bbd496 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -852,8 +852,8 @@ static void dm9000_timeout(struct net_device *dev)
 	unsigned long flags;
 
 	/* Save previous register address */
-	reg_save = readb(db->io_addr);
 	spin_lock_irqsave(&db->lock, flags);
+	reg_save = readb(db->io_addr);
 
 	netif_stop_queue(dev);
 	dm9000_reset(db);


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-20 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-20 21:44 [PATCH 1/2] DM9000B: Fix reg_save after spin_lock in dm9000_timeout Henry Nestler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox