diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-02-17 23:50:47 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-02-17 23:50:47 +0000 |
commit | 7add4f4e201756890daa7bf098245dc90a06ea0c (patch) | |
tree | 829d99a8de92f2b3258986d550250e5c39ce1f83 /sys/scsi | |
parent | aab3c6ba873eb650ad3e748e2fba250716eb85d8 (diff) |
bzero scsi_xfer's as they come out of the pool to ensure there is no
leakage from one use to the next. There is no such thing as too much
paranoia.
ok deraadt@.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 1c8ca024af1..aebee5125c1 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.51 2004/02/07 22:39:15 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.52 2004/02/17 23:50:46 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -119,6 +119,7 @@ scsi_get_xs(sc_link, flags) xs = pool_get(&scsi_xfer_pool, ((flags & SCSI_NOSLEEP) != 0 ? PR_NOWAIT : PR_WAITOK)); if (xs != NULL) { + bzero(xs, sizeof *xs); sc_link->openings--; xs->flags = flags; } else { @@ -197,7 +198,6 @@ scsi_make_xs(sc_link, scsi_cmd, cmdlen, data_addr, datalen, xs->retries = retries; xs->timeout = timeout; xs->bp = bp; - xs->req_sense_length = 0; /* XXX - not used by scsi internals */ /* * Set the LUN in the CDB. This may only be needed if we have an |