svn commit: r349966 - head/sys/dev/netmap

Vincenzo Maffione vmaffione at FreeBSD.org
Sat Jul 13 08:08:26 UTC 2019


Author: vmaffione
Date: Sat Jul 13 08:08:25 2019
New Revision: 349966
URL: https://svnweb.freebsd.org/changeset/base/349966

Log:
  netmap: fix bug introduced by r349752
  
  r349752 introduced a NULL pointer reference bug
  in the emulated netmap code.
  
  Reported by:	lwhsu
  MFC after:	3 days

Modified:
  head/sys/dev/netmap/netmap_generic.c

Modified: head/sys/dev/netmap/netmap_generic.c
==============================================================================
--- head/sys/dev/netmap/netmap_generic.c	Sat Jul 13 03:39:46 2019	(r349965)
+++ head/sys/dev/netmap/netmap_generic.c	Sat Jul 13 08:08:25 2019	(r349966)
@@ -1126,7 +1126,8 @@ generic_netmap_attach(struct ifnet *ifp)
 
 	nm_os_generic_set_features(gna);
 
-	nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, gna->prev->name);
+	nm_prinf("Emulated adapter for %s created (prev was %s)", na->name,
+	    gna->prev ? gna->prev->name : "NULL");
 
 	return retval;
 }


More information about the svn-src-head mailing list