Thread (12 messages) flat view 12 messages, 4 authors, 2012-12-02

Re: [PATCH net] tcp: fix crashes in do_tcp_sendpages()

From: Joe Perches <joe@perches.com>
Date: 2012-12-02 01:43:04

On Sat, 2012-12-01 at 15:07 -0800, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>

Recent network changes allowed high order pages being used
for skb fragments.

This uncovered a bug in do_tcp_sendpages() which was assuming its caller
provided an array of order-0 page pointers.

We only have to deal with a single page in this function, and its order
is irrelevant.
[]
quoted hunk ↗ jump to hunk
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
[]
quoted hunk ↗ jump to hunk
@@ -830,8 +830,8 @@ static int tcp_send_mss(struct sock *sk, int *size_goal, int flags)
 	return mss_now;
 }
 
-static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset,
-			 size_t psize, int flags)
+static ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
+				size_t size, int flags)
Shouldn't this now be named do_tcp_sendpage ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help