Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2019 20:13:52 +0000 (UTC)
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349920 - stable/12/sys/dev/netmap
Message-ID:  <201907112013.x6BKDqMx038463@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Thu Jul 11 20:13:51 2019
New Revision: 349920
URL: https://svnweb.freebsd.org/changeset/base/349920

Log:
  MFC r349752
  
  netmap: fix kernel pointer printing in netmap_generic.c
  
  Print the adapter name rather than the address of the adapter
  to avoid kernel address leakage.
  
  PR:             Bug 238642
  Submitted by:   Fuqian Huang <huangfq.daxian@gmail.com>
  Reviewed by:    vmaffione

Modified:
  stable/12/sys/dev/netmap/netmap_generic.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/netmap/netmap_generic.c
==============================================================================
--- stable/12/sys/dev/netmap/netmap_generic.c	Thu Jul 11 19:51:33 2019	(r349919)
+++ stable/12/sys/dev/netmap/netmap_generic.c	Thu Jul 11 20:13:51 2019	(r349920)
@@ -1024,7 +1024,7 @@ generic_netmap_dtor(struct netmap_adapter *na)
 		         */
 		        netmap_adapter_put(prev_na);
 		}
-		nm_prinf("Native netmap adapter %p restored", prev_na);
+		nm_prinf("Native netmap adapter for %s restored", prev_na->name);
 	}
 	NM_RESTORE_NA(ifp, prev_na);
 	/*
@@ -1126,7 +1126,7 @@ generic_netmap_attach(struct ifnet *ifp)
 
 	nm_os_generic_set_features(gna);
 
-	nm_prinf("Emulated adapter for %s created (prev was %p)", na->name, gna->prev);
+	nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, gna->prev->name);
 
 	return retval;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907112013.x6BKDqMx038463>