[Devel] [PATCH hci-8.2 1/2] ms/ipc: create_ipc_ns: drop mqueue mount on sysctl setup failure

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 19 05:00:44 MSK 2026


> From: Vlad Kulikov <vlad.kulikov.c at gmail.com>
> 
> If setup_mq_sysctls(ns) fails after mq_init_ns(ns) succeeds, the error
> path skipped releasing the internal kernel mqueue mount kept in
> ns->mq_mnt. That leaves the vfsmount/superblock referenced until final
> namespace teardown, i.e. a resource leak on this rare failure edge.
> 
> Unwind it by calling mntput(ns->mq_mnt) before dropping user_ns and
> freeing the IPC namespace. This mirrors the normal ordering used in
> free_ipc_ns().
> 
> Link: https://lkml.kernel.org/r/20251021181341.670297-1-vlad_kulikov_c@pm.me
> Signed-off-by: Vlad Kulikov <vlad_kulikov_c at pm.me>
> Reviewed-by: Jan Kara <jack at suse.cz>
> Cc: Aleksa Sarai <cyphar at cyphar.com>
> Cc: Christian Brauner <brauner at kernel.org>
> Cc: David Hildenbrand <david at redhat.com>
> Cc: Ma Wupeng <mawupeng1 at huawei.com>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
> (cherry picked from commit 7229d74e5e8c1f140529d405c88d4493e37ce4e3)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155528
> Feature: fix ms/ipc
> 
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119015346.1173347-1-eva.kurchatova@virtuozzo.com?part=1




More information about the Devel mailing list