[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Feb 2016 12:44:54 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: David Herrmann <dh.herrmann@...il.com>, Willy Tarreau <w@....eu>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Марк Коренберг
<socketpair@...il.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Simon McVittie <simon.mcvittie@...labora.co.uk>
Subject: Re: [PATCH v2] unix: properly account for FDs passed over unix sockets
On Tue, Feb 2, 2016 at 12:32 PM, Hannes Frederic Sowa
<hannes@...essinduktion.org> wrote:
>
> Unfortunately we never transfer a scm_cookie via the skbs but merely use it
> to initialize unix_skb_parms structure in skb->cb and destroy it afterwards.
Ok, I obviously didn't check very closely.
> But "struct pid *" in unix_skb_parms should be enough to get us to
> corresponding "struct cred *" so we can decrement the correct counter during
> skb destruction.
Umm. I think the "struct cred" may change in between, can't it?
So I don't think you can later look up the cred based on the pid.
Could we add the cred pointer (or just the user pointer) to the unix_skb_parms?
Or maybe just add it to the "struct scm_fp_list"?
Linus
Powered by blists - more mailing lists