Source-Changes-HG archive

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

[src/trunk]: src/sys Make sure dynamically allocated channel_queue struct are...



details:   https://anonhg.NetBSD.org/src/rev/69d35ba64e9e
branches:  trunk
changeset: 787529:69d35ba64e9e
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Jun 22 05:41:25 2013 +0000

description:
Make sure dynamically allocated channel_queue struct are zero-filled.

diffstat:

 sys/arch/i386/pnpbios/pciide_pnpbios.c |  6 +++---
 sys/dev/ic/ahcisata_core.c             |  6 +++---
 sys/dev/ic/siisata.c                   |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 6f2e9ffadfbe -r 69d35ba64e9e sys/arch/i386/pnpbios/pciide_pnpbios.c
--- a/sys/arch/i386/pnpbios/pciide_pnpbios.c    Sat Jun 22 05:37:06 2013 +0000
+++ b/sys/arch/i386/pnpbios/pciide_pnpbios.c    Sat Jun 22 05:41:25 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_pnpbios.c,v 1.30 2012/07/31 15:50:32 bouyer Exp $       */
+/*     $NetBSD: pciide_pnpbios.c,v 1.31 2013/06/22 05:41:25 matt Exp $ */
 
 /*
  * Copyright (c) 1999 Soren S. Jorvang.  All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_pnpbios.c,v 1.30 2012/07/31 15:50:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_pnpbios.c,v 1.31 2013/06/22 05:41:25 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,7 @@
        cp->ata_channel.ch_channel = 0;
        cp->ata_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
        cp->ata_channel.ch_queue = malloc(sizeof(struct ata_queue),
-                                         M_DEVBUF, M_NOWAIT);
+                                         M_DEVBUF, M_NOWAIT|M_ZERO);
        if (cp->ata_channel.ch_queue == NULL) {
                aprint_error_dev(self, "unable to allocate memory for command "
                    "queue\n");
diff -r 6f2e9ffadfbe -r 69d35ba64e9e sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Sat Jun 22 05:37:06 2013 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Sat Jun 22 05:41:25 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.47 2013/04/03 17:15:07 bouyer Exp $        */
+/*     $NetBSD: ahcisata_core.c,v 1.48 2013/06/22 05:41:25 matt Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.47 2013/04/03 17:15:07 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.48 2013/06/22 05:41:25 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -326,7 +326,7 @@
                chp->ch_channel = i;
                chp->ch_atac = &sc->sc_atac;
                chp->ch_queue = malloc(sizeof(struct ata_queue),
-                   M_DEVBUF, M_NOWAIT);
+                   M_DEVBUF, M_NOWAIT|M_ZERO);
                if (chp->ch_queue == NULL) {
                        aprint_error("%s port %d: can't allocate memory for "
                            "command queue", AHCINAME(sc), i);
diff -r 6f2e9ffadfbe -r 69d35ba64e9e sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c      Sat Jun 22 05:37:06 2013 +0000
+++ b/sys/dev/ic/siisata.c      Sat Jun 22 05:41:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.25 2013/06/09 09:44:51 njoly Exp $ */
+/* $NetBSD: siisata.c,v 1.26 2013/06/22 05:41:25 matt Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.25 2013/06/09 09:44:51 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.26 2013/06/22 05:41:25 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -291,7 +291,7 @@
        chp->ch_channel = port;
        chp->ch_atac = &sc->sc_atac;
        chp->ch_queue = malloc(sizeof(struct ata_queue),
-                              M_DEVBUF, M_NOWAIT);
+                              M_DEVBUF, M_NOWAIT|M_ZERO);
        if (chp->ch_queue == NULL) {
                aprint_error_dev(sc->sc_atac.atac_dev,
                    "port %d: can't allocate memory "



Home | Main Index | Thread Index | Old Index