Page MenuHomeFreeBSD

lio_listio(2): send signal even if number of jobs is zero
ClosedPublic

Authored by kib on Nov 30 2020, 1:30 PM.
Tags
None
Referenced Files
F103178480: D27421.diff
Thu, Nov 21, 10:49 PM
Unknown Object (File)
Oct 6 2024, 5:52 PM
Unknown Object (File)
Oct 6 2024, 1:53 PM
Unknown Object (File)
Oct 5 2024, 10:29 PM
Unknown Object (File)
Oct 5 2024, 1:54 PM
Unknown Object (File)
Oct 5 2024, 10:12 AM
Unknown Object (File)
Oct 5 2024, 10:05 AM
Unknown Object (File)
Oct 5 2024, 1:33 AM
Subscribers

Details

Summary

Right now, if lio registered zero jobs, syscall frees lio job structure, cleaning up queued ksi. As result, the realtime signal is dequeued and never delivered.

Fix it by allowing sendsig() to copy ksi when job count is zero.

Note that the same problem exists with the registered knote that is deleted from all kqueues on synchronous cleanup, but this one is harder to fix.

PR: 220398

NB. There are some style and comment fixes, I will commit this separately.

Diff Detail

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

Event Timeline

kib requested review of this revision.Nov 30 2020, 1:30 PM
kib retitled this revision from lio: send signal even if number of jobs is zero to lio_listio(2): send signal even if number of jobs is zero.Nov 30 2020, 1:31 PM
kib edited the summary of this revision. (Show Details)

Thanks! BTW, you should also remove the atf_tc_expect_timeout lines from the lio_listio_empty_nowait_signal and lio_listio_empty_nowait_thread in tests/sys/aio/lio_test.c. Optimistically, you should also remove the atf_tc_skip from lio_listio_empty_nowait_thread.

This revision is now accepted and ready to land.Dec 1 2020, 2:46 AM

I would prefer that you handle tests.

In D27421#612963, @kib wrote:

I would prefer that you handle tests.

Sure. I can fix them after you commit.

This revision was automatically updated to reflect the committed changes.