Re: [syzbot] [net?] possible deadlock in inet6_getname
From: Fernando Fernandez Mancera
Date: Tue Feb 17 2026 - 12:20:17 EST
On 2/17/26 6:13 PM, Gerd Rausch wrote:
Hi,
On 2026-02-17 09:03, Fernando Fernandez Mancera wrote:
rds_tcp_conn_slots_available() can also be called from rds_conn_shutdown(),
where no "rds_tcp.ko" backend specific lock is held.
AFAICS, from rds_conn_shutdown() path rds_tcp_conn_slots_available() is called with fan-out argument as false. Therefore, no need to get the peer source port.
I think that should be fine.
True, but IMHO subtle and error-prone.
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?
Thanks,
Fernando.
Thanks,
Gerd