DragonFly BSD
DragonFly kernel List (threaded) for 2005-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kernel: mfree: m->m_nextpkt != NULL


From: Noritoshi Demizu <demizu@xxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 15:55:14 +0900 (JST)

>     That looks right.  Nice catch guys!  Go ahead and commit any time.

I just committed the patch below.
Thanks to Dave, Jeroen, Jeff and Matt.

Regards,
Noritoshi Demizu


Index: netinet/ip_input.c
===================================================================
RCS file: /home/cvsup/DragonFlyBSD/dcvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.58
diff -u -r1.58 ip_input.c
--- netinet/ip_input.c	31 Aug 2005 22:21:23 -0000	1.58
+++ netinet/ip_input.c	21 Sep 2005 01:42:36 -0000
@@ -1233,6 +1233,7 @@
 		m->m_nextpkt = nq;
 		ipstat.ips_fragdropped++;
 		fp->ipq_nfrags--;
+		q->m_nextpkt = NULL;
 		m_freem(q);
 	}
 
@@ -1368,6 +1369,7 @@
 	while (fp->ipq_frags) {
 		q = fp->ipq_frags;
 		fp->ipq_frags = q->m_nextpkt;
+		q->m_nextpkt = NULL;
 		m_freem(q);
 	}
 	remque(fp);




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]