Fix zfs_sb_teardown/zfs_resume_fs NULL dereference
authorTim Chase <tim@chase2k.com>
Tue, 25 Jun 2013 03:03:56 +0000 (22:03 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 1 Jul 2013 21:51:45 +0000 (14:51 -0700)
commitab68b6e5db29abcd20c0c7b12a8c2fa570031c8b
treeb63560481a046181a28132572591f4e406d89701
parent64d7b6cf75e52a4698d9bdec61745573c39d2e5a
Fix zfs_sb_teardown/zfs_resume_fs NULL dereference

Fix a pair of conditions in which a concurrent umount can cause
NULL pointer dereferences:

* zfs_sb_teardown - prevent a NULL dereference by not calling
                    dmu_objset_pool with a null z_os.

* zfs_resume_fs - don't try to unmount with a null z_os.  This
                  change makes the ZoL code more consistent
                  with both Illumos and FreeBSD.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1543
module/zfs/zfs_vfsops.c