On 19.10.20 08:28, Marc Kleine-Budde wrote:
On 10/18/20 10:46 AM, Oliver Hartkopp wrote:
Oh, answering myself ...
On 17.10.20 21:13, Oliver Hartkopp wrote:
On 16.10.20 21:36, Marc Kleine-Budde wrote:
On 2/14/20 1:09 PM, Oleksij Rempel wrote:
Hi all,
any comments on this patch?
I'm going to take this patch now for 5.10....Comments?
Yes.
Removing the sk reference will lead to the effect, that you will receive
the CAN frames you have sent on that socket - which is disabled by default:
https://elixir.bootlin.com/linux/latest/source/net/can/raw.c#L124
See concept here:
https://elixir.bootlin.com/linux/latest/source/Documentation/networking/can.rst#L560
How can we maintain the CAN_RAW_RECV_OWN_MSGS to be disabled by default
and fix the described problem?
+ nskb = skb_clone(skb, GFP_ATOMIC);
+ if (unlikely(!nskb)) {
+ kfree_skb(skb);
+ return NULL;
}
- /* we can assume to have an unshared skb with proper owner */
- return skb;
+ can_skb_set_owner(nskb, skb->sk);
skb-> sk is still set here - so everything should be fine.
Sorry for the noise.
Is this a Acked-by/Reviewed-by?
Yes.
Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
Thanks Marc!