Date: Tue, 11 Nov 2003 14:03:51 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: pdeuskar@freebsd.org Cc: net@freebsd.org Subject: locking issues in em_watchdog Message-ID: <20031111220351.GA14761@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/sVy7XY6L6fI4GtQRAuGqAJ44TFl6x8nq7mmstkCLVxYE45clUQCfYWFL Gde54tVdupt3jzoFkio3qA8= =iXJf -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111220351.GA14761>
