diff options
| author | John Johansen <john.johansen@canonical.com> | 2026-10-29 08:13:55 -0700 |
|---|---|---|
| committer | John Johansen <john.johansen@canonical.com> | 2026-10-29 10:40:00 -0700 |
| commit | 97ba44a2aa4c7ab011a93ce94cb595200fe4ea4f (patch) | |
| tree | 8a4bdfc5b6beab9475860e464a6384a332a37927 /scripts/basic/split-include.c | |
| parent | 6ec46f8f1977d218bf2494ce276152b2d01424af (diff) | |
| download | linux-97ba44a2aa4c7ab011a93ce94cb595200fe4ea4f.tar.gz linux-97ba44a2aa4c7ab011a93ce94cb595200fe4ea4f.zip | |
apparmor: on failed load ensure profile files are removed before parent
The load interface does not guarantee the order profiles are loaded.
When a parent is loaded after its child, and the load fails, the
current code will issue a warning, and leak a dentry.
For the loaded set of profiles, ensure that on failure list is ordered
is traversed in reverse so any children processed after their parent
is freed first. We do not need to deal with the cases where the
children are processed before their parent, because either a parent
outside the list already exists or a dummy parent outside of the list
is created, and the list walk will not put those parents before their
children.
Fixes: 6ec46f8f1977d ("apparmor: remove fs entries created by a failed policy load")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
