[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLhNzYUdtuaz9+ZHvwpbsK6gGfbCWmoic+ACQBVJafBXA@mail.gmail.com>
Date: Mon, 8 Sep 2025 02:40:25 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: syzbot <syzbot+e1cd6bd8493060bd701d@...kaller.appspotmail.com>,
Josef Bacik <josef@...icpanda.com>, Jens Axboe <axboe@...nel.dk>, davem@...emloft.net,
dsahern@...nel.org, horms@...nel.org, kuba@...nel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
ming.lei@...hat.com, netdev@...r.kernel.org, pabeni@...hat.com,
syzkaller-bugs@...glegroups.com, thomas.hellstrom@...ux.intel.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [syzbot] [net?] possible deadlock in inet_shutdown
On Mon, Sep 8, 2025 at 2:34 AM Yu Kuai <yukuai1@...weicloud.com> wrote:
>
> Hi,
>
> 在 2025/09/08 17:07, Eric Dumazet 写道:
> > On Mon, Sep 8, 2025 at 1:52 AM Yu Kuai <yukuai1@...weicloud.com> wrote:
> >>
> >> Hi,
> >>
> >> 在 2025/09/06 17:16, Eric Dumazet 写道:
> >>> On Fri, Sep 5, 2025 at 1:03 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >>>>
> >>>> On Fri, Sep 5, 2025 at 1:00 PM syzbot
> >>>> <syzbot+e1cd6bd8493060bd701d@...kaller.appspotmail.com> wrote:
> >>>
> >>> Note to NBD maintainers : I held about 20 syzbot reports all pointing
> >>> to NBD accepting various sockets, I can release them if needed, if you prefer
> >>> to triage them.
> >>>
> >> I'm not NBD maintainer, just trying to understand the deadlock first.
> >>
> >> Is this deadlock only possible for some sepecific socket types? Take
> >> a look at the report here:
> >>
> >> Usually issue IO will require the order:
> >>
> >> q_usage_counter -> cmd lock -> tx lock -> sk lock
> >>
> >
> > I have not seen the deadlock being reported with normal TCP sockets.
> >
> > NBD sets sk->sk_allocation to GFP_NOIO | __GFP_MEMALLOC;
> > from __sock_xmit(), and TCP seems to respect this.
> > .
> >
>
> What aboud iscsi and nvme-tcp? and probably other drivers, where
> sk_allocation is GFP_ATOMIC, do they have similar problem?
>
AFAIK after this fix, iscsi was fine.
commit f4f82c52a0ead5ab363d207d06f81b967d09ffb8
Author: Eric Dumazet <edumazet@...gle.com>
Date: Fri Sep 15 17:11:11 2023 +0000
scsi: iscsi_tcp: restrict to TCP sockets
Nothing prevents iscsi_sw_tcp_conn_bind() to receive file descriptor
pointing to non TCP socket (af_unix for example).
Return -EINVAL if this is attempted, instead of crashing the kernel.
Fixes: 7ba247138907 ("[SCSI] open-iscsi/linux-iscsi-5 Initiator:
Initiator code")
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Cc: Lee Duncan <lduncan@...e.com>
Cc: Chris Leech <cleech@...hat.com>
Cc: Mike Christie <michael.christie@...cle.com>
Cc: "James E.J. Bottomley" <jejb@...ux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: open-iscsi@...glegroups.com
Cc: linux-scsi@...r.kernel.org
Reviewed-by: Mike Christie <michael.christie@...cle.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Powered by blists - more mailing lists