Re: [PATCH] mm/slab: fix probable issue of dentries registration under /sys/kernel/slab
From: Vladimir Zapolskiy
Date: Wed May 20 2026 - 04:56:19 EST
Hi Hao,
On 5/20/26 06:21, Hao Li wrote:
On Wed, May 20, 2026 at 04:10:19AM +0300, Vladimir Zapolskiy wrote:
L2TP/IP and L2TP/IPv6 protocol names contain a slash symbol, however these
names are blindly used as symlinks to slab cache objects registered under
/sys/kernel/slab. This kind of symlink creation is successful, but its
dentry is obviously broken, as well it breaks the access to the list of
/sys/kernel/slab dentries.
Likely L2TP protocol renames cannot be done, since the defined protocol
names are exposed over /proc/net/protocols for years, but the symlink
names can be renamed, because they are yet to be properly created, and
this should be eventually done by this change.
The problem manifests itself, if CONFIG_L2TP_IP build symbol is selected.
Hello, thanks for the patch.
Could L2TP possibly be loaded as a module? I noticed that
__kmem_cache_create_args can also call into sysfs_slab_alias. If L2TP is loaded
as a module after boot and dynamically creates a slub cache, it may bypass your
fix..
you're totally right, __kmem_cache_create_args execution path should also
be fixed, I'll send v2.
Thank you for review!
--
Best wishes,
Vladimir