[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3bbea91b-5b2b-4695-bb5d-793482f05e9f@rbox.co>
Date: Mon, 13 May 2024 11:14:39 +0200
From: Michal Luczaj <mhal@...x.co>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: billy@...rlabs.sg, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, kuni1840@...il.com, netdev@...r.kernel.org,
pabeni@...hat.com
Subject: Re: [PATCH v2 net] af_unix: Update unix_sk(sk)->oob_skb under
sk_receive_queue lock.
On 5/13/24 09:44, Kuniyuki Iwashima wrote:
> From: Michal Luczaj <mhal@...x.co>
> Date: Mon, 13 May 2024 08:40:34 +0200
>> What I'm talking about is the quoted above (unchanged) part in manage_oob():
>>
>> if (!WARN_ON_ONCE(skb_unref(skb)))
>> kfree_skb(skb);
>
> Ah, I got your point, good catch!
>
> Somehow I was thinking of new GC where alive recvq is not touched
> and lockdep would end up with false-positive.
>
> We need to delay freeing oob_skb in that case like below.
> ...
So this not a lockdep false positive after all?
Here's my understanding: the only way manage_oob() can lead to an inverted locking
order is when the receiver socket is _not_ in gc_candidates. And when it's not
there, no risk of deadlock. What do you think?
Powered by blists - more mailing lists