linux/net
David S. Miller 51c739d1f4 [NET]: Fix incorrect sg_mark_end() calls.
This fixes scatterlist corruptions added by

	commit 68e3f5dd4d
	[CRYPTO] users: Fix up scatterlist conversion errors

The issue is that the code calls sg_mark_end() which clobbers the
sg_page() pointer of the final scatterlist entry.

The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().

After considering all skb_to_sgvec() call sites the most correct
solution is to call __sg_mark_end() in skb_to_sgvec() since that is
what all of the callers would end up doing anyways.

I suspect this might have fixed some problems in virtio_net which is
the sole non-crypto user of skb_to_sgvec().

Other similar sg_mark_end() cases were converted over to
__sg_mark_end() as well.

Arguably sg_mark_end() is a poorly named function because it doesn't
just "mark", it clears out the page pointer as a side effect, which is
what led to these bugs in the first place.

The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
and arguably it could be converted to __sg_mark_end() if only so that
we can delete this confusing interface from linux/scatterlist.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:29 -07:00
..
9p [9P]: Fix missing unlock before return in p9_mux_poll_start 2007-10-23 21:27:54 -07:00
802 [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
8021q [8021Q]: transfer dev_id from real device 2007-10-10 16:54:56 -07:00
appletalk [NET]: sparse warning fixes 2007-10-10 16:54:48 -07:00
atm [BR2684]: get rid of broken header code. 2007-10-17 19:39:22 -07:00
ax25 Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
bluetooth [Bluetooth] Convert RFCOMM to use kthread API 2007-10-22 02:59:49 -07:00
bridge Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
core [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
dccp [CCID2/3]: Initialisation assignments of 0 are redundant 2007-10-24 10:53:01 -02:00
decnet [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
econet [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
ethernet [NET]: Validate device addr prior to interface-up 2007-10-23 21:27:50 -07:00
ieee80211 SG: Change sg_set_page() to take length and offset argument 2007-10-24 11:20:47 +02:00
ipv4 [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
ipv6 [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
ipx [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
irda [IRDA]: Make ircomm_tty static. 2007-10-26 03:56:43 -07:00
iucv Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
key [IPSEC]: Lock state when copying non-atomic fields to user-space 2007-10-10 16:55:02 -07:00
lapb [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
llc Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
mac80211 [PATCH] mac80211: fix printk warning on 64-bit 2007-10-26 00:14:29 -04:00
netfilter Kbuild/doc: fix links to Documentation files 2007-10-30 14:26:30 -07:00
netlabel [NetLabel]: correct usage of RCU locking 2007-10-26 04:29:08 -07:00
netlink [NET]: Marking struct pernet_operations __net_initdata was inappropriate 2007-10-26 22:54:53 -07:00
netrom [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
packet [PACKET]: Kill unused pg_vec_endpage() function 2007-10-18 21:58:19 -07:00
rfkill get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
rose [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
rxrpc [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
sched [NET_CLS_ACT]: Use skb_act_clone 2007-10-26 02:47:54 -07:00
sctp SCTP endianness annotations regression 2007-10-29 07:41:32 -07:00
sunrpc [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
tipc [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
unix pid namespaces: changes to show virtual ids to user 2007-10-19 11:53:40 -07:00
wanrouter [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
wireless Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
x25 [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
xfrm [IPSEC]: Fix scatterlist handling in skb_icv_walk(). 2007-10-26 00:39:27 -07:00
compat.c O_CLOEXEC for SCM_RIGHTS 2007-07-16 09:05:45 -07:00
Kconfig [NET]: Add network namespace clone & unshare support. 2007-10-10 16:52:46 -07:00
Makefile 9p: Reorganization of 9p file system code 2007-07-14 15:13:40 -05:00
nonet.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
socket.c [NET]: Fix error reporting in sys_socketpair(). 2007-10-29 22:37:34 -07:00
sysctl_net.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
TUNABLE