[PATCH bpf-next v1 06/11] selftests/bpf: exercise the path ancestor iterator
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Oct 13 16:56:31 UTC 2026
> Walk the ancestry of a mkdir's parent directory from a sleepable LSM
> program and check that the iteration reaches the root: the temporary
> directory, its parent and / are visited, no position comes back
> flagged, and the flags read back after the loop show it ended at the
> root rather than on a failed allocation.
>
> Hold the first position across the rest of the walk and resolve its
> pathname only once the loop is done and the iterator destroyed: the
> acquired reference, not the walk's, is then all that keeps the
> position alive.
>
> Signed-off-by: Justin Suess <utilityemal77 at gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013164800.2906577-1-utilityemal77@gmail.com?part=6
More information about the Linux-security-module-archive
mailing list