diff options
author | mm <mm@FreeBSD.org> | 2010-05-11 09:23:46 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2010-05-11 09:23:46 +0000 |
commit | b04969b5052ab3b206da93ad6527b8be438a79c6 (patch) | |
tree | a753e81a1cbfb3c364e066badcf53044795a2338 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c | |
parent | e1cc9b41b9e8f3f563009f99c0475b351678bfc1 (diff) | |
download | FreeBSD-src-b04969b5052ab3b206da93ad6527b8be438a79c6.zip FreeBSD-src-b04969b5052ab3b206da93ad6527b8be438a79c6.tar.gz |
Fix possible panic with zfs destroy.
OpenSolaris onnv revision: 8779:f164e0e90508
PR: kern/146471
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6784924)
MFC after: 3 days
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c index bf4ec12..1ad1cb5 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c @@ -554,6 +554,7 @@ dsl_dataset_own_obj(dsl_pool_t *dp, uint64_t dsobj, int flags, void *owner, return (err); if (!dsl_dataset_tryown(*dsp, DS_MODE_IS_INCONSISTENT(flags), owner)) { dsl_dataset_rele(*dsp, owner); + *dsp = NULL; return (EBUSY); } return (0); @@ -2584,7 +2585,7 @@ snaplist_destroy(list_t *l, boolean_t own) { struct promotenode *snap; - if (!list_link_active(&l->list_head)) + if (!l || !list_link_active(&l->list_head)) return; while ((snap = list_tail(l)) != NULL) { |