]> Git Repo - linux.git/commit
can-raw: Fix skb_orphan_try handling
authorOliver Hartkopp <[email protected]>
Tue, 3 Aug 2010 07:31:48 +0000 (00:31 -0700)
committerDavid S. Miller <[email protected]>
Tue, 3 Aug 2010 07:31:48 +0000 (00:31 -0700)
commitcff0d6e6edac7672b3f915bb4fb59f279243b7f9
treea12b08344380a9f02c9d043b176b82e921266d6e
parent3578b0c8abc7bdb4f02152ce5db7e09d484c6866
can-raw: Fix skb_orphan_try handling

Commit fc6055a5ba31e2c14e36e8939f9bf2b6d586a7f5 (net: Introduce
skb_orphan_try()) allows an early orphan of the skb and takes care on
tx timestamping, which needs the sk-reference in the skb on driver level.
So does the can-raw socket, which has not been taken into account here.

The patch below adds a 'prevent_sk_orphan' bit in the skb tx shared info,
which fixes the problem discovered by Matthias Fuchs here:

      http://marc.info/?t=128030411900003&r=1&w=2

Even if it's not a primary tx timestamp topic it fits well into some skb
shared tx context. Or should be find a different place for the information to
protect the sk reference until it reaches the driver level?

Signed-off-by: Oliver Hartkopp <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/linux/skbuff.h
net/can/raw.c
This page took 0.056079 seconds and 4 git commands to generate.