Module Name: src Committed By: sborrill Date: Wed Jan 27 21:43:49 UTC 2010
Modified Files: src/sys/dev/ic [netbsd-5-0]: mfi.c Log Message: Pull up the following revisions(s) (requested by bouyer in ticket #1257): sys/dev/ic/mfi.c: revision 1.31 bio(4) is MP-safe but mfi(4) is not. So get the kernel_lock at mfi_ioctl() entry and release it on exit. To generate a diff of this commit: cvs rdiff -u -r1.19.8.1 -r1.19.8.2 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.19.8.1 src/sys/dev/ic/mfi.c:1.19.8.2 --- src/sys/dev/ic/mfi.c:1.19.8.1 Thu Sep 10 07:09:43 2009 +++ src/sys/dev/ic/mfi.c Wed Jan 27 21:43:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.19.8.1 2009/09/10 07:09:43 snj Exp $ */ +/* $NetBSD: mfi.c,v 1.19.8.2 2010/01/27 21:43:48 sborrill Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <ma...@peereboom.us> @@ -17,7 +17,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.19.8.1 2009/09/10 07:09:43 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.19.8.2 2010/01/27 21:43:48 sborrill Exp $"); #include "bio.h" @@ -1321,7 +1321,10 @@ { struct mfi_softc *sc = (struct mfi_softc *)dev; int error = 0; - int s = splbio(); + int s; + + KERNEL_LOCK(1, curlwp); + s = splbio(); DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl ", DEVNAME(sc)); @@ -1361,6 +1364,7 @@ error = EINVAL; } splx(s); + KERNEL_UNLOCK_ONE(curlwp); DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl return %x\n", DEVNAME(sc), error); return error;