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
--jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D=3D=3D=3D //depot/user/brooks/xname/sys/dev/em/if_em.c#7 - /home/brooks/= working/freebsd/p4/xname/sys/dev/em/if_em.c =3D=3D=3D=3D @@ -767,8 +767,10 @@ =20 ifp->if_flags &=3D ~IFF_RUNNING; =20 + EM_LOCK(adapter); em_stop(adapter); - em_init(adapter); + em_init_locked(adapter); + EM_UNLOCK(adapter); =20 ifp->if_oerrors++; return; --=20 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 --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/sVy7XY6L6fI4GtQRAuGqAJ44TFl6x8nq7mmstkCLVxYE45clUQCfYWFL Gde54tVdupt3jzoFkio3qA8= =iXJf -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111220351.GA14761>