svn commit: r229451 - stable/7/sys/nfsclient

Rick Macklem rmacklem at
Wed Jan 4 00:51:06 UTC 2012

Author: rmacklem
Date: Wed Jan  4 00:51:05 2012
New Revision: 229451

  MFC: r227690
  The old NFS client will crash due to the reply being m_freem()'d
  twice if the server bogusly returns an error with the NFSERR_RETERR
  bit (bit 31) set. No actual NFS error has this bit set, but it seems
  that amd will sometimes do this. This patch makes sure the NFSERR_RETERR
  bit is cleared to avoid a crash.
  This is not exactly a merge, since the code is in sys/nfsclient/nfs_socket.c,
  which does not exist in head.
  Tested by:	martin at
  PR:		kern/153847

Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/nfsclient/nfs_socket.c
--- stable/7/sys/nfsclient/nfs_socket.c	Wed Jan  4 00:24:09 2012	(r229450)
+++ stable/7/sys/nfsclient/nfs_socket.c	Wed Jan  4 00:51:05 2012	(r229451)
@@ -1351,6 +1351,12 @@ wait_for_pinned_req:
 				rep->r_xid = *xidp = txdr_unsigned(nfs_xid_gen());
 				goto tryagain;
+			/*
+			 * Make sure NFSERR_RETERR isn't bogusly set by a
+			 * server such as amd. (No actual NFS error has bit 31
+			 * set.)
+			 */
+			error &= ~NFSERR_RETERR;
 			 * If the File Handle was stale, invalidate the

More information about the svn-src-stable-7 mailing list