Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2020 22:57:54 +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-11@freebsd.org
Subject:   svn commit: r357278 - stable/11/sys/dev/netmap
Message-ID:  <202001292257.00TMvskI050099@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Wed Jan 29 22:57:54 2020
New Revision: 357278
URL: https://svnweb.freebsd.org/changeset/base/357278

Log:
  MFC r357159
  
  netmap_mem_unmap: fix NULL pointer dereference

Modified:
  stable/11/sys/dev/netmap/netmap_mem2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/netmap/netmap_mem2.c
==============================================================================
--- stable/11/sys/dev/netmap/netmap_mem2.c	Wed Jan 29 22:55:59 2020	(r357277)
+++ stable/11/sys/dev/netmap/netmap_mem2.c	Wed Jan 29 22:57:54 2020	(r357278)
@@ -1520,11 +1520,12 @@ static int
 netmap_mem_unmap(struct netmap_obj_pool *p, struct netmap_adapter *na)
 {
 	int i, lim = p->objtotal;
-	struct netmap_lut *lut = &na->na_lut;
+	struct netmap_lut *lut;
 
 	if (na == NULL || na->pdev == NULL)
 		return 0;
 
+	lut = &na->na_lut;
 #if defined(__FreeBSD__)
 	/* On FreeBSD mapping and unmapping is performed by the txsync
 	 * and rxsync routine, packet by packet. */



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