Re: [PATCH] ovl: fix NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> [    9.956738] overlayfs: failed to retrieve upper fileattr
> (index/#61, err=-25)
> [   10.311610] overlayfs: failed to retrieve upper fileattr
> (index/#d, err=-25)
> [   10.712019] overlayfs: failed to retrieve upper fileattr
> (index/#e, err=-25)
> [   31.901577] overlayfs: failed to retrieve upper fileattr
> (index/#64, err=-25)
> 
> These have been -ENOIOCTLCMD errors but got (falsely?) converted to
> -ENOTTY by the recently introduced commit 5b0a414d06c3 ("ovl: fix
> filattr copy-up failure"):
> 
> +       if (err == -ENOIOCTLCMD)
> +               err = -ENOTTY;
> 
> Any ideas?
> 

Doing the same "quirk" for upper fileattr seems to fix the issues, but
I have no clue about any other implications:

diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index 347b06479663..1e69bc000dd8 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -167,6 +167,8 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
 
 	err = ovl_real_fileattr_get(new, &newfa);
 	if (err) {
+		if (err == -ENOTTY || err == -EINVAL)
+			return 0;
 		pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
 			new->dentry, err);
 		return err;








[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux