From owner-cvs-all@FreeBSD.ORG Mon Sep 10 14:12:30 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ECB316A418; Mon, 10 Sep 2007 14:12:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A08F13C45D; Mon, 10 Sep 2007 14:12:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8AECUmv025525; Mon, 10 Sep 2007 14:12:30 GMT (envelope-from bz@repoman.freebsd.org) Received: (from bz@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8AECUxd025524; Mon, 10 Sep 2007 14:12:30 GMT (envelope-from bz) Message-Id: <200709101412.l8AECUxd025524@repoman.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 10 Sep 2007 14:12:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/ufs/ffs ffs_alloc.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2007 14:12:30 -0000 bz 2007-09-10 14:12:29 UTC FreeBSD src repository Modified files: sys/ufs/ffs ffs_alloc.c Log: Fix a DIV0 in case a large value for fs_avgfilesize or fs_avgfpdir is given (with newfs or tunefs) and dirsize overflows. In case dirsize is <= 0 because of an overflow set maxcontigdirs to 0 so it will be 1 later. This is what would happen for large fs_avgfilesize. [1] Identified with help from: roberto, pjd Submitted by: pjd [1] Approved by: re (rwatson) MFC after: 8 days Revision Changes Path 1.147 +4 -1 src/sys/ufs/ffs/ffs_alloc.c