]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsclient: add checks for a server returning the current directory
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 28 Feb 2021 22:15:32 +0000 (14:15 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Mon, 15 Mar 2021 19:31:13 +0000 (12:31 -0700)
commitf365c5b0e917d300d9b4e85443e16b430e57cc51
tree3b0df677e3cdceeba4e66b82c9e56a0381185995
parent763fb2fda0144e3630de74b918d06a96b7968ee2
nfsclient: add checks for a server returning the current directory

Commit 3fe2c68ba20f dealt with a panic in cache_enter_time() where
the vnode referred to the directory argument.
It would also be possible to get these panics if a broken
NFS server were to return the directory as an new object being
created within the directory or in a Lookup reply.

This patch adds checks to avoid the panics and logs
messages to indicate that the server is broken for the
file object creation cases.

(cherry picked from commit 3e04ab36ba5ce5cbbf6d22f17a01a391a04e465f)
sys/fs/nfsclient/nfs_clvnops.c