Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2012 16:32:33 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229391 - stable/9/sys/nfsclient
Message-ID:  <201201031632.q03GWXPv031762@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Jan  3 16:32:33 2012
New Revision: 229391
URL: http://svn.freebsd.org/changeset/base/229391

Log:
  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.

Modified:
  stable/9/sys/nfsclient/nfs_krpc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/nfsclient/nfs_krpc.c
==============================================================================
--- stable/9/sys/nfsclient/nfs_krpc.c	Tue Jan  3 16:22:29 2012	(r229390)
+++ stable/9/sys/nfsclient/nfs_krpc.c	Tue Jan  3 16:32:33 2012	(r229391)
@@ -540,6 +540,11 @@ tryagain:
 				    hz);
 			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 lookup



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