* Update to 2.6.9-pre networking
@ 2004-08-19 5:47 David S. Miller
0 siblings, 0 replies; only message in thread
From: David S. Miller @ 2004-08-19 5:47 UTC (permalink / raw)
To: netdev
Two bugs fixed:
1) tcp_init_metrics needs to setup rtt_seq
2) ICMP xfrm changes were dereferencing user pointers directly
Available at:
bk://kernel.bkbits.net/davem/net-2.6
ftp.kernel.org:/pub/linux/kernel/people/davem/net-2.6.7-2.diff.gz
Enjoy.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/18 17:56:52-07:00 davem@nuts.davemloft.net
# [TCP]: When fetching srtt from metrics, do not forget to set rtt_seq.
#
# Otherwise RTT will end up being wrong for a long
# time, because tcp_rtt_estimator() requires that
# every time srtt is set, rtt_seq is set too.
#
# Signed-off-by: David S. Miller <davem@redhat.com>
#
# net/ipv4/tcp_input.c
# 2004/08/18 17:55:57-07:00 davem@nuts.davemloft.net +3 -1
# [TCP]: When fetching srtt from metrics, do not forget to set rtt_seq.
#
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c 2004-08-19 05:47:01 -07:00
+++ b/net/ipv4/tcp_input.c 2004-08-19 05:47:01 -07:00
@@ -852,8 +852,10 @@
* to low value, and then abruptly stops to do it and starts to delay
* ACKs, wait for troubles.
*/
- if (dst_metric(dst, RTAX_RTT) > tp->srtt)
+ if (dst_metric(dst, RTAX_RTT) > tp->srtt) {
tp->srtt = dst_metric(dst, RTAX_RTT);
+ tp->rtt_seq = tp->snd_nxt;
+ }
if (dst_metric(dst, RTAX_RTTVAR) > tp->mdev) {
tp->mdev = dst_metric(dst, RTAX_RTTVAR);
tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN);
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/18 22:17:01-07:00 davem@nuts.davemloft.net
# [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes.
#
# Signed-off-by: David S. Miller <davem@redhat.com>
#
# net/ipv6/raw.c
# 2004/08/18 22:16:27-07:00 davem@nuts.davemloft.net +4 -4
# [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes.
#
# net/ipv4/raw.c
# 2004/08/18 22:16:27-07:00 davem@nuts.davemloft.net +4 -4
# [IPV4/IPV6]: Fix direct user pointer deref in xfrm icmp changes.
#
diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c
--- a/net/ipv4/raw.c 2004-08-19 05:47:09 -07:00
+++ b/net/ipv4/raw.c 2004-08-19 05:47:09 -07:00
@@ -326,8 +326,8 @@
static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
{
struct iovec *iov;
- u8 *type = NULL;
- u8 *code = NULL;
+ u8 __user *type = NULL;
+ u8 __user *code = NULL;
int probed = 0;
int i;
@@ -354,8 +354,8 @@
code = iov->iov_base;
if (type && code) {
- fl->fl_icmp_type = *type;
- fl->fl_icmp_code = *code;
+ get_user(fl->fl_icmp_type, type);
+ __get_user(fl->fl_icmp_code, code);
probed = 1;
}
break;
diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c
--- a/net/ipv6/raw.c 2004-08-19 05:47:09 -07:00
+++ b/net/ipv6/raw.c 2004-08-19 05:47:09 -07:00
@@ -559,8 +559,8 @@
static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
{
struct iovec *iov;
- u8 *type = NULL;
- u8 *code = NULL;
+ u8 __user *type = NULL;
+ u8 __user *code = NULL;
int probed = 0;
int i;
@@ -587,8 +587,8 @@
code = iov->iov_base;
if (type && code) {
- fl->fl_icmp_type = *type;
- fl->fl_icmp_code = *code;
+ get_user(fl->fl_icmp_type, type);
+ __get_user(fl->fl_icmp_code, code);
probed = 1;
}
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-19 5:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 5:47 Update to 2.6.9-pre networking David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.