From 7add4f4e201756890daa7bf098245dc90a06ea0c Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 17 Feb 2004 23:50:47 +0000 Subject: 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@. --- sys/scsi/scsi_base.c | 4 ++-- 1 file 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 -- cgit v1.2.3