Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci fix: rxq->rxq_lock is uninitialized if NET_MPSAF...
details: https://anonhg.NetBSD.org/src/rev/bc1c4b111099
branches: trunk
changeset: 816040:bc1c4b111099
user: knakahara <knakahara%NetBSD.org@localhost>
date: Tue Jun 14 17:09:20 2016 +0000
description:
fix: rxq->rxq_lock is uninitialized if NET_MPSAFE is not defined.
diffstat:
sys/dev/pci/if_wm.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r 671fdb6ecb75 -r bc1c4b111099 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Tue Jun 14 13:26:45 2016 +0000
+++ b/sys/dev/pci/if_wm.c Tue Jun 14 17:09:20 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.413 2016/06/14 09:07:22 skrll Exp $ */
+/* $NetBSD: if_wm.c,v 1.414 2016/06/14 17:09:20 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -85,7 +85,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.413 2016/06/14 09:07:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.414 2016/06/14 17:09:20 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -5562,11 +5562,8 @@
for (i = 0; i < sc->sc_nqueues; i++) {
struct wm_rxqueue *rxq = &sc->sc_queue[i].wmq_rxq;
rxq->rxq_sc = sc;
-#ifdef WM_MPSAFE
rxq->rxq_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
-#else
- rxq->rxq_lock = NULL;
-#endif
+
error = wm_alloc_rx_descs(sc, rxq);
if (error)
break;
Home |
Main Index |
Thread Index |
Old Index