]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] eCryptfs: fix possible NULL ptr deref in ecryptfs_d_release()
authorMichael Halcrow <mhalcrow@us.ibm.com>
Fri, 16 Mar 2007 21:38:22 +0000 (13:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 17 Mar 2007 02:25:05 +0000 (19:25 -0700)
commitb228b8e5bf96b740a70871c1a248bb65c267f5f2
tree0697a8341e4f8f3cafe770ba76e12bb900ac3880
parentad28d94abb1313bdf27e196676292c493f92f824
[PATCH] eCryptfs: fix possible NULL ptr deref in ecryptfs_d_release()

ecryptfs_d_release() first dereferences a pointer (via
ecryptfs_dentry_to_lower()) and then afterwards checks to see if the
pointer it just dereferenced is NULL (via ecryptfs_dentry_to_private()).

This patch moves all of the work done on the dereferenced pointer inside a
block governed by the condition that the pointer is non-NULL.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/dentry.c