]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r339861:
authorshurd <shurd@FreeBSD.org>
Tue, 6 Nov 2018 20:46:00 +0000 (20:46 +0000)
committershurd <shurd@FreeBSD.org>
Tue, 6 Nov 2018 20:46:00 +0000 (20:46 +0000)
commite34c2dbbe3fbfd5dd4b12ae327de891889512d1d
tree8465d83f66b59ac0bc1aacaa1a832154b3feaa54
parentca587a7a9f631ddc7a9ead545e30def4d5922f90
MFC r339861:

Drain grouptaskqueue of the gtask before detaching it.

taskqgroup_detach() would remove the task even if it was running or
enqueued, which could lead to panics (see D17404). With this change,
taskqgroup_detach() drains the task and sets a new flag which prevents the
task from being scheduled again.

I've added grouptask_block() and grouptask_unblock() to allow control
over the flag from other locations as well.

Reviewed by: Jeffrey Pieper <jeffrey.e.pieper@intel.com>
Approved by: re (kib)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17674
sys/kern/subr_gtaskqueue.c
sys/sys/gtaskqueue.h