linux/net
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
..
9p virtio: find_vqs/del_vqs virtio operations 2009-06-12 22:16:36 +09:30
802
8021q
appletalk net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
atm atm: sk_wmem_alloc initial value is one 2009-06-18 00:29:12 -07:00
ax25 net: Move rx skb_orphan call to where needed 2009-06-23 16:36:25 -07:00
bluetooth net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
bridge bridge: Simplify interface for ATM LANE 2009-06-11 21:03:21 -07:00
can
core net: Move rx skb_orphan call to where needed 2009-06-23 16:36:25 -07:00
dcb
dccp ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
decnet net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
dsa
econet net: sk_wmem_alloc has initial value of one, not zero 2009-06-17 04:31:25 -07:00
ethernet
ieee802154 ieee802154: use standard routine for printing dumps 2009-06-19 00:18:43 -07:00
ipv4 ipv4: fix NULL pointer + success return in route lookup path 2009-06-20 01:15:16 -07:00
ipv6 ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ipx net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
irda net: Move rx skb_orphan call to where needed 2009-06-23 16:36:25 -07:00
iucv af_iucv: Return -EAGAIN if iucv msg limit is exceeded 2009-06-19 00:10:40 -07:00
key net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
lapb
llc net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
mac80211 mac80211: fix wext bssid/ssid setting 2009-06-15 15:05:59 -04:00
netfilter netfilter: xt_rateest: fix comparison with self 2009-06-22 14:17:12 +02:00
netlabel
netlink net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
netrom net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
packet net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
phonet
rds
rfkill rfkill: export persistent attribute in sysfs 2009-06-19 11:50:18 -04:00
rose net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
rxrpc
sched net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
sctp ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
sunrpc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
tipc
unix net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
wanrouter
wimax wimax: fix warning caused by not checking retval of rfkill_set_hw_state() 2009-06-11 11:12:48 -07:00
wireless cfg80211: validate station settings 2009-06-19 11:50:24 -04:00
x25 net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE