From owner-svn-src-stable@freebsd.org Thu Jan 14 01:50:07 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF80BA82382; Thu, 14 Jan 2016 01:50:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A0F151D4C; Thu, 14 Jan 2016 01:50:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0E1o6dw090373; Thu, 14 Jan 2016 01:50:06 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0E1o67J090372; Thu, 14 Jan 2016 01:50:06 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201601140150.u0E1o67J090372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 14 Jan 2016 01:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293866 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 01:50:07 -0000 Author: pfg Date: Thu Jan 14 01:50:06 2016 New Revision: 293866 URL: https://svnweb.freebsd.org/changeset/base/293866 Log: MFC r293683: ext4: mount panic from freeing invalid pointers Initialize the struct with those fields to zeroes on allocation, preventing the panic. Patch by: Damjan Jovanovic. PR: 206056 Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vfsops.c Thu Jan 14 01:42:09 2016 (r293865) +++ stable/10/sys/fs/ext2fs/ext2_vfsops.c Thu Jan 14 01:50:06 2016 (r293866) @@ -590,7 +590,7 @@ ext2_mountfs(struct vnode *devvp, struct * while Linux keeps the super block in a locked buffer. */ ump->um_e2fs = malloc(sizeof(struct m_ext2fs), - M_EXT2MNT, M_WAITOK); + M_EXT2MNT, M_WAITOK | M_ZERO); ump->um_e2fs->e2fs = malloc(sizeof(struct ext2fs), M_EXT2MNT, M_WAITOK); mtx_init(EXT2_MTX(ump), "EXT2FS", "EXT2FS Lock", MTX_DEF);