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
Unknown Object (File)
Jan 19 2024, 6:15 AM
Unknown Object (File)
Jan 13 2024, 11:30 AM
Unknown Object (File)
Dec 20 2023, 7:11 AM
Unknown Object (File)
Oct 2 2023, 11:16 PM
Unknown Object (File)
Sep 16 2023, 9:01 PM
Unknown Object (File)
Sep 16 2023, 8:59 PM
Unknown Object (File)
Sep 16 2023, 8:53 PM
Unknown Object (File)
Sep 15 2023, 3:58 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 35120

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.