]> git.ipfire.org Git - thirdparty/linux.git/commit
selinux: hooks: use __getname() to allocate path buffer
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Wed, 20 May 2026 08:18:56 +0000 (11:18 +0300)
committerPaul Moore <paul@paul-moore.com>
Wed, 27 May 2026 23:42:40 +0000 (19:42 -0400)
commit54067bacb49caeada82b20b6bd706dca0cb99ffc
treee6b7b56c2fb28701c403e725a9b74b4f71543f1b
parentbc3f08d1ef15ebbd32faf0b10cd9699b90b9d30c
selinux: hooks: use __getname() to allocate path buffer

selinux_genfs_get_sid() allocates memory for a path with __get_free_page()
although there is a dedicated helper for allocation of file paths:
__getname().

Replace __get_free_page() for allocation of a path buffer with __getname().

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c