Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Jens Axboe
On 4/6/21 8:23 AM, Al Viro wrote: > On Tue, Apr 06, 2021 at 02:15:01PM +, Al Viro wrote: > >> I'm referring to the fact that your diff is with an already modified >> path_lookupat() >> _and_ those modifications have managed to introduce a bug your patch reverts. >> No terminate_walk() paired

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 02:15:01PM +, Al Viro wrote: > On Tue, Apr 06, 2021 at 03:22:05PM +0200, Christian Brauner wrote: > > > Why is a another function in charge of checking the return value of an > > initialization function. If something like path_init() fails why is the > > next caller

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Al Viro
On Tue, Apr 06, 2021 at 02:15:01PM +, Al Viro wrote: > I'm referring to the fact that your diff is with an already modified > path_lookupat() > _and_ those modifications have managed to introduce a bug your patch reverts. > No terminate_walk() paired with that path_init() failure, i.e.

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Al Viro
On Tue, Apr 06, 2021 at 03:22:05PM +0200, Christian Brauner wrote: > Why is a another function in charge of checking the return value of an > initialization function. If something like path_init() fails why is the > next caller responsible for rejecting it's return value and then we're > passing

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 01:13:13PM +, Al Viro wrote: > On Tue, Apr 06, 2021 at 02:35:05PM +0200, Christian Brauner wrote: > > > And while we're at it might I bring up the possibility of an additional > > cleanup of how we currently call path_init(). > > Right now we pass the return value from

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Al Viro
On Tue, Apr 06, 2021 at 02:35:05PM +0200, Christian Brauner wrote: > And while we're at it might I bring up the possibility of an additional > cleanup of how we currently call path_init(). > Right now we pass the return value from path_init() directly into e.g. > link_path_walk() which as a first

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 01:38:39AM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 10:07:37PM +0200, Christian Brauner wrote: > > > > diff --git a/fs/namei.c b/fs/namei.c > > > index 216f16e74351..82344f1139ff 100644 > > > --- a/fs/namei.c > > > +++ b/fs/namei.c > > > @@ -2289,6 +2289,9 @@ static

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Al Viro
On Tue, Apr 06, 2021 at 01:38:39AM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 10:07:37PM +0200, Christian Brauner wrote: > > > > diff --git a/fs/namei.c b/fs/namei.c > > > index 216f16e74351..82344f1139ff 100644 > > > --- a/fs/namei.c > > > +++ b/fs/namei.c > > > @@ -2289,6 +2289,9 @@ static

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Al Viro
On Mon, Apr 05, 2021 at 10:07:37PM +0200, Christian Brauner wrote: > > diff --git a/fs/namei.c b/fs/namei.c > > index 216f16e74351..82344f1139ff 100644 > > --- a/fs/namei.c > > +++ b/fs/namei.c > > @@ -2289,6 +2289,9 @@ static const char *path_init(struct nameidata *nd, > > unsigned flags) > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Mon, Apr 05, 2021 at 06:28:54PM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 06:23:49PM +, Al Viro wrote: > > On Mon, Apr 05, 2021 at 07:08:01PM +0200, Christian Brauner wrote: > > > > > Ah dentry count of -127 looks... odd. > > > > dead + 1... > > > > void lockref_mark_dead(struct

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Al Viro
On Mon, Apr 05, 2021 at 06:23:49PM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 07:08:01PM +0200, Christian Brauner wrote: > > > Ah dentry count of -127 looks... odd. > > dead + 1... > > void lockref_mark_dead(struct lockref *lockref) > { > assert_spin_locked(>lock); >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Al Viro
On Mon, Apr 05, 2021 at 07:08:01PM +0200, Christian Brauner wrote: > Ah dentry count of -127 looks... odd. dead + 1... void lockref_mark_dead(struct lockref *lockref) { assert_spin_locked(>lock); lockref->count = -128; } IOW, a leaked (uncounted) reference to dentry, that got

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Mon, Apr 05, 2021 at 04:18:58PM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 01:44:37PM +0200, Christian Brauner wrote: > > On Sun, Apr 04, 2021 at 08:17:21PM +, Al Viro wrote: > > > On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > > > > > > > Yeah, I have at least namei.o >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Al Viro
On Mon, Apr 05, 2021 at 01:44:37PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 08:17:21PM +, Al Viro wrote: > > On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > > > > > Yeah, I have at least namei.o > > > > > > > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Sun, Apr 04, 2021 at 08:17:21PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > > > Yeah, I have at least namei.o > > > > > > https://drive.google.com/file/d/1AvO1St0YltIrA86DXjp1Xg3ojtS9owGh/view?usp=sharing > > > > *grumble* > > > > Is it reproducible

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Al Viro
On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > Yeah, I have at least namei.o > > > > https://drive.google.com/file/d/1AvO1St0YltIrA86DXjp1Xg3ojtS9owGh/view?usp=sharing > > *grumble* > > Is it reproducible without KASAN? Would be much easier to follow the produced > asm...

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Al Viro
On Sun, Apr 04, 2021 at 07:05:13PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 04:44:06PM +, Al Viro wrote: > > On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > > > > > Very interesting. What happens if you call loop() twice? And now I > > > > wonder > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 04:44:06PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > > > Very interesting. What happens if you call loop() twice? And now I > > > wonder > > > whether it's root or cwd, actually... Hmm... > > > > > > How about this:

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 06:52:08PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > > > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > > > > > > > Sorry for not

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > > > > > Sorry for not replying to your earlier mail but I've been debugging this > > > too. My

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Al Viro
On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > Very interesting. What happens if you call loop() twice? And now I wonder > > whether it's root or cwd, actually... Hmm... > > > > How about this: > > fd = open("/proc/self/mountinfo", 0); > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > > > Sorry for not replying to your earlier mail but I've been debugging this > > too. My current theory is that it's related to LOOKUP_ROOT_GRABBED when > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Al Viro
On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > Sorry for not replying to your earlier mail but I've been debugging this > too. My current theory is that it's related to LOOKUP_ROOT_GRABBED when > LOOKUP_CACHED is specified _possibly_ with an interaction how >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 02:34:08AM +, Al Viro wrote: > On Thu, Apr 01, 2021 at 07:11:12PM +, Al Viro wrote: > > > > I _think_ I see what the issue is. It seems that an assumption made in > > > this commit might be wrong and we're missing a mnt_add_count() bump that > > > we would

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-03 Thread Al Viro
On Sun, Apr 04, 2021 at 02:34:08AM +, Al Viro wrote: > I really wonder what mount is it happening to. BTW, how painful would > it be to teach syzcaller to turn those cascades of > NONFAILING(*(uint8_t*)0x2080 = 0x12); > NONFAILING(*(uint8_t*)0x2081 = 0); >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-03 Thread Al Viro
On Thu, Apr 01, 2021 at 07:11:12PM +, Al Viro wrote: > > I _think_ I see what the issue is. It seems that an assumption made in > > this commit might be wrong and we're missing a mnt_add_count() bump that > > we would otherwise have gotten if we've moved the failure handling into > > the

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Al Viro
On Thu, Apr 01, 2021 at 07:59:19PM +0200, Christian Brauner wrote: > I _think_ I see what the issue is. It seems that an assumption made in > this commit might be wrong and we're missing a mnt_add_count() bump that > we would otherwise have gotten if we've moved the failure handling into > the

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 05:16:03AM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7 > Author: Damien Le Moal > Date: Thu Jan 28 04:47:27 2021 + > > nvme: cleanup zone information initialization > > bisection log:

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:d19cc4bf Merge tag 'trace-v5.12-rc5' of git://git.kernel.o.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1018f281d0 >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread syzbot
syzbot has bisected this issue to: commit 73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7 Author: Damien Le Moal Date: Thu Jan 28 04:47:27 2021 + nvme: cleanup zone information initialization bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1440e986d0 start commit:

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 07:46:13PM +0200, Christian Brauner wrote: > On Thu, Apr 01, 2021 at 10:09:18AM -0600, Jens Axboe wrote: > > On 4/1/21 9:45 AM, Christian Brauner wrote: > > > On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > > >> Hello, > > >> > > >> syzbot found the following

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Jens Axboe
On 4/1/21 9:45 AM, Christian Brauner wrote: > On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: >> Hello, >> >> syzbot found the following issue on: >> >> HEAD commit:d19cc4bf Merge tag 'trace-v5.12-rc5' of git://git.kernel.o.. >> git tree: upstream >> console output:

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 10:09:18AM -0600, Jens Axboe wrote: > On 4/1/21 9:45 AM, Christian Brauner wrote: > > On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > >> Hello, > >> > >> syzbot found the following issue on: > >> > >> HEAD commit:d19cc4bf Merge tag 'trace-v5.12-rc5' of > >>

[syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:d19cc4bf Merge tag 'trace-v5.12-rc5' of git://git.kernel.o.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1018f281d0 kernel config: https://syzkaller.appspot.com/x/.config?x=d1a3d65a48dbd1bc