From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:05:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D07712AF; Tue, 28 Apr 2015 17:05:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEC9819DF; Tue, 28 Apr 2015 17:05:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SH5unA092230; Tue, 28 Apr 2015 17:05:56 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SH5u8B092228; Tue, 28 Apr 2015 17:05:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504281705.t3SH5u8B092228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 28 Apr 2015 17:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282155 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:05:56 -0000 Author: melifaro Date: Tue Apr 28 17:05:55 2015 New Revision: 282155 URL: https://svnweb.freebsd.org/changeset/base/282155 Log: Fix panic introduced by r282070. Arm friendly KASSERT() to ease debug of similar crashes. Submitted by: Olivier Cochard-Labbé Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 28 17:02:43 2015 (r282154) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 28 17:05:55 2015 (r282155) @@ -1647,7 +1647,6 @@ check_ipfw_rule_body(ipfw_insn *cmd, int return EINVAL; if (cmdlen != F_INSN_SIZE(ipfw_insn_nat)) goto bad_size; - ci->object_opcodes++; goto check_action; case O_FORWARD_MAC: /* XXX not implemented yet */ case O_CHECK_STATE: Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Tue Apr 28 17:02:43 2015 (r282154) +++ head/sys/netpfil/ipfw/ip_fw_table.c Tue Apr 28 17:05:55 2015 (r282155) @@ -3399,6 +3399,10 @@ ref_rule_objects(struct ip_fw_chain *ch, IPFW_UH_WUNLOCK(ch); + KASSERT(found + unresolved == ci->object_opcodes, + ("refcount incosistency: found: %d unr: %d total: %d", + found, unresolved, ci->object_opcodes)); + /* Perform auto-creation for non-existing objects */ if (numnew != 0) error = create_objects_compat(ch, rule->cmd, oib, pidx, ti);