linux/net/irda
Herbert Xu d55d87fdff net: Move rx skb_orphan call to where needed
In order to get the tun driver to account packets, we need to be
able to receive packets with destructors set.  To be on the safe
side, I added an skb_orphan call for all protocols by default since
some of them (IP in particular) cannot handle receiving packets
destructors properly.

Now it seems that at least one protocol (CAN) expects to be able
to pass skb->sk through the rx path without getting clobbered.

So this patch attempts to fix this properly by moving the skb_orphan
call to where it's actually needed.  In particular, I've added it
to skb_set_owner_[rw] which is what most users of skb->destructor
call.

This is actually an improvement for tun too since it means that
we only give back the amount charged to the socket when the skb
is passed to another socket that will also be charged accordingly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Oliver Hartkopp <olver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 16:36:25 -07:00
..
ircomm net: Move rx skb_orphan call to where needed 2009-06-23 16:36:25 -07:00
irlan irlan: convert to net_device_ops 2009-03-21 19:19:16 -07:00
irnet Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
af_irda.c net: Move rx skb_orphan call to where needed 2009-06-23 16:36:25 -07:00
discovery.c irda: Fix a misalign access issue. (v2) 2008-05-13 23:25:57 -07:00
irda_device.c irda: net_device_ops ioctl fix 2009-03-21 19:19:14 -07:00
iriap.c irda: use get_unaligned_* helpers 2008-05-02 16:21:52 -07:00
iriap_event.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irias_object.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irlap.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irlap_event.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irlap_frame.c irda: Use SKB queue and list helpers instead of doing it by-hand. 2009-05-28 23:26:33 -07:00
irlmp.c irda: Fix a misalign access issue. (v2) 2008-05-13 23:25:57 -07:00
irlmp_event.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irlmp_frame.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irmod.c net: convert usage of packet_type to read_mostly 2009-03-10 05:22:43 -07:00
irnetlink.c irda: Use genl_register_family_with_ops() 2009-05-21 16:50:22 -07:00
irproc.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
irqueue.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
irsysctl.c net: '&' redux 2008-11-03 18:21:05 -08:00
irttp.c net: Make static 2008-12-10 15:18:31 -08:00
Kconfig [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
Makefile [IrDA]: Netlink layer. 2007-07-10 22:16:43 -07:00
parameters.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
qos.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
timer.c net: Make static 2008-12-10 15:18:31 -08:00
wrapper.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00