summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoryamt <yamt@NetBSD.org>2003-02-23 08:50:58 +0000
committeryamt <yamt@NetBSD.org>2003-02-23 08:50:58 +0000
commitbcd7beec98f6dfbae4e97fa1d55e836066370020 (patch)
tree57ff41903ce7a29bf5a784918b179a4bdfe31ea0 /sys/dev
parent49230d68b3b9a9bc125acaa1441c63c609741e1f (diff)
initialize b_interlock properly.
(for ioctl)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/wd.c5
-rw-r--r--sys/dev/scsipi/scsipi_ioctl.c5
2 files changed, 6 insertions, 4 deletions
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 <sys/cdefs.h>
-__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 <sys/cdefs.h>
-__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);