Whamcloud - gitweb
LU-3483 llite: Null deref in ll_revalidate_nd on NFSmount 15/6715/5
authorPatrick Farrell <paf@cray.com>
Thu, 20 Jun 2013 22:42:09 +0000 (17:42 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 03:27:04 +0000 (03:27 +0000)
commit1da4cc47d54330ad47180088f9e526417c8567c8
tree152d405bf0272c566a22cb62253bb8eab20fc3c9
parenta13947589e1593d6fae82ff0b5ce56c130bc7925
LU-3483 llite: Null deref in ll_revalidate_nd on NFSmount

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>
lustre/llite/dcache.c