Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-29 Thread Chris Mason
On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > If the lower or upper directory of an overlayfs mount belong to a btrfs > file system and we fsync the file through the overlayfs' merged directory > we ended up accessing an inode that didn't belong to

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-25 Thread Filipe Manana
On Fri, Mar 25, 2016 at 6:49 PM, Chris Mason wrote: > On Mon, Mar 21, 2016 at 05:52:44PM +, Filipe Manana wrote: >> On Mon, Mar 21, 2016 at 5:51 PM, Chris Mason wrote: >> > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: >> >> From: Filipe Manana >> >> >> >> If the lower

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-25 Thread Chris Mason
On Mon, Mar 21, 2016 at 05:52:44PM +, Filipe Manana wrote: > On Mon, Mar 21, 2016 at 5:51 PM, Chris Mason wrote: > > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> > >> If the lower or upper directory of an overlayfs mount belong to a btrfs

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread David Sterba
On Mon, Mar 21, 2016 at 02:08:00PM -0400, Chris Mason wrote: > On Mon, Mar 21, 2016 at 06:58:08PM +0100, David Sterba wrote: > > On Mon, Mar 21, 2016 at 01:51:07PM -0400, Chris Mason wrote: > > > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > > > > From: Filipe Manana > > >

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread Chris Mason
On Mon, Mar 21, 2016 at 06:58:08PM +0100, David Sterba wrote: > On Mon, Mar 21, 2016 at 01:51:07PM -0400, Chris Mason wrote: > > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > > > From: Filipe Manana > > > > > > If the lower or upper directory of an overlayfs mount belong

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread David Sterba
On Mon, Mar 21, 2016 at 01:51:07PM -0400, Chris Mason wrote: > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > If the lower or upper directory of an overlayfs mount belong to a btrfs > > file system and we fsync the file through the overlayfs'

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread Filipe Manana
On Mon, Mar 21, 2016 at 5:51 PM, Chris Mason wrote: > On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: >> From: Filipe Manana >> >> If the lower or upper directory of an overlayfs mount belong to a btrfs >> file system and we fsync the file through the overlayfs' merged direct

Re: [PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread Chris Mason
On Mon, Mar 21, 2016 at 05:38:44PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > If the lower or upper directory of an overlayfs mount belong to a btrfs > file system and we fsync the file through the overlayfs' merged directory > we ended up accessing an inode that didn't belong to

[PATCH] Btrfs: fix crash/invalid memory access on fsync when using overlayfs

2016-03-21 Thread fdmanana
From: Filipe Manana If the lower or upper directory of an overlayfs mount belong to a btrfs file system and we fsync the file through the overlayfs' merged directory we ended up accessing an inode that didn't belong to btrfs as if it were a btrfs inode at btrfs_sync_file() resulting in a crash li