Re: [PATCH][2.5.22] OOPS in tcp_v6_get_port

3 messages, 3 authors, 2002-06-18 · open the first message on its own page

Re: [PATCH][2.5.22] OOPS in tcp_v6_get_port

From: Arnaldo Carvalho de Melo <hidden>
Date: 2002-06-18 00:57:49

Em Mon, Jun 17, 2002 at 02:33:19PM -0700, David S. Miller escreveu:
This is a known bug introduced by the struct sock splitup into
external per-protocol pieces done by Arnaldo de Melo.  He is working
on the proper fix, your proposed change will just paper over the real
bug.
Carl,

	Can you try this patch?

- Arnaldo
--- orig/net/ipv6/tcp_ipv6.c	Sat May 25 23:13:56 2002
+++ linux/net/ipv6/tcp_ipv6.c	Fri Jun 14 23:23:07 2002
@@ -1240,6 +1240,7 @@
 					  struct dst_entry *dst)
 {
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
+	struct tcp6_sock *newtcp6sk;
 	struct flowi fl;
 	struct inet_opt *newinet;
 	struct tcp_opt *newtp;
@@ -1256,10 +1257,15 @@
 		if (newsk == NULL) 
 			return NULL;
 
+		newtcp6sk = (struct tcp6_sock *)newsk;
+		newtcp6sk->pinet6 = &newtcp6sk->inet6;
+
 		newinet = inet_sk(newsk);
 		newnp = inet6_sk(newsk);
 		newtp = tcp_sk(newsk);
 
+		memcpy(newnp, np, sizeof(struct ipv6_pinfo));
+
 		ipv6_addr_set(&newnp->daddr, 0, 0, htonl(0x0000FFFF),
 			      newinet->daddr);
 
@@ -1336,9 +1342,15 @@
 	ip6_dst_store(newsk, dst, NULL);
 	sk->route_caps = dst->dev->features&~NETIF_F_IP_CSUM;
 
+	newtcp6sk = (struct tcp6_sock *)newsk;
+	newtcp6sk->pinet6 = &newtcp6sk->inet6;
+
 	newtp = tcp_sk(newsk);
 	newinet = inet_sk(newsk);
 	newnp = inet6_sk(newsk);
+
+	memcpy(newnp, np, sizeof(struct ipv6_pinfo));
+
 	ipv6_addr_copy(&newnp->daddr, &req->af.v6_req.rmt_addr);
 	ipv6_addr_copy(&newnp->saddr, &req->af.v6_req.loc_addr);
 	ipv6_addr_copy(&newnp->rcv_saddr, &req->af.v6_req.loc_addr);

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

Re: [PATCH][2.5.22] OOPS in tcp_v6_get_port

From: David S. Miller <hidden>
Date: 2002-06-18 02:17:26

   From: Arnaldo Carvalho de Melo [off-list ref]
   Date: Mon, 17 Jun 2002 21:57:35 -0300

   --- orig/net/ipv6/tcp_ipv6.c	Sat May 25 23:13:56 2002
   +++ linux/net/ipv6/tcp_ipv6.c	Fri Jun 14 23:23:07 2002

I've installed this change into my tree in the meantime.
If we find a better fix, we can just revert this.

Thanks.

Re: [PATCH][2.5.22] OOPS in tcp_v6_get_port

From: Carl Ritson <hidden>
Date: 2002-06-18 07:38:48

On Mon, 17 Jun 2002, Arnaldo Carvalho de Melo wrote:
Em Mon, Jun 17, 2002 at 02:33:19PM -0700, David S. Miller escreveu:
quoted
This is a known bug introduced by the struct sock splitup into
external per-protocol pieces done by Arnaldo de Melo.  He is working
on the proper fix, your proposed change will just paper over the real
bug.
I suspected something like that.
quoted hunk
Carl,

	Can you try this patch?

- Arnaldo
--- orig/net/ipv6/tcp_ipv6.c    Sat May 25 23:13:56 2002
+++ linux/net/ipv6/tcp_ipv6.c   Fri Jun 14 23:23:07 2002
<diff snipped> 
This patch doesn't help, it produces exactly the same oops when decoded, I 
assume the newer patch you mention to Dave is the correct fix?

Thanks,
Carl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help