]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Merge branch 'fix-sleepable-context-tracking-for-async-callbacks'
authorAlexei Starovoitov <ast@kernel.org>
Fri, 10 Oct 2025 17:04:51 +0000 (10:04 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Oct 2025 17:04:52 +0000 (10:04 -0700)
commit17566cf0e3629728b692e35213a4fd6ea9f86150
treed06ab313435df1dd7fa7e4ad36bf57815e7a06e3
parent56b4d162392dda2365fbc1f482184a24b489d07d
parent5b1b5d380ac7de39e9cb9de4209719b3949ebd3c
Merge branch 'fix-sleepable-context-tracking-for-async-callbacks'

Kumar Kartikeya Dwivedi says:

====================
Fix sleepable context tracking for async callbacks

Currently, asynchronous execution primitives set up their callback
execution simulation using push_async_cb, which will end up inheriting
the sleepable or non-sleepable bit from the program triggering the
simulation of the callback. This is incorrect, as the actual execution
context of the asynchronous callback has nothing to do with the program
arming its execution.

This set fixes this oversight, and supplies a few test cases ensuring
the correct behavior is tested across different types of primitives
(i.e. timer, wq, task_work).

While looking at this bug, it was noticed that the GFP flag setting
logic for storage_get helpers is also broken, hence fix it while we
are at it.

PSA: These fixes and unit tests were primarily produced by prompting an
AI assistant (Claude), and then modified in minor ways, in an exercise
to understand how useful it can be at general kernel development tasks.

Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/20251007014310.2889183-1-memxor@gmail.com

 * Squash fix for GFP flags into 1st commit. (Eduard)
 * Add a commit refactoring func_atomic to non_sleepable, make it
   generic, also set for kfuncs in addition to helpers. (Eduard)
 * Leave selftest as-is, coverage for global subprogs calling sleepable
   kfuncs or helpers is provided in rcu_read_lock.c.
====================

Link: https://patch.msgid.link/20251007220349.3852807-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>