]> git.ipfire.org Git - thirdparty/linux.git/commit
securityfs: use kstrdup_const() to manage symlink targets
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 17 Mar 2026 14:11:35 +0000 (17:11 +0300)
committerPaul Moore <paul@paul-moore.com>
Tue, 17 Mar 2026 21:13:36 +0000 (17:13 -0400)
commitd1a09195866890ed4b407bf17879d2f7fa72d9a7
tree9086f336b05294196a082f9abc63818ed445e983
parentfe3c03b84ae69f34992a5e72cbb8384b9ebad738
securityfs: use kstrdup_const() to manage symlink targets

Since 'target' argument of 'securityfs_create_symlink()' is (for
now at least) a compile-time constant, it may be reasonable to
use 'kstrdup_const()' / 'kree_const()' to manage 'i_link' member
of the corresponding inode in attempt to reuse .rodata instance
rather than making a copy.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/inode.c