Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Allocate the variable `inqbuf' in scsi_probed...



details:   https://anonhg.NetBSD.org/src/rev/c49a3fc3d29b
branches:  trunk
changeset: 485101:c49a3fc3d29b
user:      enami <enami%NetBSD.org@localhost>
date:      Wed Apr 19 04:49:50 2000 +0000

description:
Allocate the variable `inqbuf' in scsi_probedev on stack rather than
statically.  Since this function may called for another luns immediately,
allocating it statically doesn't make sense and may cause race condition
as pointed out by PR#9749.

diffstat:

 sys/dev/scsipi/scsiconf.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 79ddf1444c3c -r c49a3fc3d29b sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Wed Apr 19 04:46:23 2000 +0000
+++ b/sys/dev/scsipi/scsiconf.c Wed Apr 19 04:49:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.139 2000/04/02 17:25:52 augustss Exp $  */
+/*     $NetBSD: scsiconf.c,v 1.140 2000/04/19 04:49:50 enami Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -668,7 +668,7 @@
        int target, lun;
 {
        struct scsipi_link *sc_link;
-       static struct scsipi_inquiry_data inqbuf;
+       struct scsipi_inquiry_data inqbuf;
        struct scsi_quirk_inquiry_pattern *finger;
        int checkdtype, priority, docontinue;
        struct scsipibus_attach_args sa;



Home | Main Index | Thread Index | Old Index