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)
Tue, Apr 2, 12:35 AM
Unknown Object (File)
Feb 17 2024, 4:28 AM
Unknown Object (File)
Feb 16 2024, 11:56 PM
Unknown Object (File)
Feb 7 2024, 11:49 PM
Unknown Object (File)
Dec 28 2023, 2:05 PM
Unknown Object (File)
Dec 23 2023, 6:22 AM
Unknown Object (File)
Dec 22 2023, 11:31 AM
Unknown Object (File)
Dec 22 2023, 11:30 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.