Re: possible deadlock in acct_pin_kill

2019-04-19 Thread Amir Goldstein
On Thu, Mar 28, 2019 at 10:23 AM Dmitry Vyukov wrote: > > On Wed, Mar 27, 2019 at 8:16 AM Amir Goldstein wrote: > > > > On Wed, Mar 27, 2019 at 5:53 AM syzbot > > wrote: > > > > > > syzbot has bisected this bug to: > > > > > > commit e950564b97fd0f541b02eb207685d0746f5ecf29 > > > Author: Miklos

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-11 Thread Amir Goldstein
On Thu, Apr 4, 2019 at 10:33 PM Amir Goldstein wrote: > > On Thu, Apr 4, 2019 at 10:05 PM Al Viro wrote: > > > ... > > OK, so... My first reaction had been complete BS. However, the > > same goes for your analysis - it's not an ordering problem at all. > > What happens is that we are replacing

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Amir Goldstein
On Thu, Apr 4, 2019 at 10:05 PM Al Viro wrote: > ... > OK, so... My first reaction had been complete BS. However, the > same goes for your analysis - it's not an ordering problem at all. > What happens is that we are replacing file->path.mnt with a clone > and we want the write count

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Al Viro
On Thu, Apr 04, 2019 at 01:52:55PM +0300, Amir Goldstein wrote: > If new file is on the same fs as old file, acct_pin_kill(old) fail to > file_start_write_trylock() and skip writing the old file, because > sb_writers (of new) is already taken by acct_on(). The above is BS, BTW.

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Al Viro
On Thu, Apr 04, 2019 at 07:49:44PM +0100, Al Viro wrote: > On Thu, Apr 04, 2019 at 07:44:48PM +0100, Al Viro wrote: > > > Huh? sb_writers is taken when we *open* the new file. Then we replace > > its ->path.mnt with a clone and transfer the write count from the original > > to new one. And

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Al Viro
On Thu, Apr 04, 2019 at 07:44:48PM +0100, Al Viro wrote: > Huh? sb_writers is taken when we *open* the new file. Then we replace > its ->path.mnt with a clone and transfer the write count from the original > to new one. And close the old file while we are at it. > > >From sb_writers POV

Re: [PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Al Viro
On Thu, Apr 04, 2019 at 01:52:55PM +0300, Amir Goldstein wrote: > This looks like an old bug, pre-dating the "Fixes" commit, but the > "Fixes" commit did not handle it properly. > > The bug recently surfaced as a lockdep possible deadlock warning > with commit d1d04ef8572b ("ovl: stack file

[PATCH v2] acct: fix possible deadlock in acct_pin_kill

2019-04-04 Thread Amir Goldstein
This looks like an old bug, pre-dating the "Fixes" commit, but the "Fixes" commit did not handle it properly. The bug recently surfaced as a lockdep possible deadlock warning with commit d1d04ef8572b ("ovl: stack file ops"). When acct_on() replaces one acct file with another, it takes sb_writers

Re: possible deadlock in acct_pin_kill

2019-03-28 Thread Dmitry Vyukov
On Wed, Mar 27, 2019 at 8:16 AM Amir Goldstein wrote: > > On Wed, Mar 27, 2019 at 5:53 AM syzbot > wrote: > > > > syzbot has bisected this bug to: > > > > commit e950564b97fd0f541b02eb207685d0746f5ecf29 > > Author: Miklos Szeredi > > Date: Tue Jul 24 13:01:55 2018 + > > > > vfs:

Re: possible deadlock in acct_pin_kill

2019-03-27 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+2a73a6ea9507b7112...@syzkaller.appspotmail.com Tested on: commit: 6c66f635 kernel/acct.c: fix locking order when switching a.. git tree:

Re: possible deadlock in acct_pin_kill

2019-03-27 Thread Amir Goldstein
On Wed, Mar 27, 2019 at 5:53 AM syzbot wrote: > > syzbot has bisected this bug to: > > commit e950564b97fd0f541b02eb207685d0746f5ecf29 > Author: Miklos Szeredi > Date: Tue Jul 24 13:01:55 2018 + > > vfs: don't evict uninitialized inode > > bisection log:

Re: possible deadlock in acct_pin_kill

2019-03-26 Thread syzbot
syzbot has bisected this bug to: commit e950564b97fd0f541b02eb207685d0746f5ecf29 Author: Miklos Szeredi Date: Tue Jul 24 13:01:55 2018 + vfs: don't evict uninitialized inode bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1212314320 start commit: da5322e6 Merge

Re: possible deadlock in acct_pin_kill

2018-11-16 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:da5322e65940 Merge tag 'selinux-pr-20181115' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10152c5d40 kernel config:

Re: possible deadlock in acct_pin_kill

2018-11-16 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:da5322e65940 Merge tag 'selinux-pr-20181115' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10152c5d40 kernel config:

Re: possible deadlock in acct_pin_kill

2018-11-15 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:da5322e65940 Merge tag 'selinux-pr-20181115' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1570390540 kernel config:

Re: possible deadlock in acct_pin_kill

2018-11-15 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:da5322e65940 Merge tag 'selinux-pr-20181115' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1570390540 kernel config:

possible deadlock in acct_pin_kill

2018-09-27 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:46c163a036b4 Add linux-next specific files for 20180921 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17688a4e40 kernel config: https://syzkaller.appspot.com/x/.config?x=20ea07a946ad19d7

possible deadlock in acct_pin_kill

2018-09-27 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:46c163a036b4 Add linux-next specific files for 20180921 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17688a4e40 kernel config: https://syzkaller.appspot.com/x/.config?x=20ea07a946ad19d7