Re: [PATCH net] af_key: unconditionally clone on broadcast

2019-02-12 Thread Steffen Klassert
On Mon, Feb 11, 2019 at 12:45:54PM -0800, David Miller wrote: > From: Sean Tranchetti > Date: Thu, 7 Feb 2019 13:33:21 -0700 > > > Attempting to avoid cloning the skb when broadcasting by inflating > > the refcount with sock_hold/sock_put while under RCU lock is dangerous > > and violates RCU pr

Re: [PATCH net] af_key: unconditionally clone on broadcast

2019-02-11 Thread David Miller
From: Sean Tranchetti Date: Thu, 7 Feb 2019 13:33:21 -0700 > Attempting to avoid cloning the skb when broadcasting by inflating > the refcount with sock_hold/sock_put while under RCU lock is dangerous > and violates RCU principles. It leads to subtle race conditions when > attempting to free the

[PATCH net] af_key: unconditionally clone on broadcast

2019-02-07 Thread Sean Tranchetti
Attempting to avoid cloning the skb when broadcasting by inflating the refcount with sock_hold/sock_put while under RCU lock is dangerous and violates RCU principles. It leads to subtle race conditions when attempting to free the SKB, as we may reference sockets that have already been freed by the