net: Fix frag_list handling in skb_seq_read
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Jan 2009 00:07:52 +0000 (16:07 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:46:24 +0000 (09:46 -0800)
commit4e9229c7efa9289d1179de4aab356c2738a49be2
tree663ef27a8e4aaf719ee92a7871abce43416227c6
parent80156b7e084cf364ce325d898f0b29de7ab24abc
net: Fix frag_list handling in skb_seq_read

[ Upstream commit 95e3b24cfb4ec0479d2c42f7a1780d68063a542a ]

The frag_list handling was broken in skb_seq_read:

1) We didn't add the stepped offset when looking at the head
are of fragments other than the first.

2) We didn't take the stepped offset away when setting the data
pointer in the head area.

3) The frag index wasn't reset.

This patch fixes both issues.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/core/skbuff.c