initialize b_interlock properly.

(for ioctl)
This commit is contained in:
yamt 2003-02-23 08:50:58 +00:00
parent 49230d68b3
commit bcd7beec98
2 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -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);