[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110105.153812.242136718.davem@davemloft.net>
Date: Wed, 05 Jan 2011 15:38:12 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: torvalds@...ux-foundation.org
Cc: netdev@...r.kernel.org, jeremy@...p.org, jmorris@...ei.org
Subject: Re: Gaah: selinux_socket_unix_stream_connect oops
From: Linus Torvalds <torvalds@...ux-foundation.org>
Date: Wed, 5 Jan 2011 15:32:44 -0800
> On Wed, Jan 5, 2011 at 2:25 PM, David Miller <davem@...emloft.net> wrote:
>>
>> More seriously, we can get at the struct socket via sk->sk_socket in
>> the SMACK code. sk->sk_socket, unlike socket->sk, has it's state
>> change to NULL (via sock_orphen()) protected by unix_state_lock(),
>> which we hold for "other" in this unix connect code path.
>>
>> Therefore I propose we fix this like so:
>
> Looks fine to me.
>
> And no, I don't think that selinux is all the world, but selinux is
> the _common_ case, and with the cross-pointers, the only difference
> can be whether you need to dereference the pointer or not - so
> choosing the "extra dereference" case for the common case seems silly.
>
> The fact that this also fixes locking is obviously an even better
> reason to do it, though ;)
Right :)
I'll toss this your way during the merge window and queue it up for
later -stable submission as well.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists