diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-07-01 19:31:05 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-07-01 19:31:05 +0000 |
commit | 615972cdc2c1333248497446d88a9e10413a06e9 (patch) | |
tree | 6e110e8979f8e488d682fb44e67d365706600f57 /sys/dev | |
parent | 5c18e9dfe10ac1d1ea0983ddea83330dd0d14041 (diff) |
make sure that buf's on the stack set the b_bq to NULL.
one memset -> bzero.
ok marco@, jsing@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid_aoe.c | 4 | ||||
-rw-r--r-- | sys/dev/softraid_raid0.c | 3 | ||||
-rw-r--r-- | sys/dev/softraid_raid1.c | 3 | ||||
-rw-r--r-- | sys/dev/softraid_raid6.c | 3 | ||||
-rw-r--r-- | sys/dev/softraid_raidp.c | 3 |
5 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c index de6775c4bc1..431740771a3 100644 --- a/sys/dev/softraid_aoe.c +++ b/sys/dev/softraid_aoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_aoe.c,v 1.15 2010/06/29 18:43:54 tedu Exp $ */ +/* $OpenBSD: softraid_aoe.c,v 1.16 2010/07/01 19:31:04 thib Exp $ */ /* * Copyright (c) 2008 Ted Unangst <tedu@openbsd.org> * Copyright (c) 2008 Marco Peereboom <marco@openbsd.org> @@ -816,7 +816,7 @@ resleep: eh->ether_type = htons(ETHERTYPE_AOE); ap = (struct aoe_packet *)&eh[1]; AOE_HDR2BLK(ap, blk); - memset(&buf, 0, sizeof buf); + bzero(&buf, sizeof(buf)); buf.b_blkno = blk; buf.b_flags = B_WRITE | B_PHYS; buf.b_bcount = len; diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index c0c7e9d218b..785b12e54ec 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.20 2010/03/26 11:20:34 jsing Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.21 2010/07/01 19:31:04 thib Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -337,6 +337,7 @@ sr_raid0_rw(struct sr_workunit *wu) ccb->ccb_buf.b_data = data; ccb->ccb_buf.b_error = 0; ccb->ccb_buf.b_proc = curproc; + ccb->ccb_buf.b_bq = NULL; ccb->ccb_wu = wu; ccb->ccb_buf.b_flags |= xs->flags & SCSI_DATA_IN ? B_READ : B_WRITE; diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 916defebe94..0cd5b415f08 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.23 2010/03/26 11:20:34 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.24 2010/07/01 19:31:04 thib Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -416,6 +416,7 @@ sr_raid1_rw(struct sr_workunit *wu) b->b_data = xs->data; b->b_error = 0; b->b_proc = curproc; + b->b_bq = NULL; ccb->ccb_wu = wu; if (xs->flags & SCSI_DATA_IN) { diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index a6e68c21a78..bc2563899d6 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.16 2010/03/26 11:20:34 jsing Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.17 2010/07/01 19:31:04 thib Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -989,6 +989,7 @@ sr_raid6_addio(struct sr_workunit *wu, int dsk, daddr64_t blk, daddr64_t len, ccb->ccb_buf.b_proc = curproc; ccb->ccb_buf.b_dev = sd->sd_vol.sv_chunks[dsk]->src_dev_mm; ccb->ccb_buf.b_vp = sd->sd_vol.sv_chunks[dsk]->src_vn; + ccb->ccb_buf.b_bq = NULL; if ((ccb->ccb_buf.b_flags & B_READ) == 0) ccb->ccb_buf.b_vp->v_numoutput++; diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c index 1afc73ae068..8b9a7a1235a 100644 --- a/sys/dev/softraid_raidp.c +++ b/sys/dev/softraid_raidp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raidp.c,v 1.16 2010/03/26 11:20:34 jsing Exp $ */ +/* $OpenBSD: softraid_raidp.c,v 1.17 2010/07/01 19:31:04 thib Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -769,6 +769,7 @@ sr_raidp_addio(struct sr_workunit *wu, int dsk, daddr64_t blk, daddr64_t len, ccb->ccb_buf.b_proc = curproc; ccb->ccb_buf.b_dev = sd->sd_vol.sv_chunks[dsk]->src_dev_mm; ccb->ccb_buf.b_vp = sd->sd_vol.sv_chunks[dsk]->src_vn; + ccb->ccb_buf.b_bq = NULL; if ((ccb->ccb_buf.b_flags & B_READ) == 0) ccb->ccb_buf.b_vp->v_numoutput++; |