summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_krpc.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-11-19 03:20:15 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-11-19 03:20:15 +0000
commitf0a67116809a4da6e49f05917afce94700cdf014 (patch)
tree6771ca7c29999c9664f5c4e0420fb0cb678e7545 /sys/nfsclient/nfs_krpc.c
parent2fa14817953d37977cb57abebed6d295164b2d3f (diff)
downloadFreeBSD-src-f0a67116809a4da6e49f05917afce94700cdf014.zip
FreeBSD-src-f0a67116809a4da6e49f05917afce94700cdf014.tar.gz
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. PR: kern/153847 MFC after: 2 weeks
Diffstat (limited to 'sys/nfsclient/nfs_krpc.c')
-rw-r--r--sys/nfsclient/nfs_krpc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_krpc.c b/sys/nfsclient/nfs_krpc.c
index 171f7aa..c2406d9 100644
--- a/sys/nfsclient/nfs_krpc.c
+++ b/sys/nfsclient/nfs_krpc.c
@@ -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
OpenPOWER on IntegriCloud