]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
apparmor: fix label can not be immediately before a declaration
authorJohn Johansen <john.johansen@canonical.com>
Sun, 14 Jun 2026 23:16:59 +0000 (16:16 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 15 Jun 2026 01:22:35 +0000 (18:22 -0700)
commit1ed40bd525c00d22af666016af9aef7167f8085f
treefa90877393e3a5fed49fb6ab2909d5a8d9f80cdd
parentd0691bd5dcaec2350039ecb04fa70faa91ac142d
apparmor: fix label can not be immediately before a declaration

Fix error reported by kernel test robot

security/apparmor/policy.c:1381:2: error: a label can only be part of
a statement and a declaration is not a statement

All errors (new ones prefixed by >>):

   security/apparmor/policy.c: In function 'aa_replace_profiles':
>> security/apparmor/policy.c:1381:2: error: a label can only be part
   of a statement and a declaration is not a statement
     ssize_t udata_sz = udata->size;
     ^~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606150525.npax8WiH-lkp@intel.com/
Fixes: 7b42f95813dc9 ("apparmor: fix potential UAF in aa_replace_profiles")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy.c