From owner-freebsd-current@FreeBSD.ORG Tue Feb 17 03:35:51 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ACE016A4CE for ; Tue, 17 Feb 2004 03:35:51 -0800 (PST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id B90DC43D1F for ; Tue, 17 Feb 2004 03:35:50 -0800 (PST) (envelope-from max@love2party.net) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1At3W2-0002Kn-00 for current@freebsd.org; Tue, 17 Feb 2004 12:35:50 +0100 Received: from [217.227.147.81] (helo=vampire.homelinux.org) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1At3W1-0004Vc-00 for current@freebsd.org; Tue, 17 Feb 2004 12:35:49 +0100 Received: (qmail 52714 invoked from network); 17 Feb 2004 11:40:06 -0000 Received: from unknown (HELO fbsd52.laiers.local) (192.168.4.88) by 192.168.4.1 with SMTP; 17 Feb 2004 11:40:06 -0000 From: Max Laier To: Jiri Mikulas Date: Tue, 17 Feb 2004 12:35:43 +0100 User-Agent: KMail/1.5.4 References: <200402170316.10258.max@love2party.net> <4031E1DA.7080208@mikulas.com> In-Reply-To: <4031E1DA.7080208@mikulas.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_PyfMA6/TB2eK3qS" Message-Id: <200402171235.43711.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e28873fbe4dbe612ce62ab869898ff08 cc: current@freebsd.org Subject: Re: PANIC: trap.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2004 11:35:51 -0000 --Boundary-00=_PyfMA6/TB2eK3qS Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tuesday 17 February 2004 10:41, Jiri Mikulas wrote: > I have CVSuped sources today morning (about 7:30 AM CET) > and i got panic exactly after boot > > ~~~cut~~~ > > I have no vmcore :( > This similar panic got Roman Divacky (xdivac02@stud.fit.vutbr.cz) with > todays current ,but without using dummynet.. > isn't it another independent problem ? Yes, that was something completely independent (and should be fixed now). For the dummynet issue, here comes an updated patchset I plan to commit soon. Give it a try if you have some time (make sure to get src/sys/sys/msgbuf.h#1.23 or 1.21 to avoid said boot panic). Thanks. -- Best regards, | mlaier@freebsd.org Max Laier | ICQ #67774661 http://pf4freebsd.love2party.net/ | mlaier@EFnet --Boundary-00=_PyfMA6/TB2eK3qS Content-Type: text/x-diff; charset="iso-8859-2"; name="mt_clean.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mt_clean.diff" Index: net/bridge.c =================================================================== RCS file: /cvsdrop/mlaier/fcvs/src/sys/net/bridge.c,v retrieving revision 1.74 diff -u -r1.74 bridge.c --- net/bridge.c 13 Feb 2004 19:14:15 -0000 1.74 +++ net/bridge.c 17 Feb 2004 11:07:48 -0000 @@ -921,7 +921,7 @@ DDB(quad_t ticks; ticks = rdtsc();) /* did we match a firewall rule ? */ - args.rule = ip_dn_find_rule(m0); + args.rule = ip_dn_claim_rule(m0); if (args.rule) shared = 0; /* For sure this is our own mbuf. */ else Index: net/if_ethersubr.c =================================================================== RCS file: /cvsdrop/mlaier/fcvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.157 diff -u -r1.157 if_ethersubr.c --- net/if_ethersubr.c 15 Feb 2004 21:27:27 -0000 1.157 +++ net/if_ethersubr.c 17 Feb 2004 11:08:10 -0000 @@ -322,7 +322,7 @@ int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { - struct ip_fw *rule = ip_dn_find_rule(m); + struct ip_fw *rule = ip_dn_claim_rule(m); if (rule == NULL && BDG_ACTIVE(ifp)) { /* @@ -605,7 +605,7 @@ #if defined(NETATALK) struct llc *l; #endif - struct ip_fw *rule = ip_dn_find_rule(m); + struct ip_fw *rule = ip_dn_claim_rule(m); KASSERT(ifp != NULL, ("ether_demux: NULL interface pointer")); Index: netinet/ip_dummynet.h =================================================================== RCS file: /cvsdrop/mlaier/fcvs/src/sys/netinet/ip_dummynet.h,v retrieving revision 1.29 diff -u -r1.29 ip_dummynet.h --- netinet/ip_dummynet.h 13 Feb 2004 22:26:36 -0000 1.29 +++ netinet/ip_dummynet.h 17 Feb 2004 11:07:01 -0000 @@ -356,9 +356,12 @@ * Return the IPFW rule associated with the dummynet tag; if any. */ static __inline struct ip_fw * -ip_dn_find_rule(struct mbuf *m) +ip_dn_claim_rule(struct mbuf *m) { struct m_tag *mtag = m_tag_find(m, PACKET_TAG_DUMMYNET, NULL); + /* Avoid confusion, but make sure we free the memory later. */ + if (mtag) + mtag->m_tag_id = PACKET_TAG_NONE; return mtag ? ((struct dn_pkt_tag *)(mtag+1))->rule : NULL; } #endif Index: netinet/ip_input.c =================================================================== RCS file: /cvsdrop/mlaier/fcvs/src/sys/netinet/ip_input.c,v retrieving revision 1.262 diff -u -r1.262 ip_input.c --- netinet/ip_input.c 13 Feb 2004 19:20:43 -0000 1.262 +++ netinet/ip_input.c 17 Feb 2004 11:07:25 -0000 @@ -320,7 +320,7 @@ args.eh = NULL; args.oif = NULL; args.next_hop = ip_claim_next_hop(m); - args.rule = ip_dn_find_rule(m); + args.rule = ip_dn_claim_rule(m); M_ASSERTPKTHDR(m); Index: netinet/ip_var.h =================================================================== RCS file: /cvsdrop/mlaier/fcvs/src/sys/netinet/ip_var.h,v retrieving revision 1.82 diff -u -r1.82 ip_var.h --- netinet/ip_var.h 13 Feb 2004 19:14:15 -0000 1.82 +++ netinet/ip_var.h 17 Feb 2004 11:03:47 -0000 @@ -207,7 +207,12 @@ struct m_tag *mtag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); if (mtag) { struct sockaddr_in *sin = *(struct sockaddr_in **)(mtag+1); - m_tag_delete(m, mtag); + /* + * Keep the tag in the SLIST in order to free the asociated + * memory with the mbuf, but remove the id to avoid + * confusion. + */ + mtag->m_tag_id = PACKET_TAG_NONE; return sin; } else return NULL; --Boundary-00=_PyfMA6/TB2eK3qS--