locking issues in em_watchdog
Brooks Davis
brooks at one-eyed-alien.net
Tue Nov 11 14:03:56 PST 2003
em_watchdog() currently does not lock around the call to em_stop which
means that if the lock is not held, it panics. I recently ran into this
problem when the ACPI/SMP commits broke one of my machines. The
following patch keeps the watchdog timer from being an instant panic on
this system. It doesn't make the driver work, but I don't think that's
actually a driver issue.
-- Brooks
==== //depot/user/brooks/xname/sys/dev/em/if_em.c#7 - /home/brooks/working/freebsd/p4/xname/sys/dev/em/if_em.c ====
@@ -767,8 +767,10 @@
ifp->if_flags &= ~IFF_RUNNING;
+ EM_LOCK(adapter);
em_stop(adapter);
- em_init(adapter);
+ em_init_locked(adapter);
+ EM_UNLOCK(adapter);
ifp->if_oerrors++;
return;
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20031111/e61d08b4/attachment.bin
More information about the freebsd-net
mailing list