]> git.ipfire.org Git - thirdparty/linux.git/commit
apparmor: fix boolean argument in apparmor_mmap_file
authorRyan Lee <ryan.lee@canonical.com>
Wed, 7 Jan 2026 19:48:54 +0000 (11:48 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 29 Jan 2026 09:27:53 +0000 (01:27 -0800)
commit48d5268e911abcf7674ec33c9b0b3e952be1175e
treed9a8fbd1d9e25408e94ed24563b262f0258258ad
parent8d34e16f7f2b51f880957f2caadaae731ee28867
apparmor: fix boolean argument in apparmor_mmap_file

The previous value of GFP_ATOMIC is an int and not a bool, potentially
resulting in UB when being assigned to a bool. In addition, the mmap hook
is called outside of locks (i.e. in a non-atomic context), so we can pass
a fixed constant value of false instead to common_mmap.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/lsm.c