Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.6-branch] posix: eventfd: Fix unsetting internal flags in ioctl #71460

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Apr 13, 2024

Backport 325f22a~2..325f22a from #71344.

Fixes #71399

Commit e6eb0a7 ("posix: eventfd: revise locking, signaling, and
allocation") introduced a regression where the internal flags of an
event file descriptor would be erased when calling the F_SETFL ioctl
operation.

This includes the flag EFD_IN_USE_INTERNAL which determines whether
this file descriptor has been opened, thus effectively closing the
eventfd whenever one tries to change a flag.

Signed-off-by: Celina Sophie Kalus <[email protected]>
(cherry picked from commit 5bd86ea)
Add a test to protect against future regressions in the ioctl F_SETFL
operation of eventfd. Flags are set and unset and validity of the file
descriptor is checked by reading and writing.

Signed-off-by: Celina Sophie Kalus <[email protected]>
(cherry picked from commit 325f22a)
@zephyrbot zephyrbot added Backport Backport PR and backport failure issues area: POSIX POSIX API Library labels Apr 13, 2024
@zephyrbot zephyrbot requested review from cfriedt and ycsin April 13, 2024 10:01
@ycsin ycsin closed this Apr 14, 2024
@ycsin ycsin reopened this Apr 14, 2024
@henrikbrixandersen henrikbrixandersen added this to the v3.6.1 milestone Apr 22, 2024
@henrikbrixandersen henrikbrixandersen merged commit 33b431c into v3.6-branch Apr 23, 2024
44 checks passed
@nashif nashif deleted the backport-71344-to-v3.6-branch branch November 16, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants