Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Fixed incorrect m_defrag return value check.



details:   https://anonhg.NetBSD.org/src/rev/a40d502085e3
branches:  trunk
changeset: 461181:a40d502085e3
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Mon Nov 18 04:38:48 2019 +0000

description:
Fixed incorrect m_defrag return value check.

diffstat:

 sys/dev/hyperv/if_hvn.c |  6 +++---
 sys/dev/pci/if_mcx.c    |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 03ab99240264 -r a40d502085e3 sys/dev/hyperv/if_hvn.c
--- a/sys/dev/hyperv/if_hvn.c   Mon Nov 18 04:17:08 2019 +0000
+++ b/sys/dev/hyperv/if_hvn.c   Mon Nov 18 04:38:48 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hvn.c,v 1.6 2019/11/15 08:51:27 nonaka Exp $        */
+/*     $NetBSD: if_hvn.c,v 1.7 2019/11/18 04:38:48 nonaka Exp $        */
 /*     $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $       */
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.6 2019/11/15 08:51:27 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.7 2019/11/18 04:38:48 nonaka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -565,7 +565,7 @@
        case 0:
                break;
        case EFBIG:
-               if (m_defrag(m, M_NOWAIT) == 0 &&
+               if (m_defrag(m, M_NOWAIT) != NULL &&
                    bus_dmamap_load_mbuf(sc->sc_dmat, txd->txd_dmap, m,
                      BUS_DMA_READ | BUS_DMA_NOWAIT) == 0)
                        break;
diff -r 03ab99240264 -r a40d502085e3 sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Mon Nov 18 04:17:08 2019 +0000
+++ b/sys/dev/pci/if_mcx.c      Mon Nov 18 04:38:48 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.6 2019/11/18 04:40:05 nonaka Exp $ */
 /*     $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -6347,7 +6347,7 @@
                break;
 
        case EFBIG:
-               if (m_defrag(m, M_DONTWAIT) == 0 &&
+               if (m_defrag(m, M_DONTWAIT) != NULL &&
                    bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
                    BUS_DMA_STREAMING | BUS_DMA_NOWAIT) == 0)
                        break;



Home | Main Index | Thread Index | Old Index