Re: possible deadlock in __do_page_fault (2)

2019-06-04 Thread Mimi Zohar
On Mon, 2019-06-03 at 15:04 -0700, syzbot wrote: > syzbot has bisected this bug to: > > commit 69d61f577d147b396be0991b2ac6f65057f7d445 > Author: Mimi Zohar > Date: Wed Apr 3 21:47:46 2019 + > > ima: verify mprotect change is consistent with mmap policy > > bisection log: https://sy

Re: possible deadlock in __do_page_fault (2)

2019-06-04 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:56b697c6 Add linux-next specific files for 20190604 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=12d210d4a0 kernel config: https://syzkaller.appspot.com/x/.config?x=4248d6bc70076

Re: possible deadlock in __do_page_fault (2)

2019-06-03 Thread syzbot
syzbot has bisected this bug to: commit 69d61f577d147b396be0991b2ac6f65057f7d445 Author: Mimi Zohar Date: Wed Apr 3 21:47:46 2019 + ima: verify mprotect change is consistent with mmap policy bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16461c5aa0 start commit: 3

Re: possible deadlock in __do_page_fault (2)

2019-06-03 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:3c09c195 Add linux-next specific files for 20190531 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=134e29dea0 kernel config: https://syzkaller.appspot.com/x/.config?x=6cfb24468280c

Re: possible deadlock in __do_page_fault

