From bcd7beec98f6dfbae4e97fa1d55e836066370020 Mon Sep 17 00:00:00 2001 From: yamt Date: Sun, 23 Feb 2003 08:50:58 +0000 Subject: initialize b_interlock properly. (for ioctl) --- sys/dev/ata/wd.c | 5 +++-- sys/dev/scsipi/scsipi_ioctl.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 61f1c2487a9..194ef3327f2 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.237 2003/01/27 18:21:29 thorpej Exp $ */ +/* $NetBSD: wd.c,v 1.238 2003/02/23 08:50:58 yamt Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.237 2003/01/27 18:21:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.238 2003/02/23 08:50:58 yamt Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -1454,6 +1454,7 @@ wi_get() int s; wi = malloc(sizeof(struct wd_ioctl), M_TEMP, M_WAITOK|M_ZERO); + simple_lock_init(&wi->wi_bp.b_interlock); s = splbio(); LIST_INSERT_HEAD(&wi_head, wi, wi_list); splx(s); diff --git a/sys/dev/scsipi/scsipi_ioctl.c b/sys/dev/scsipi/scsipi_ioctl.c index 81dc53b311b..2485ce0f72f 100644 --- a/sys/dev/scsipi/scsipi_ioctl.c +++ b/sys/dev/scsipi/scsipi_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_ioctl.c,v 1.43 2002/01/12 16:37:55 tsutsui Exp $ */ +/* $NetBSD: scsipi_ioctl.c,v 1.44 2003/02/23 08:50:59 yamt Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.43 2002/01/12 16:37:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.44 2003/02/23 08:50:59 yamt Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -90,6 +90,7 @@ si_get() int s; si = malloc(sizeof(struct scsi_ioctl), M_TEMP, M_WAITOK|M_ZERO); + simple_lock_init(&si->si_bp.b_interlock); s = splbio(); LIST_INSERT_HEAD(&si_head, si, si_list); splx(s); -- cgit