Module Name: src Committed By: bouyer Date: Tue Mar 6 18:29:24 UTC 2012
Modified Files: src/sys/dev/pci: if_bnx.c Log Message: bnx_start() is not MP-safe, so do not create the bnx_alloc_pkts()'s workqueue MPSAFE. This could lead to bnx_start() being running at the same time on 2 CPUs, with packets being sent twice. Problem found and reported by Beverly Schwartz and Greg Troxel. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_bnx.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/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.45 src/sys/dev/pci/if_bnx.c:1.46 --- src/sys/dev/pci/if_bnx.c:1.45 Thu Sep 22 08:42:53 2011 +++ src/sys/dev/pci/if_bnx.c Tue Mar 6 18:29:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.45 2011/09/22 08:42:53 jym Exp $ */ +/* $NetBSD: if_bnx.c,v 1.46 2012/03/06 18:29:23 bouyer Exp $ */ /* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.45 2011/09/22 08:42:53 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.46 2012/03/06 18:29:23 bouyer Exp $"); /* * The following controllers are supported by this driver: @@ -707,7 +707,7 @@ bnx_attach(device_t parent, device_t sel /* create workqueue to handle packet allocations */ if (workqueue_create(&sc->bnx_wq, device_xname(self), - bnx_alloc_pkts, sc, PRI_NONE, IPL_NET, WQ_MPSAFE) != 0) { + bnx_alloc_pkts, sc, PRI_NONE, IPL_NET, 0) != 0) { aprint_error_dev(self, "failed to create workqueue\n"); goto bnx_attach_fail; }