Re: possible deadlock in start_this_handle (2)

2021-03-20 Thread Tetsuo Handa
Peter, would you answer to 6 questions listed below? Below is a reproducer kernel module (prefixed with "my_" for distinction) for https://syzkaller.appspot.com/bug?id=38c060d5757cbc13fdffd46e80557c645fbe79ba . -- test.c -- #include #include #include <../fs/ext4/ext4.h> static

Re: possible deadlock in start_this_handle (2)

2021-02-19 Thread harshad shirwadkar
On Fri, Feb 19, 2021 at 2:20 AM Tetsuo Handa wrote: > > On 2021/02/15 23:29, Jan Kara wrote: > > On Mon 15-02-21 23:06:15, Tetsuo Handa wrote: > >> On 2021/02/15 21:45, Jan Kara wrote: > >>> On Sat 13-02-21 23:26:37, Tetsuo Handa wrote: > Excuse me, but it seems to me that nothing prevents >

Re: possible deadlock in start_this_handle (2)

2021-02-19 Thread Tetsuo Handa
On 2021/02/15 23:29, Jan Kara wrote: > On Mon 15-02-21 23:06:15, Tetsuo Handa wrote: >> On 2021/02/15 21:45, Jan Kara wrote: >>> On Sat 13-02-21 23:26:37, Tetsuo Handa wrote: Excuse me, but it seems to me that nothing prevents ext4_xattr_set_handle() from reaching

Re: possible deadlock in start_this_handle (2)

2021-02-15 Thread Jan Kara
On Mon 15-02-21 23:06:15, Tetsuo Handa wrote: > On 2021/02/15 21:45, Jan Kara wrote: > > On Sat 13-02-21 23:26:37, Tetsuo Handa wrote: > >> Excuse me, but it seems to me that nothing prevents > >> ext4_xattr_set_handle() from reaching ext4_xattr_inode_lookup_create() > >> without

Re: possible deadlock in start_this_handle (2)

2021-02-15 Thread Tetsuo Handa
On 2021/02/15 21:45, Jan Kara wrote: > On Sat 13-02-21 23:26:37, Tetsuo Handa wrote: >> Excuse me, but it seems to me that nothing prevents >> ext4_xattr_set_handle() from reaching ext4_xattr_inode_lookup_create() >> without memalloc_nofs_save() when hitting ext4_get_nojournal() path. >> Will you

Re: possible deadlock in start_this_handle (2)

2021-02-15 Thread Jan Kara
On Sat 13-02-21 23:26:37, Tetsuo Handa wrote: > On 2021/02/11 19:49, Jan Kara wrote: > > This stacktrace should never happen. ext4_xattr_set() starts a transaction. > > That internally goes through start_this_handle() which calls: > > > > handle->saved_alloc_context = memalloc_nofs_save(); >

Re: possible deadlock in start_this_handle (2)

2021-02-13 Thread Tetsuo Handa
On 2021/02/11 19:49, Jan Kara wrote: > This stacktrace should never happen. ext4_xattr_set() starts a transaction. > That internally goes through start_this_handle() which calls: > > handle->saved_alloc_context = memalloc_nofs_save(); > > and we restore the allocation context only in

Re: possible deadlock in start_this_handle (2)

2021-02-13 Thread Dmitry Vyukov
On Fri, Feb 12, 2021 at 4:43 PM Michal Hocko wrote: > > On Fri 12-02-21 21:58:15, Tetsuo Handa wrote: > > On 2021/02/12 21:30, Michal Hocko wrote: > > > On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: > > >> On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > > >>> On 2021/02/12 1:41,

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Michal Hocko
On Fri 12-02-21 21:58:15, Tetsuo Handa wrote: > On 2021/02/12 21:30, Michal Hocko wrote: > > On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: > >> On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > >>> On 2021/02/12 1:41, Michal Hocko wrote: > But I suspect we have drifted away

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Tetsuo Handa
On 2021/02/12 22:12, Michal Hocko wrote: > On Fri 12-02-21 21:58:15, Tetsuo Handa wrote: >> On 2021/02/12 21:30, Michal Hocko wrote: >>> On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > On 2021/02/12 1:41, Michal Hocko wrote:

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Michal Hocko
On Fri 12-02-21 21:58:15, Tetsuo Handa wrote: > On 2021/02/12 21:30, Michal Hocko wrote: > > On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: > >> On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > >>> On 2021/02/12 1:41, Michal Hocko wrote: > But I suspect we have drifted away

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Tetsuo Handa
On 2021/02/12 21:30, Michal Hocko wrote: > On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: >> On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: >>> On 2021/02/12 1:41, Michal Hocko wrote: But I suspect we have drifted away from the original issue. I thought that a simple

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Michal Hocko
On Fri 12-02-21 12:22:07, Matthew Wilcox wrote: > On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > > On 2021/02/12 1:41, Michal Hocko wrote: > > > But I suspect we have drifted away from the original issue. I thought > > > that a simple check would help us narrow down this

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Matthew Wilcox
On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > On 2021/02/12 1:41, Michal Hocko wrote: > > But I suspect we have drifted away from the original issue. I thought > > that a simple check would help us narrow down this particular case and > > somebody messing up from the IRQ context

Re: possible deadlock in start_this_handle (2)

