Page MenuHomeFreeBSD

_taskqueue_start_threads() should only claim success if it starts a thread
ClosedPublic

Authored by pkelsey on Aug 29 2016, 9:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 6:19 AM
Unknown Object (File)
Tue, Oct 14, 10:19 AM
Unknown Object (File)
Tue, Oct 7, 3:36 AM
Unknown Object (File)
Wed, Sep 17, 3:18 AM
Unknown Object (File)
Sep 12 2025, 8:08 PM
Unknown Object (File)
Sep 9 2025, 1:04 PM
Unknown Object (File)
Sep 8 2025, 8:04 PM
Unknown Object (File)
Sep 5 2025, 7:04 AM
Subscribers

Details

Summary

_taskqueue_start_threads() should fail if it does not actually start
any threads, since you are left with a dead taskqueue that will
execute no tasks in that case.

It has contained the done-nothing-but-claimed-success path since it
appeared in 7.0.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pkelsey retitled this revision from to _taskqueue_start_threads() should only claim success if it starts a thread.
pkelsey updated this object.
pkelsey edited the test plan for this revision. (Show Details)
pkelsey added reviewers: jhb, mjg, scottl.
jhb edited edge metadata.

This looks correct though I'd be surprised if any code actually ran into it. (Or at least, if kthread_add() is failing your system is probably in trouble already.)

This revision is now accepted and ready to land.Aug 29 2016, 11:27 PM
In D7701#159878, @jhb wrote:

This looks correct though I'd be surprised if any code actually ran into it. (Or at least, if kthread_add() is failing your system is probably in trouble already.)

Agreed, as no fingers have been pointed at this since 7.0 and I noticed this reading code, not because I hit this case at runtime.

This revision was automatically updated to reflect the committed changes.