In calls to ll_revalidate_nd, the nameidata pointer nd is
sometimes null. The core code of the function tests for
this case and handles it by calling ll_node_revalidate_it.
However, immediately before that code, there is a test to
see if the LOOKUP_RCU flag is set in nd->flags. This test
does NOT check to see if the nd pointer is null. Per
the comment, LOOKUP_RCU was added in kernel 2.6.38, and
this code is #ifdefed accordingly.
The fix is to test if nd is null in the LOOKUP_RCU check.
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I2b5d1718721f76943c3998f359dc83ad3a1590e6
Reviewed-on: http://review.whamcloud.com/6715
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
#ifndef HAVE_DCACHE_LOCK
/* kernel >= 2.6.38 supports rcu-walk, but lustre doesn't. */
#ifndef HAVE_DCACHE_LOCK
/* kernel >= 2.6.38 supports rcu-walk, but lustre doesn't. */
- if (nd->flags & LOOKUP_RCU)
+ if (nd && (nd->flags & LOOKUP_RCU))