2019-01-29 Thread Tetsuo Handa
On 2019/01/29 1:45, Joel Fernandes wrote: >> freed += range_size(range); >> +mutex_unlock(&ashmem_mutex); >> +f->f_op->fallocate(f, >> + FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, >> + start, end - sta

Re: possible deadlock in __do_page_fault

2019-01-28 Thread Joel Fernandes
On Sat, Jan 26, 2019 at 01:02:06AM +0900, Tetsuo Handa wrote: > On 2019/01/24 22:46, Joel Fernandes wrote: > > On Thu, Jan 24, 2019 at 10:52:30AM +0900, Tetsuo Handa wrote: > >> Joel Fernandes wrote: > Anyway, I need your checks regarding whether this approach is waiting for > completion

Re: possible deadlock in __do_page_fault

2019-01-25 Thread Tetsuo Handa
On 2019/01/24 22:46, Joel Fernandes wrote: > On Thu, Jan 24, 2019 at 10:52:30AM +0900, Tetsuo Handa wrote: >> Then, I'm tempted to eliminate shrinker and LRU list (like a draft patch >> shown >> below). I think this is not equivalent to current code because this shrinks >> upon only range_alloc()

Re: possible deadlock in __do_page_fault

2019-01-25 Thread Tetsuo Handa
On 2019/01/24 22:46, Joel Fernandes wrote: > On Thu, Jan 24, 2019 at 10:52:30AM +0900, Tetsuo Handa wrote: >> Joel Fernandes wrote: Anyway, I need your checks regarding whether this approach is waiting for completion at all locations which need to wait for completion. >>> >>> I think you

Re: possible deadlock in __do_page_fault

2019-01-24 Thread Joel Fernandes
On Thu, Jan 24, 2019 at 10:52:30AM +0900, Tetsuo Handa wrote: > Joel Fernandes wrote: > > > Anyway, I need your checks regarding whether this approach is waiting for > > > completion at all locations which need to wait for completion. > > > > I think you are waiting in unwanted locations. The only

Re: possible deadlock in __do_page_fault

2019-01-23 Thread Tetsuo Handa
Joel Fernandes wrote: > > Anyway, I need your checks regarding whether this approach is waiting for > > completion at all locations which need to wait for completion. > > I think you are waiting in unwanted locations. The only location you need to > wait in is ashmem_pin_unpin. > > So, to my eyes

Re: possible deadlock in __do_page_fault

2019-01-23 Thread Joel Fernandes
On Wed, Jan 23, 2019 at 11:01:04AM +0900, Tetsuo Handa wrote: > Joel Fernandes wrote: > > > Why do we need to call fallocate() synchronously with ashmem_mutex held? > > > Why can't we call fallocate() asynchronously from WQ_MEM_RECLAIM workqueue > > > context so that we can call fallocate() with as

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Tetsuo Handa
Joel Fernandes wrote: > > Why do we need to call fallocate() synchronously with ashmem_mutex held? > > Why can't we call fallocate() asynchronously from WQ_MEM_RECLAIM workqueue > > context so that we can call fallocate() with ashmem_mutex not held? > > > > I don't know how ashmem works, but as fa

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Joel Fernandes
On Tue, Jan 22, 2019 at 07:02:35PM +0900, Tetsuo Handa wrote: > On 2018/09/22 8:21, Andrew Morton wrote: > > On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes > > wrote: > > > >> On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: > >>> > >>> +Joel Fernandes > >>> > >>> On Thu, Sep 20, 2018 at 2:1

Re: possible deadlock in __do_page_fault

2019-01-22 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: possible deadlock in __do_page_fault 8021q: adding VLAN 0 to HW filter on device team0 8021q: adding VLAN 0 to HW filter on device team0 8021q: adding VLAN 0 to HW filter on device team0 8021q: adding VLAN 0

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Dmitry Vyukov
On Tue, Jan 22, 2019 at 2:52 PM Dmitry Vyukov wrote: > > On Tue, Jan 22, 2019 at 11:32 AM Tetsuo Handa > wrote: > > > > On 2019/01/22 19:12, Dmitry Vyukov wrote: > > > On Tue, Jan 22, 2019 at 11:02 AM Tetsuo Handa > > > wrote: > > >> > > >> On 2018/09/22 8:21, Andrew Morton wrote: > > >>> On Thu

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Dmitry Vyukov
On Tue, Jan 22, 2019 at 11:32 AM Tetsuo Handa wrote: > > On 2019/01/22 19:12, Dmitry Vyukov wrote: > > On Tue, Jan 22, 2019 at 11:02 AM Tetsuo Handa > > wrote: > >> > >> On 2018/09/22 8:21, Andrew Morton wrote: > >>> On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes > >>> wrote: > >>> > On

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Tetsuo Handa
On 2019/01/22 19:12, Dmitry Vyukov wrote: > On Tue, Jan 22, 2019 at 11:02 AM Tetsuo Handa > wrote: >> >> On 2018/09/22 8:21, Andrew Morton wrote: >>> On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes >>> wrote: >>> On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: > > +Joel Fernande

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Dmitry Vyukov
On Tue, Jan 22, 2019 at 11:02 AM Tetsuo Handa wrote: > > On 2018/09/22 8:21, Andrew Morton wrote: > > On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes > > wrote: > > > >> On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: > >>> > >>> +Joel Fernandes > >>> > >>> On Thu, Sep 20, 2018 at 2:11 PM An

Re: possible deadlock in __do_page_fault

2019-01-22 Thread Tetsuo Handa
On 2018/09/22 8:21, Andrew Morton wrote: > On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes > wrote: > >> On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: >>> >>> +Joel Fernandes >>> >>> On Thu, Sep 20, 2018 at 2:11 PM Andrew Morton >>> wrote: Thanks. Let's cc the ashmem folk

Re: possible deadlock in __do_page_fault

2018-09-30 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:17b57b1883c1 Linux 4.19-rc6 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17920a7e40 kernel config: https://syzkaller.appspot.com/x/.config?x=c0af03fe452b65fb dashboard link: https:

Re: possible deadlock in __do_page_fault

2018-09-21 Thread Andrew Morton
On Thu, 20 Sep 2018 19:33:15 -0400 Joel Fernandes wrote: > On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: > > > > +Joel Fernandes > > > > On Thu, Sep 20, 2018 at 2:11 PM Andrew Morton > > wrote: > > > > > > > > > Thanks. Let's cc the ashmem folks. > > > > > This should be fixed by https:/

Re: possible deadlock in __do_page_fault

2018-09-20 Thread Dmitry Vyukov
On Fri, Sep 21, 2018 at 1:33 AM, Joel Fernandes wrote: > On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: >> >> +Joel Fernandes >> >> On Thu, Sep 20, 2018 at 2:11 PM Andrew Morton >> wrote: >> > >> > >> > Thanks. Let's cc the ashmem folks. >> > > > This should be fixed by https://patchwork.ker

Re: possible deadlock in __do_page_fault

2018-09-20 Thread Joel Fernandes
On Thu, Sep 20, 2018 at 5:12 PM Todd Kjos wrote: > > +Joel Fernandes > > On Thu, Sep 20, 2018 at 2:11 PM Andrew Morton > wrote: > > > > > > Thanks. Let's cc the ashmem folks. > > This should be fixed by https://patchwork.kernel.org/patch/10572477/ It has Neil Brown's Reviewed-by but looks lik

Re: possible deadlock in __do_page_fault

2018-09-20 Thread Todd Kjos
+Joel Fernandes On Thu, Sep 20, 2018 at 2:11 PM Andrew Morton wrote: > > > Thanks. Let's cc the ashmem folks. > > On Thu, 20 Sep 2018 14:04:05 -0700 syzbot > wrote: > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:a0cb0cabe4bb Add linux-next specific files for

Re: possible deadlock in __do_page_fault

2018-09-20 Thread Andrew Morton
Thanks. Let's cc the ashmem folks. On Thu, 20 Sep 2018 14:04:05 -0700 syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:a0cb0cabe4bb Add linux-next specific files for 20180920 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/l