Files
android_kernel_samsung_sm8750/fs
David Howells 112fc894a7 configfs: Fix potential NULL d_inode dereference
Code that does this:

		if (!(d_unhashed(dentry) && dentry->d_inode)) {
			...
			simple_unlink(parent->d_inode, dentry);
		}

is broken because:

    !(d_unhashed(dentry) && dentry->d_inode)

is equivalent to:

    !d_unhashed(dentry) || !dentry->d_inode

so it is possible to get into simple_unlink() with dentry->d_inode == NULL.

simple_unlink(), however, assumes dentry->d_inode cannot be NULL.

I think that what was meant is this:

    !d_unhashed(dentry) && dentry->d_inode

and that the logical-not operator or the final close-bracket was misplaced.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-02-20 04:56:43 -05:00
..
2014-11-19 13:01:20 -05:00
2014-11-19 13:01:20 -05:00
2015-02-16 17:56:03 -08:00
2014-12-18 19:08:10 -08:00
2014-11-28 18:23:44 -08:00
2015-02-13 21:21:36 -08:00
2015-02-16 11:43:13 -05:00
2015-02-05 16:34:25 +01:00
2014-11-19 13:01:20 -05:00
2015-02-16 17:56:04 -08:00
2015-02-02 18:09:38 +01:00
2015-01-29 00:13:13 -05:00
2014-11-19 13:01:26 -05:00