Skip to content

nsfs: fix wrong error code returned for pidns ioctls#1341

Open
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
pw/1090990/vfs.base.ci
Open

nsfs: fix wrong error code returned for pidns ioctls#1341
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
pw/1090990/vfs.base.ci

Conversation

@vfsci-bot
Copy link
Copy Markdown

@vfsci-bot vfsci-bot Bot commented May 7, 2026

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1090990
Submitter: Zhihao Cheng
Version: 1
Patches: 1/1
Message-ID: <20260507111404.638608-1-chengzhihao1@huawei.com>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260507111404.638608-1-chengzhihao1@huawei.com


Automated by ml2pr

When executing NS_GET_PID_FROM_PIDNS (or similar pidns ioctls), if the
target task cannot be found in the corresponding pid_ns, the error code
should be ESRCH instead of ENOTTY.

This bug was introduced when the extensible ioctl handling was added.
Without proper return, ret would be overwritten by the default case in
the extensible ioctl switch statement.

Fixes: a1d220d ("nsfs: iterate through mount namespaces")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants