mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <fmancera@suse.de>
To: Gerd Rausch <gerd.rausch@oracle.com>,
	Eric Dumazet <edumazet@google.com>,
	syzbot <syzbot+5efae91f60932839f0a5@syzkaller.appspotmail.com>,
	Allison Henderson <allison.henderson@oracle.com>
Cc: davem@davemloft.net, dsahern@kernel.org, horms@kernel.org,
	kuba@kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] possible deadlock in inet6_getname
Date: Tue, 17 Feb 2026 21:26:27 +0100	[thread overview]
Message-ID: <da88f34d-8bfc-4517-aaf1-bfd0eca9c639@suse.de> (raw)
In-Reply-To: <6d46a465-0f1f-48a3-8b4d-da063f6c45f3@oracle.com>

On 2/17/26 7:58 PM, Gerd Rausch wrote:
> Hi,
> 
> +Allison
> 
> On 2026-02-17 09:28, Gerd Rausch wrote:
>> On 2026-02-17 09:19, Fernando Fernandez Mancera wrote:
>>> On 2/17/26 6:13 PM, Gerd Rausch wrote:
>>>> If someone were to change the code to pass in "fan_out == true"
>>>> from a context not already holding a socket lock,
>>>> would they remember to change rds_tcp_conn_slots_available()
>>>> to acquire that lock?
>>>>
>>>
>>> Usually kernel requires the developer to understand when do they need 
>>> to acquire a lock or not.
>>> Anyway, what would you suggest? To check whether we have acquired the 
>>> lock or not and do it conditionally?> 
>>
>> Something along those lines.
>>
>> Either a "_locked" version of "conn_slots_available" function pointer,
>> a parameter, or a check.
>>
>> What you suggested is fine though for the immediate syzbot need.
>>
> 
> FWIW, in UEK (the modified Linux kernel that Oracle uses),
> this issue reported by syzbot was addressed differently:
> 
> https://github.com/oracle/linux-uek/commit/a94abc444c487
> 
> The commit under discussion here originally came from:
> https://github.com/oracle/linux-uek/commit/ebf71f5b6c29c
> 
> and pre-dates:
> 9dfc685e0262 ("inet: remove races in inet{6}_getname()")
> 
> which is why UEK didn't have this deadlock issue reported by syszbot.
> 
> If the objective is to keep divergence of UEK and Upstream to a minimum,
> it may be worthwhile to consider adopting the same fix we carry in UEK.
>

I see, I don't really have a strong opinion here. Although, the solution 
at UEK seems a bit overkill to me. As RDS do not really need all the 
information that inet_getname() provides. It just needs the source port 
and it can be used without acquiring the lock (because it was already done).

The ideal solution to me would be the patch proposed here [1] + a 
comment on the shutdown path to remember the developer that acquiring a 
lock is needed to enable fan-out. Having said that, I cannot tell if it 
would be better to keep divergence of UEK and Upstream or be more 
efficient. I am leaving this dilemma to you and Allison and any other 
maintainer that would like to chime in.

Just let me know so I can a send a v2 of my proposed patch with a more 
detailed commit message and also a comment on the mentioned path.

[1] https://lore.kernel.org/netdev/20260216120804.14840-1-fmancera@suse.de/

Thanks,
Fernando.

> Thanks,
> 
>    Gerd
> 
> 


  reply	other threads:[~2026-02-17 20:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13 12:15 syzbot
2026-02-13 17:26 ` Eric Dumazet
2026-02-13 18:51   ` Gerd Rausch
2026-02-14 18:25     ` Fernando Fernandez Mancera
2026-02-17 16:59       ` Gerd Rausch
2026-02-17 17:03         ` Fernando Fernandez Mancera
2026-02-17 17:13           ` Gerd Rausch
2026-02-17 17:19             ` Fernando Fernandez Mancera
2026-02-17 17:28               ` Gerd Rausch
2026-02-17 18:58                 ` Gerd Rausch
2026-02-17 20:26                   ` Fernando Fernandez Mancera [this message]
2026-02-17 21:57                     ` Allison Henderson
2026-02-16 11:32 ` Fernando Fernandez Mancera
2026-02-16 11:45   ` syzbot

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=da88f34d-8bfc-4517-aaf1-bfd0eca9c639@suse.de \
    --to=fmancera@suse.de \
    --cc=allison.henderson@oracle.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gerd.rausch@oracle.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+5efae91f60932839f0a5@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

all inboxes | Powered by JetHome®