On 8/9/05, David S. Miller wrote: > > @@ -735,6 +737,9 @@ > > ssize_t res; > > struct sock *sk = sock->sk; > > > > + if (sk->sk_prot->sendpage) > > + return sk->sk_prot->sendpage(sk, page, offset, size, flags); > > + > > This doesn't make any sense, invoking sk->sk_prot->sendpage() > is what af_inet.c:inet_sendpage() did to get us to this function > (tcp_sendpage() in tcp.c), so this code will make us recurse > indefinitely into tcp_sendpage() over and over until we run out > of kernel stack.
Dave, TCP currently does not go through inet_sendpage, instead calling tcp_sendpage directly in af_inet.c. sk_prot->sendpage is NULL for TCP. Probably for historical reasons since struct proto's sendpage didn't exist in 2.4. If TCP vectors through inet_sendpage like the other protocols then this additional code won't be needed and indeed it would be a recursive call. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html