Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Check for NULL for @to field in ops.yield() #222

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Check for NULL for @to field in ops.yield() #222

merged 2 commits into from
Jun 14, 2024

Conversation

Byte-Lab
Copy link
Collaborator

The @to field in ops.yield() can be NULL (when the callback is invoked)
on the yield_task_scx() path). Right now we're not communicating to the
verifier that the arg can be NULL, so if callers don't check for NULL it
can crash the host. Let's update ext.c to check. A subsequent patch will
add tests.

The @to field in ops.yield() can be NULL (when the callback is invoked)
on the yield_task_scx() path). Right now we're not communicating to the
verifier that the arg can be NULL, so if callers don't check for NULL it
can crash the host. Let's update ext.c to check. A subsequent patch will
add tests.

Signed-off-by: David Vernet <void@manifault.com>
Now that we've told the verifier about the second argument to
ops.yield(), let's add a test to verify the behavior.

Signed-off-by: David Vernet <void@manifault.com>
@Byte-Lab Byte-Lab requested a review from htejun June 14, 2024 01:26
@htejun htejun merged commit caa7501 into sched_ext Jun 14, 2024
1 check passed
@htejun htejun deleted the yield branch June 14, 2024 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants