mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix zpl_revalidate() NULL deref
In zpl_revalidate() it's possible for the nameidata to be NULL for kernels which still accept the parameter. In particular, lookup_one_len() calls d_revalidate() with a NULL nameidata. Resolve the issue by checking for a NULL nameidata in which case just set the flags to 0. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1226
This commit is contained in:
parent
ee93035378
commit
09a661e960
@ -396,7 +396,7 @@ static int
|
|||||||
#ifdef HAVE_D_REVALIDATE_NAMEIDATA
|
#ifdef HAVE_D_REVALIDATE_NAMEIDATA
|
||||||
zpl_revalidate(struct dentry *dentry, struct nameidata *nd)
|
zpl_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||||
{
|
{
|
||||||
unsigned int flags = nd->flags;
|
unsigned int flags = (nd ? nd->flags : 0);
|
||||||
#else
|
#else
|
||||||
zpl_revalidate(struct dentry *dentry, unsigned int flags)
|
zpl_revalidate(struct dentry *dentry, unsigned int flags)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user