Re: vfs/for-next: NULL pointer dereference in sysfs_dentry_delete()

From: Al Viro
Date: Sun Jun 24 2012 - 05:20:43 EST


On Sun, Jun 24, 2012 at 04:07:40PM +0800, wfg@xxxxxxxxxxxxxxx wrote:
> Hi Al,
>
> This commit
>
> commit 08eaca322cb2720f1730e46793dee9464ebd26f2
> Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Date: Thu Jun 7 20:51:39 2012 -0400
>
> sysfs: switch to ->s_d_op and ->d_release()
>
> triggers the following bug:

Arrgh....
It needs
static int sysfs_dentry_delete(const struct dentry *dentry)
{
struct sysfs_dirent *sd = dentry->d_fsdata;
return !(sd && !(sd->s_flags & SYSFS_FLAG_REMOVED));
}

Will fold and push in a few

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/