Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci When allocating the channel queue, make sure the...
details: https://anonhg.NetBSD.org/src/rev/6f2e9ffadfbe
branches: trunk
changeset: 787528:6f2e9ffadfbe
user: matt <matt%NetBSD.org@localhost>
date: Sat Jun 22 05:37:06 2013 +0000
description:
When allocating the channel queue, make sure the return memory is zeroed.
diffstat:
sys/dev/pci/pciide_common.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 471629b85f0d -r 6f2e9ffadfbe sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c Sat Jun 22 05:20:57 2013 +0000
+++ b/sys/dev/pci/pciide_common.c Sat Jun 22 05:37:06 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $ */
+/* $NetBSD: pciide_common.c,v 1.59 2013/06/22 05:37:06 matt Exp $ */
/*
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.59 2013/06/22 05:37:06 matt Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -872,7 +872,7 @@
cp->ata_channel.ch_channel = channel;
cp->ata_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
cp->ata_channel.ch_queue =
- malloc(sizeof(struct ata_queue), M_DEVBUF, M_NOWAIT);
+ malloc(sizeof(struct ata_queue), M_DEVBUF, M_NOWAIT|M_ZERO);
if (cp->ata_channel.ch_queue == NULL) {
aprint_error("%s %s channel: "
"can't allocate memory for command queue",
Home |
Main Index |
Thread Index |
Old Index