2017-12-03 20:24:41

by Eric Biggers

[permalink] [raw]
Subject: Re: possible deadlock in blk_trace_remove

On Sun, Nov 19, 2017 at 02:36:01AM -0800, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on
> d9e0e63d9a6f88440eb201e1491fcf730272c706
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> Use struct sctp_sack_info instead
>
> ============================================
> WARNING: possible recursive locking detected
> 4.14.0-rc8-next-20171110+ #40 Not tainted
> --------------------------------------------
> syz-executor6/21462 is trying to acquire lock:
> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81760261>]
> blk_trace_remove+0x21/0x40 kernel/trace/blktrace.c:373
>
> but task is already holding lock:
> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81763b38>]
> blk_trace_setup+0x38/0x70 kernel/trace/blktrace.c:606
>
> other info that might help us debug this:
> Possible unsafe locking scenario:

#syz fix: blktrace: fix trace mutex deadlock


2017-12-04 00:24:39

by Jens Axboe

[permalink] [raw]
Subject: Re: possible deadlock in blk_trace_remove

On 12/03/2017 01:24 PM, Eric Biggers wrote:
> On Sun, Nov 19, 2017 at 02:36:01AM -0800, syzbot wrote:
>> Hello,
>>
>> syzkaller hit the following crash on
>> d9e0e63d9a6f88440eb201e1491fcf730272c706
>> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
>> compiler: gcc (GCC) 7.1.1 20170620
>> .config is attached
>> Raw console output is attached.
>>
>> Unfortunately, I don't have any reproducer for this bug yet.
>>
>>
>> Use struct sctp_sack_info instead
>>
>> ============================================
>> WARNING: possible recursive locking detected
>> 4.14.0-rc8-next-20171110+ #40 Not tainted
>> --------------------------------------------
>> syz-executor6/21462 is trying to acquire lock:
>> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81760261>]
>> blk_trace_remove+0x21/0x40 kernel/trace/blktrace.c:373
>>
>> but task is already holding lock:
>> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81763b38>]
>> blk_trace_setup+0x38/0x70 kernel/trace/blktrace.c:606
>>
>> other info that might help us debug this:
>> Possible unsafe locking scenario:
>
> #syz fix: blktrace: fix trace mutex deadlock

This is fixed in current -git.

--
Jens Axboe

2017-12-04 00:44:34

by Eric Biggers

[permalink] [raw]
Subject: Re: possible deadlock in blk_trace_remove

On Sun, Dec 03, 2017 at 05:24:32PM -0700, Jens Axboe wrote:
> On 12/03/2017 01:24 PM, Eric Biggers wrote:
> > On Sun, Nov 19, 2017 at 02:36:01AM -0800, syzbot wrote:
> >> Hello,
> >>
> >> syzkaller hit the following crash on
> >> d9e0e63d9a6f88440eb201e1491fcf730272c706
> >> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> >> compiler: gcc (GCC) 7.1.1 20170620
> >> .config is attached
> >> Raw console output is attached.
> >>
> >> Unfortunately, I don't have any reproducer for this bug yet.
> >>
> >>
> >> Use struct sctp_sack_info instead
> >>
> >> ============================================
> >> WARNING: possible recursive locking detected
> >> 4.14.0-rc8-next-20171110+ #40 Not tainted
> >> --------------------------------------------
> >> syz-executor6/21462 is trying to acquire lock:
> >> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81760261>]
> >> blk_trace_remove+0x21/0x40 kernel/trace/blktrace.c:373
> >>
> >> but task is already holding lock:
> >> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81763b38>]
> >> blk_trace_setup+0x38/0x70 kernel/trace/blktrace.c:606
> >>
> >> other info that might help us debug this:
> >> Possible unsafe locking scenario:
> >
> > #syz fix: blktrace: fix trace mutex deadlock
>
> This is fixed in current -git.
>

I know, but syzbot needed to be told what commit fixes the bug.
See https://github.com/google/syzkaller/blob/master/docs/syzbot.md

2017-12-04 00:47:45

by Jens Axboe

[permalink] [raw]
Subject: Re: possible deadlock in blk_trace_remove

On 12/03/2017 05:44 PM, Eric Biggers wrote:
> On Sun, Dec 03, 2017 at 05:24:32PM -0700, Jens Axboe wrote:
>> On 12/03/2017 01:24 PM, Eric Biggers wrote:
>>> On Sun, Nov 19, 2017 at 02:36:01AM -0800, syzbot wrote:
>>>> Hello,
>>>>
>>>> syzkaller hit the following crash on
>>>> d9e0e63d9a6f88440eb201e1491fcf730272c706
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
>>>> compiler: gcc (GCC) 7.1.1 20170620
>>>> .config is attached
>>>> Raw console output is attached.
>>>>
>>>> Unfortunately, I don't have any reproducer for this bug yet.
>>>>
>>>>
>>>> Use struct sctp_sack_info instead
>>>>
>>>> ============================================
>>>> WARNING: possible recursive locking detected
>>>> 4.14.0-rc8-next-20171110+ #40 Not tainted
>>>> --------------------------------------------
>>>> syz-executor6/21462 is trying to acquire lock:
>>>> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81760261>]
>>>> blk_trace_remove+0x21/0x40 kernel/trace/blktrace.c:373
>>>>
>>>> but task is already holding lock:
>>>> (&q->blk_trace_mutex){+.+.}, at: [<ffffffff81763b38>]
>>>> blk_trace_setup+0x38/0x70 kernel/trace/blktrace.c:606
>>>>
>>>> other info that might help us debug this:
>>>> Possible unsafe locking scenario:
>>>
>>> #syz fix: blktrace: fix trace mutex deadlock
>>
>> This is fixed in current -git.
>>
>
> I know, but syzbot needed to be told what commit fixes the bug.
> See https://github.com/google/syzkaller/blob/master/docs/syzbot.md

Ah gotcha.

--
Jens Axboe

2017-12-04 03:48:06

by Mike Galbraith

[permalink] [raw]
Subject: Re: possible deadlock in blk_trace_remove

On Sun, 2017-12-03 at 17:47 -0700, Jens Axboe wrote:
> On 12/03/2017 05:44 PM, Eric Biggers wrote:
> >
> >>> #syz fix: blktrace: fix trace mutex deadlock
> >>
> >> This is fixed in current -git.
> >>
> >
> > I know, but syzbot needed to be told what commit fixes the bug.
> > See https://github.com/google/syzkaller/blob/master/docs/syzbot.md
>
> Ah gotcha.

"@syzbot fix: bla" syntax would have been intuitive.

-Mike