net: fix skb_seq_read returning wrong offset/length for page frag data
authorThomas Chenault <thomas_chenault@dell.com>
Tue, 19 May 2009 04:43:27 +0000 (21:43 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:18 +0000 (20:01 -0700)
commitbe139f75e2bdd069a9f2429339a042021e53159d
treed0d56f305f3eb04f635d54db5d97dcc2eb174f39
parent7c2f7a2635a13a4b8c1efb93f599b2a4121f8b6d
net: fix skb_seq_read returning wrong offset/length for page frag data

[ Upstream commit 995b337952cdf7e05d288eede580257b632a8343 ]

When called with a consumed value that is less than skb_headlen(skb)
bytes into a page frag, skb_seq_read() incorrectly returns an
offset/length relative to skb->data. Ensure that data which should come
from a page frag does.

Signed-off-by: Thomas Chenault <thomas_chenault@dell.com>
Tested-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/core/skbuff.c