From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F57C2D8382 for ; Tue, 17 Feb 2026 20:26:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771359997; cv=none; b=tvmJEFmPhimG/IU+9YB5xktlmngl/R2xZsGqXgVVpMv/uMfbRlL8yA9tHyWorMBYTFToNVvCsnLJuckOOtXzHE6iI4SEstV2FmjHBTCig1cekKzZHlgrtibvttPY0FavvmeEkzJsn1MuSESoYQvJnJNFxH5QychQnu+JHr/+87Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771359997; c=relaxed/simple; bh=srD6WOkQ94BgQVVeWT2K5qwtvkHAjtjmwb7CIVhlWdc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s5IjZwZkk3WL4DADQU1MtcoTIApU7cyQ1AdstrAQ8N/5OXg2N2tAzube4jOYepavA6EAcbUZfxtojnUmffF2WmY7gJR63wbRBV91G0nTkUVIfTkMagkNZgu3i+ZUMlklt1Lr6YzGHtA/22caGq4eBWS+gdVcWgsi1EnK0YYgHlI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0Nm6HDb1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PtyNL1Yc; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0Nm6HDb1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PtyNL1Yc; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0Nm6HDb1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PtyNL1Yc"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0Nm6HDb1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PtyNL1Yc" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4A7655BCEB; Tue, 17 Feb 2026 20:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1771359994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vK1h5Svw5aq5idzigSDQxU4eMvbeIsemOIltmqDzv7o=; b=0Nm6HDb1yZCpd34QKJKvlF7wIxNafD22n+4xRp0iSSvCwZie09i47NiMRxZxURhdRPIiHz lzRYnB5z6Co5XzWDsRadn7ijQWe/zy/pOuHAF67zGZxEauYlUIQ3ClSPaUU1rL3YXfjbco TsRHdmAq2/aIOuJxeQtkfv+vRzb3+TU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1771359994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vK1h5Svw5aq5idzigSDQxU4eMvbeIsemOIltmqDzv7o=; b=PtyNL1YcwQaHnCbs2C2FpvEDVG+px34x43BQBvMhQS/xqQ+D+ne8RAT99WarW6mjW9oXAj 0AJX7hGqHOXuHpAA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1771359994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vK1h5Svw5aq5idzigSDQxU4eMvbeIsemOIltmqDzv7o=; b=0Nm6HDb1yZCpd34QKJKvlF7wIxNafD22n+4xRp0iSSvCwZie09i47NiMRxZxURhdRPIiHz lzRYnB5z6Co5XzWDsRadn7ijQWe/zy/pOuHAF67zGZxEauYlUIQ3ClSPaUU1rL3YXfjbco TsRHdmAq2/aIOuJxeQtkfv+vRzb3+TU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1771359994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vK1h5Svw5aq5idzigSDQxU4eMvbeIsemOIltmqDzv7o=; b=PtyNL1YcwQaHnCbs2C2FpvEDVG+px34x43BQBvMhQS/xqQ+D+ne8RAT99WarW6mjW9oXAj 0AJX7hGqHOXuHpAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7AD233EA65; Tue, 17 Feb 2026 20:26:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0YytGvnOlGmNUAAAD6G6ig (envelope-from ); Tue, 17 Feb 2026 20:26:33 +0000 Message-ID: Date: Tue, 17 Feb 2026 21:26:27 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [net?] possible deadlock in inet6_getname To: Gerd Rausch , Eric Dumazet , syzbot , Allison Henderson 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 References: <698f15e6.a70a0220.2c38d7.00c1.GAE@google.com> <50e88063-14fb-4912-a65d-172a85def1ee@oracle.com> <1c5ce96c-3b01-44e0-8dc9-5c54e504cb95@suse.de> <4cd4099b-328d-45eb-990d-793df79cd639@oracle.com> <2677c7cb-efb7-4f19-8000-4ed127f33847@suse.de> <4acdfdf8-a69c-4020-8a8c-2edccd482a6b@oracle.com> <6d46a465-0f1f-48a3-8b4d-da063f6c45f3@oracle.com> Content-Language: en-US From: Fernando Fernandez Mancera In-Reply-To: <6d46a465-0f1f-48a3-8b4d-da063f6c45f3@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[5efae91f60932839f0a5]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spam-Level: 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 > >