From bd27ad9e0a24b1763673abd89bc44a05e375e9f4 Mon Sep 17 00:00:00 2001 From: cem Date: Tue, 25 Oct 2016 18:36:15 +0000 Subject: [PATCH] uhso(4): Fix a null pointer dereference The directly following m_defrag() call can wait, so there is no reason this call can't as well. Reported by: Coverity CID: 1353551 Sponsored by: Dell EMC Isilon --- sys/dev/usb/net/uhso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/net/uhso.c b/sys/dev/usb/net/uhso.c index c94e67625a94..d8db44986b53 100644 --- a/sys/dev/usb/net/uhso.c +++ b/sys/dev/usb/net/uhso.c @@ -1752,7 +1752,7 @@ uhso_if_rxflush(void *arg) * Allocate a new mbuf for this IP packet and * copy the IP-packet into it. */ - m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR); memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen); m->m_pkthdr.len = m->m_len = iplen;