Messages in this thread | | | Date | Fri, 10 Apr 1998 20:37:31 -0700 | From | "David S. Miller" <> | Subject | Re: patch for 2.1.92 net/socket.c et al |
| |
Date: Fri, 10 Apr 1998 19:46:49 -0700 From: Bill Hawes <whawes@transmeta.com>
Another tcp problem I spotted recently in tcp_do_sendmsg() concerns the calculation of mss_now. It's being set before entering the loop over the iovec components, but if the allocation of an skb has to wait for memory, the socket lock will be dropped and the value of mss_now might change. It's not likely, but could happen ...
I was thinking of fixing this by putting mss_now in the af_tcp structure and keeping it in sync whenever one of its dependencies change -- does this seem like a reasonable approach?
No, please. As a general rule, make adding a new thing to the sock or af_tcp struct the last choice, and only do it if all other options fail ;-)
I'd personally keep the current calculation scheme, and add the recalculation when returning from the sleep with the socket lock dropped.
Will you be syncing your network changes soon? I'd rather hold off further changes until you get your latest code posted.
Yes, I hope to do it tomorrow night. Stay tuned... but always feel free to feed me more patches (like a fix for the mss_now problem) anyways, I can make sure it goes in cleanly and handle conflicts if any, especially with the networking code.
Later, David S. Miller davem@dm.cobaltmicro.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |