ACK: [PATCH 1/1] Revert "ovl: set I_CREATING on inode being created"

Kamal Mostafa kamal at canonical.com
Mon Aug 5 18:04:59 UTC 2019


I concur; this patch is the cause of the panic Stefan reported, and he
has successfully tested a kernel with this (and another related patch)
reverted.

So, yes, this should be revert should be applied along with this
additional revert I'm about to send:

   Subject: [PATCH 2/1] Revert "new primitive: discard_new_inode()"

Thanks, Aaron!

Acked-by: Kamal Mostafa <kamal at canonical.com>

 -Kamal

On Tue, Aug 06, 2019 at 01:20:27AM +0800, Aaron Ma wrote:
> This reverts commit b7fe2730d202b8e8fab1884af4f954d793082fdd.
> 
> BugLink: https://bugs.launchpad.net/bugs/1838982
> 
> This upstream commit depends on the following commits:
> e950564b97fd ("vfs: don't evict uninitialized inode")
> 80ea09a002bf ("vfs: factor out inode_insert5()")
> 
> With this commit only,
> Crash happens during the setup (dpkg) phase of sbuild using a overlayfs
> based chroot with the current bionic-proposed kernel (4.15.0-56-generic
> 
> [25553.379381] ? ovl_get_origin_fh+0x23/0x150 [overlay]
> [25553.379386] ? ovl_inode_test+0x20/0x20 [overlay]
> [25553.379390] ? ovl_lock_rename_workdir+0x50/0x50 [overlay]
> [25553.379396] ovl_get_inode+0xa2/0x450 [overlay]
> [25553.379401] ovl_lookup+0x275/0x760 [overlay]
> [25553.379406] lookup_slow+0xab/0x170
> [25553.379409] ? lookup_slow+0xab/0x170
> [25553.379413] walk_component+0x1c3/0x470
> [25553.379416] ? path_init+0x177/0x2f0
> [25553.379419] path_lookupat+0x84/0x1f0
> [25553.379423] ? __put_cred+0x3d/0x50
> [25553.379426] ? revert_creds+0x2f/0x40
> [25553.379429] filename_lookup+0xb6/0x190
> [25553.379434] ? __check_object_size+0xaf/0x1b0
> [25553.379438] user_path_at_empty+0x36/0x40
> [25553.379441] ? user_path_at_empty+0x36/0x40
> [25553.379444] SyS_chown+0x4d/0xe0
> [25553.379449] do_syscall_64+0x73/0x130
> [25553.379453] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
> 
> commit 80ea09a002bf is not a fix, no need to backport.
> 
> Signed-off-by: Aaron Ma <aaron.ma at canonical.com>
> ---
>  fs/overlayfs/dir.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
> index 4afa892d0da6..fde17ea1282d 100644
> --- a/fs/overlayfs/dir.c
> +++ b/fs/overlayfs/dir.c
> @@ -548,10 +548,6 @@ static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev,
>  	if (!inode)
>  		goto out_drop_write;
>  
> -	spin_lock(&inode->i_lock);
> -	inode->i_state |= I_CREATING;
> -	spin_unlock(&inode->i_lock);
> -
>  	inode_init_owner(inode, dentry->d_parent->d_inode, mode);
>  	attr.mode = inode->i_mode;
>  
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list