Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Check for M_EXT in m->m_flags, whether m is NULL, ...



details:   https://anonhg.NetBSD.org/src/rev/f1169a3c18ef
branches:  trunk
changeset: 825730:f1169a3c18ef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jul 29 01:19:29 2017 +0000

description:
Check for M_EXT in m->m_flags, whether m is NULL, after MCLGET.

>From Ilja Van Sprundel.

diffstat:

 sys/dev/ic/bwi.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 823f343ca3dd -r f1169a3c18ef sys/dev/ic/bwi.c
--- a/sys/dev/ic/bwi.c  Sat Jul 29 01:14:59 2017 +0000
+++ b/sys/dev/ic/bwi.c  Sat Jul 29 01:19:29 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bwi.c,v 1.31 2017/02/02 10:05:35 nonaka Exp $  */
+/*     $NetBSD: bwi.c,v 1.32 2017/07/29 01:19:29 riastradh Exp $       */
 /*     $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $       */
 
 /*
@@ -48,7 +48,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.31 2017/02/02 10:05:35 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.32 2017/07/29 01:19:29 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -8328,7 +8328,7 @@
        if (m == NULL)
                return (ENOBUFS);
        MCLGET(m, init ? M_WAITOK : M_DONTWAIT);
-       if (m == NULL) {
+       if ((m->m_flags & M_EXT) == 0) {
                error = ENOBUFS;
 
                /*



Home | Main Index | Thread Index | Old Index