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); _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"