From owner-cvs-src@FreeBSD.ORG Fri Jan 27 02:39:47 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A64D16A420; Fri, 27 Jan 2006 02:39:47 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD7DC43D48; Fri, 27 Jan 2006 02:39:46 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0R2dkJN067381; Fri, 27 Jan 2006 02:39:46 GMT (envelope-from csjp@repoman.freebsd.org) Received: (from csjp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0R2dkrj067380; Fri, 27 Jan 2006 02:39:46 GMT (envelope-from csjp) Message-Id: <200601270239.k0R2dkrj067380@repoman.freebsd.org> From: "Christian S.J. Peron" Date: Fri, 27 Jan 2006 02:39:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/netinet ip_fw2.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2006 02:39:47 -0000 csjp 2006-01-27 02:39:46 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/netinet ip_fw2.c Log: MFC revision 1.122 date: 2006/01/20 03:21:25; author: csjp; state: Exp; lines: +1 -0 Destroy the dynamic rule zone in the event that we fail to insert the initial default rule. MFC revision 1.123 date: 2006/01/20 05:35:27; author: csjp; state: Exp; lines: +25 -10 - Change the return type for init_tables from void to int so we can propagate errors from rn_inithead back to the ipfw initialization function. - Check return value of rn_inithead for failure, if table allocation has failed for any reason, free up any tables we have created and return ENOMEM - In ipfw_init check the return value of init_tables and free up any mutexes or UMA zones which may have been created. - Assert that the supplied table is not NULL before attempting to dereference. This fixes panics which were a result of invalid memory accesses due to failed table allocation. This is an issue mainly because the R_Zalloc function is a malloc(M_NOWAIT) wrapper, thus making it possible for allocations to fail. Found by: Coverity Prevent (tm) Coverity ID: CID79 MFC after: 1 week Revision Changes Path 1.106.2.9 +26 -10 src/sys/netinet/ip_fw2.c