kthreads fixes for v6.14-rc2
Linus,
The following changes since commit 2014c95afecee3e76ca4a56956a936e23283f05b:
Linux 6.14-rc1 (2025-02-02 15:39:26 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git tags/kthreads-fixes-2025-02-04
for you to fetch changes up to 1b0332a42656b798bea867631d739de023633ec6:
kthread: Fix return value on kzalloc() failure in kthread_affine_preferred() (2025-02-04 01:42:27 +0100)
----------------------------------------------------------------
Fixes for kthreads
- Properly handle return value when allocation fails for the preferred affinity.
----------------------------------------------------------------
Yu-Chun Lin (1):
kthread: Fix return value on kzalloc() failure in kthread_affine_preferred()
kernel/kthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 3 lines · Frederic Weisbecker
- Properly handle return value when allocation fails for the preferred affinity.
Well, we have exactly one caller of this function, and that caller doesn't actually care about the return value.
The function is literally the "preferred" affinity. If the affinity setup fails, it's harmless.
Anyway, the fix doesn't look wrong, and I've pulled it, but it's just all very harmless. I think the "set but not used" error could have been fixed by just removing the 'ret' variable entirely.
Linus
Quoted 8 lines · Linus Torvalds
Quoted 3 lines · Frederic Weisbecker
- Properly handle return value when allocation fails for the preferred affinity.
Well, we have exactly one caller of this function, and that caller doesn't actually care about the return value.
Quoted 6 lines
The function is literally the "preferred" affinity. If the affinity setup fails, it's harmless.
Anyway, the fix doesn't look wrong, and I've pulled it, but it's just all very harmless. I think the "set but not used" error could have been fixed by just removing the 'ret' variable entirely.
Right, I wanted to be able to reflect failure just in case but the point of doing it is certainly debatable... Thanks for pulling it anyway!
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Frederic Weisbecker
- Properly handle return value when allocation fails for the preferred affinity.
Well, we have exactly one caller of this function, and that caller doesn't actually care about the return value.
Yeah that was my initial thought while sending the fix here:
https://lore.kernel.org/linux-kernel/[email protected]/
This patch hasn't appeared in next yet (next-20250204) so I missed this thread.
Quoted 10 lines
The function is literally the "preferred" affinity. If the affinity setup fails, it's harmless.
Anyway, the fix doesn't look wrong, and I've pulled it, but it's just all very harmless. I think the "set but not used" error could have been fixed by just removing the 'ret' variable entirely.
Linus
Signature · 3 lines
Best regards, Dhruva Gole Texas Instruments Incorporated
The pull request you sent on Tue, 4 Feb 2025 19:58:44 +0100:
The pull request you sent on Tue, 4 Feb 2025 19:58:44 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.gittags/kthreads-fixes-2025-02-04
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5c8c229261f14159b54b9a32f12e5fa89d88b905
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html