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

(RHEL-55746) cgroup-util: Don't try to open pidfd for kernel threads #34

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

lnykryn
Copy link
Member

@lnykryn lnykryn commented Aug 22, 2024

No description provided.

Similar to the implementation of cgroup.kill in the kernel, let's
skip kernel threads in cg_kill_items() as trying to kill kernel
threads as an unprivileged process will fail with EPERM and doesn't
do anything when running privileged.

(cherry picked from commit 0fbb569de1dcc06118dba006cf7a40caf6cd94d0)

Resolves: RHEL-55746
The kernel might start returning -EINVAL when trying to open pidfd's
for kernel threads so let's not try to open pidfd's for kernel threads.

(cherry picked from commit ead48ec35c863650944352a3455f26ce3b393058)

Resolves: RHEL-55746
@github-actions github-actions bot changed the title cgroup-util: Don't try to open pidfd for kernel threads (RHEL-55746) cgroup-util: Don't try to open pidfd for kernel threads Aug 22, 2024
Copy link

github-actions bot commented Aug 22, 2024

Commit validation

Tracker - RHEL-55746

The following commits meet all requirements

commit upstream
6e840f6 - cgroup-util: Ignore kernel threads in cg_kill_items() systemd/systemd@0fbb569
03eb1e2 - cgroup-util: Don't try to open pidfd for kernel threads systemd/systemd@ead48ec
c619938 - cgroup-util: fix typo systemd/systemd@ec49646

Follow-up detection

Reverts

commit revert
03eb1e2 - cgroup-util: Don't try to open pidfd for kernel threads systemd/systemd@1ce69e0

Success

🟠 Mentions, Follow-ups and Revert commits - Waived


Tracker validation

Success

🟢 Tracker RHEL-55746 has set desired product: rhel-10.0.beta
🟢 Tracker RHEL-55746 has set desired component: systemd
🟢 Tracker RHEL-55746 has been approved


Pull Request validation

Success

🟢 CI - All checks have passed
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟢 Pull Request meet requirements, mergeable_state is clean
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

Follow-up for 0fbb569de1dcc06118dba006cf7a40caf6cd94d0.

(cherry picked from commit ec4964692ae0e080c596610adee2ddb83008c839)

Resolves: RHEL-55746
Copy link
Member

@msekletar msekletar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lnykryn
Copy link
Member Author

lnykryn commented Aug 22, 2024

This was reverted upstream because it is a workaround for kernel bugs. The kernel fixed this upstream, but we don't have that in el10 yet.

@github-actions github-actions bot merged commit d41b2bd into redhat-plumbers:main Aug 22, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants