Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca0cac33 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Greg Kroah-Hartman
Browse files

nfsd: safer handling of corrupted c_type



[ Upstream commit c25bf185e57213b54ea0d632ac04907310993433 ]

This can only happen if there's a bug somewhere, so let's make it a WARN
not a printk.  Also, I think it's safest to ignore the corruption rather
than trying to fix it by removing a cache entry.

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e585a8b5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -469,8 +469,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
		rtn = RC_REPLY;
		break;
	default:
		printk(KERN_WARNING "nfsd: bad repcache type %d\n", rp->c_type);
		nfsd_reply_cache_free_locked(b, rp, nn);
		WARN_ONCE(1, "nfsd: bad repcache type %d\n", rp->c_type);
	}

	goto out;