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)
Sun, Dec 15, 12:12 AM
Unknown Object (File)
Tue, Nov 26, 10:31 AM
Unknown Object (File)
Tue, Nov 26, 10:31 AM
Unknown Object (File)
Tue, Nov 26, 10:30 AM
Unknown Object (File)
Sun, Nov 24, 11:22 PM
Unknown Object (File)
Sun, Nov 24, 11:22 PM
Unknown Object (File)
Sun, Nov 24, 11:22 PM
Unknown Object (File)
Sun, Nov 24, 11:22 PM
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.