[PATCH 2/3] selinux: hooks: use __getname() to allocate path buffer

Paul Moore paul at paul-moore.com
Wed May 27 23:42:35 UTC 2026


On May 20, 2026 "Mike Rapoport (Microsoft)" <rppt at kernel.org> wrote:
> 
> 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 at kernel.org>
> ---
>  security/selinux/hooks.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Merged into selinux/dev, thanks.

--
paul-moore.com



More information about the Linux-security-module-archive mailing list