From: Pavel Skripkin <paskripkin@gmail.com>
To: syzbot <syzbot+e979d3597f48262cb4ee@syzkaller.appspotmail.com>,
davem@davemloft.net, kgraul@linux.ibm.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] possible deadlock in smc_switch_to_fallback
Date: Sat, 20 Nov 2021 17:50:00 +0300 [thread overview]
Message-ID: <00588759-589d-3101-cc87-c0c327fb1c41@gmail.com> (raw)
In-Reply-To: <0000000000003c221105d12f69e3@google.com>
On 11/20/21 05:47, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9539ba4308ad Merge tag 'riscv-for-linus-5.16-rc2' of git:/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=17f79d01b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6d3b8fd1977c1e73
> dashboard link: https://syzkaller.appspot.com/bug?extid=e979d3597f48262cb4ee
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e979d3597f48262cb4ee@syzkaller.appspotmail.com
>
> ============================================
> WARNING: possible recursive locking detected
> 5.16.0-rc1-syzkaller #0 Not tainted
> --------------------------------------------
> syz-executor.3/1337 is trying to acquire lock:
> ffff88809466ce58 (&ei->socket.wq.wait){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
> ffff88809466ce58 (&ei->socket.wq.wait){..-.}-{2:2}, at: smc_switch_to_fallback+0x3d5/0x8c0 net/smc/af_smc.c:588
> > but task is already holding lock:
> ffff88809466c258 (&ei->socket.wq.wait){..-.}-{2:2}, at: smc_switch_to_fallback+0x3ca/0x8c0 net/smc/af_smc.c:587
> > other info that might help us debug this:
> Possible unsafe locking scenario:
>
> CPU0
> ----
> lock(&ei->socket.wq.wait);
> lock(&ei->socket.wq.wait);
>
There is simple code block in net/smc/af_smc.c:
spin_lock_irqsave(&smc_wait->lock, flags);
spin_lock(&clc_wait->lock);
list_splice_init(&smc_wait->head, &clc_wait->head);
spin_unlock(&clc_wait->lock);
spin_unlock_irqrestore(&smc_wait->lock, flags);
smc_wait and clc_wait are too different pointers (based on report), but
these 2 different wait_queue locks registered to lockdep map via
sock_alloc_inode(), where init_waitqueue_head(&ei->socket.wq.wait); is
called. So any nested wait_queue_head_t locking will cause lockdep warning.
Have no idea how to handle it, just my thoughts about root case :)
With regards,
Pavel Skripkin
prev parent reply other threads:[~2021-11-20 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-20 2:47 [syzbot] possible deadlock in smc_switch_to_fallback syzbot
2021-11-20 3:48 ` Jakub Kicinski
2021-11-22 3:41 ` Wen Gu
2021-11-20 14:50 ` Pavel Skripkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00588759-589d-3101-cc87-c0c327fb1c41@gmail.com \
--to=paskripkin@gmail.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+e979d3597f48262cb4ee@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).