Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2010 12:50:03 GMT
From:      Pete French <pete@twisted.org.uk>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/149804: [icmp] [panic] ICMP redirect on causes "panic: rtqkill route really not free"
Message-ID:  <201009171250.o8HCo3h0047124@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/149804; it has been noted by GNATS.

From: Pete French <pete@twisted.org.uk>
To: bug-followup@FreeBSD.org,
 petefrench@ticketswitch.com
Cc:  
Subject: Re: kern/149804: [icmp] [panic] ICMP redirect on causes "panic: rtqkill route really not free"
Date: Fri, 17 Sep 2010 13:44:14 +0100

 Here is the patch I am currently using which makes the problem go away. =
 As states above, this was sent to me by Xin Li - it's not my own work!
 
 Index: sys/netinet/in_rmx.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- sys/netinet/in_rmx.c	(revision 211232)
 +++ sys/netinet/in_rmx.c	(working copy)
 @@ -121,12 +121,13 @@ in_matroute(void *v_arg, struct radix_node_head *h
  	struct radix_node *rn =3D rn_match(v_arg, head);
  	struct rtentry *rt =3D (struct rtentry *)rn;
 =20
 -	/*XXX locking? */
 -	if (rt && rt->rt_refcnt =3D=3D 0) {		/* this is first =
 reference */
 +	if (rt) {
 +		RT_LOCK(rt);
  		if (rt->rt_flags & RTPRF_OURS) {
  			rt->rt_flags &=3D ~RTPRF_OURS;
  			rt->rt_rmx.rmx_expire =3D 0;
  		}
 +		RT_UNLOCK(rt);
  	}
  	return rn;
  }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009171250.o8HCo3h0047124>