2021-02-12 Thread Tetsuo Handa
On 2021/02/12 1:41, Michal Hocko wrote: > But I suspect we have drifted away from the original issue. I thought > that a simple check would help us narrow down this particular case and > somebody messing up from the IRQ context didn't sound like a completely > off. > From my experience at

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Michal Hocko
On Thu 11-02-21 14:26:30, Matthew Wilcox wrote: > On Thu, Feb 11, 2021 at 03:20:41PM +0100, Michal Hocko wrote: > > On Thu 11-02-21 13:25:33, Matthew Wilcox wrote: > > > On Thu, Feb 11, 2021 at 02:07:03PM +0100, Michal Hocko wrote: > > > > On Thu 11-02-21 12:57:17, Matthew Wilcox wrote: > > > > >

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Matthew Wilcox
On Thu, Feb 11, 2021 at 03:20:41PM +0100, Michal Hocko wrote: > On Thu 11-02-21 13:25:33, Matthew Wilcox wrote: > > On Thu, Feb 11, 2021 at 02:07:03PM +0100, Michal Hocko wrote: > > > On Thu 11-02-21 12:57:17, Matthew Wilcox wrote: > > > > > current->flags should be always manipulated from the

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Michal Hocko
On Thu 11-02-21 13:25:33, Matthew Wilcox wrote: > On Thu, Feb 11, 2021 at 02:07:03PM +0100, Michal Hocko wrote: > > On Thu 11-02-21 12:57:17, Matthew Wilcox wrote: > > > > current->flags should be always manipulated from the user context. But > > > > who knows maybe there is a bug and some

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Matthew Wilcox
On Thu, Feb 11, 2021 at 02:07:03PM +0100, Michal Hocko wrote: > On Thu 11-02-21 12:57:17, Matthew Wilcox wrote: > > > current->flags should be always manipulated from the user context. But > > > who knows maybe there is a bug and some interrupt handler is calling it. > > > This should be easy to

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Dmitry Vyukov
On Thu, Feb 11, 2021 at 1:57 PM Matthew Wilcox wrote: > > > > > > Hello, > > > > > > > > > > > > added mm guys to CC. > > > > > > > > > > > > On Wed 10-02-21 05:35:18, syzbot wrote: > > > > > > > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > > > > > > > git tree:

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Michal Hocko
On Thu 11-02-21 12:57:17, Matthew Wilcox wrote: > On Thu, Feb 11, 2021 at 01:34:48PM +0100, Michal Hocko wrote: > > On Thu 11-02-21 13:10:20, Jan Kara wrote: > > > On Thu 11-02-21 12:28:48, Dmitry Vyukov wrote: > > > > On Thu, Feb 11, 2021 at 12:22 PM Dmitry Vyukov > > > > wrote: > > > > > > > >

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Matthew Wilcox
On Thu, Feb 11, 2021 at 01:34:48PM +0100, Michal Hocko wrote: > On Thu 11-02-21 13:10:20, Jan Kara wrote: > > On Thu 11-02-21 12:28:48, Dmitry Vyukov wrote: > > > On Thu, Feb 11, 2021 at 12:22 PM Dmitry Vyukov wrote: > > > > > > > > On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > > > > > >

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Michal Hocko
On Thu 11-02-21 13:10:20, Jan Kara wrote: > On Thu 11-02-21 12:28:48, Dmitry Vyukov wrote: > > On Thu, Feb 11, 2021 at 12:22 PM Dmitry Vyukov wrote: > > > > > > On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > > > > > > > Hello, > > > > > > > > added mm guys to CC. > > > > > > > > On Wed

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Jan Kara
On Thu 11-02-21 12:28:48, Dmitry Vyukov wrote: > On Thu, Feb 11, 2021 at 12:22 PM Dmitry Vyukov wrote: > > > > On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > > > > > Hello, > > > > > > added mm guys to CC. > > > > > > On Wed 10-02-21 05:35:18, syzbot wrote: > > > > HEAD commit:1e0d27fc

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Jan Kara
On Thu 11-02-21 12:22:39, Dmitry Vyukov wrote: > On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > > > Hello, > > > > added mm guys to CC. > > > > On Wed 10-02-21 05:35:18, syzbot wrote: > > > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > > > git tree: upstream > >

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Dmitry Vyukov
On Thu, Feb 11, 2021 at 12:22 PM Dmitry Vyukov wrote: > > On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > > > Hello, > > > > added mm guys to CC. > > > > On Wed 10-02-21 05:35:18, syzbot wrote: > > > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > > > git tree:

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Dmitry Vyukov
On Thu, Feb 11, 2021 at 11:49 AM Jan Kara wrote: > > Hello, > > added mm guys to CC. > > On Wed 10-02-21 05:35:18, syzbot wrote: > > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > > git tree: upstream > > console output:

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Michal Hocko
On Thu 11-02-21 11:49:47, Jan Kara wrote: > Hello, > > added mm guys to CC. > > On Wed 10-02-21 05:35:18, syzbot wrote: > > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt?x=15cbce90d0

Re: possible deadlock in start_this_handle (2)

2021-02-11 Thread Jan Kara
Hello, added mm guys to CC. On Wed 10-02-21 05:35:18, syzbot wrote: > HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=15cbce90d0 > kernel config:

possible deadlock in start_this_handle (2)

2021-02-10 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:1e0d27fc Merge branch 'akpm' (patches from Andrew) git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15cbce90d0 kernel config: https://syzkaller.appspot.com/x/.config?x=bd1f72220b2e57eb dashboard