From: J. Bruce Fields Date: Tue, 5 May 2009 23:04:29 +0000 (-0400) Subject: nfsd4: check for negative dentry before use in nfsv4 readdir X-Git-Tag: linux-omap-v2.6.30-rc6~26^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2c0cea6b1cb210e962f07047df602875564069e;p=pandora-kernel.git nfsd4: check for negative dentry before use in nfsv4 readdir After 2f9092e1020246168b1309b35e085ecd7ff9ff72 "Fix i_mutex vs. readdir handling in nfsd" (and 14f7dd63 "Copy XFS readdir hack into nfsd code"), an entry may be removed between the first mutex_unlock and the second mutex_lock. In this case, lookup_one_len() will return a negative dentry. Check for this case to avoid a NULL dereference. Signed-off-by: J. Bruce Fields Reviewed-by: J. R. Okajima Cc: stable@kernel.org --- Reading git-diff-tree failed