summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-08-29 08:16:57 +0000
committerdelphij <delphij@FreeBSD.org>2015-08-29 08:16:57 +0000
commit56f6e9f0242d6b38ab99c2672170c5b3cc5f0d13 (patch)
tree380d448403b72245c0f504a03f9871617976ba0c /sys/cddl
parent3809a94aebef3aa8a8baa58a1a213378630a7d8a (diff)
downloadFreeBSD-src-56f6e9f0242d6b38ab99c2672170c5b3cc5f0d13.zip
FreeBSD-src-56f6e9f0242d6b38ab99c2672170c5b3cc5f0d13.tar.gz
In r286705 (Illumos 5960/a2cdcdd), a separate thread is created with curproc
as parent. In the case of a send or receive, the curproc would be the userland application that issues the ioctl. This would trigger an assertion failure introduced in Solaris compatibility shims in r196458 when kernel is compiled with INVARIANTS. Fix this by using p0 (proc0 or kernel) as the parent thread when creating the kernel threads.
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
index 267aa35..ef13961 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
@@ -786,7 +786,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds,
to_arg.ds = to_ds;
to_arg.fromtxg = fromtxg;
to_arg.flags = TRAVERSE_PRE | TRAVERSE_PREFETCH;
- (void) thread_create(NULL, 0, send_traverse_thread, &to_arg, 0, curproc,
+ (void) thread_create(NULL, 0, send_traverse_thread, &to_arg, 0, &p0,
TS_RUN, minclsyspri);
struct send_block_record *to_data;
@@ -2446,7 +2446,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, struct file *fp, offset_t *voffp,
rwa.os = ra.os;
rwa.byteswap = drc->drc_byteswap;
- (void) thread_create(NULL, 0, receive_writer_thread, &rwa, 0, curproc,
+ (void) thread_create(NULL, 0, receive_writer_thread, &rwa, 0, &p0,
TS_RUN, minclsyspri);
/*
* We're reading rwa.err without locks, which is safe since we are the
OpenPOWER on IntegriCloud