Author: rmacklem
Date: Wed Jan  4 00:24:09 2012
New Revision: 229450
URL: http://svn.freebsd.org/changeset/base/229450

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/8/sys/nfsclient/nfs_krpc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/conf/ldscript.mips.octeon1.32   (props changed)
  stable/8/sys/conf/ldscript.mips.octeon1.64   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/nfsclient/nfs_krpc.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_krpc.c   Wed Jan  4 00:04:01 2012        
(r229449)
+++ stable/8/sys/nfsclient/nfs_krpc.c   Wed Jan  4 00:24:09 2012        
(r229450)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to