HomeFreeBSD

Drain grouptaskqueue of the gtask before detaching it.

Description

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>
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17674

Details

Provenance
shurdAuthored on
Differential Revision
D17674: Drain grouptaskqueue of the gtask before detaching it.
Parents
rS339860: MFC r339600:
Branches
Unknown
Tags
Unknown