Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 May 2017 13:14:13 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318287 - head/sys/fs/nfsclient
Message-ID:  <201705151314.v4FDEDlF022481@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 15 13:14:13 2017
New Revision: 318287
URL: https://svnweb.freebsd.org/changeset/base/318287

Log:
  Make nfscl_mtofh() return ENXIO when *nfhpp == NULL.
  
  r317272 introduced a case where nfscl_mtofh() could return 0 when
  *nfhpp is NULL. This patch makes it return ENXIO for this case.
  
  MFC after:	1 week

Modified:
  head/sys/fs/nfsclient/nfs_clcomsubs.c

Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clcomsubs.c	Mon May 15 13:05:02 2017	(r318286)
+++ head/sys/fs/nfsclient/nfs_clcomsubs.c	Mon May 15 13:14:13 2017	(r318287)
@@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s
 		if (*++tl != 0) {
 			nd->nd_flag |= ND_NOMOREDATA;
 			flag = 0;
+			error = ENXIO;	/* Return ENXIO so *nfhpp isn't used. */
 		}
 	}
 	if (flag) {



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