Skip to content

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

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

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

Conversation

@vfsci-bot
Copy link
Copy Markdown

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

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1090995
Submitter: Zhihao Cheng
Version: 2
Patches: 1/1
Message-ID: <20260507112301.1042757-1-chengzhihao1@huawei.com>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260507112301.1042757-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>
Reviewed-by: Yang Erkun <yangerkun@huawei.com>
@vfsci-bot
Copy link
Copy Markdown
Author

vfsci-bot Bot commented May 8, 2026

Superseded by series 1090990 (v1). Closing automatically.


Automated by ml2pr

@vfsci-bot vfsci-bot Bot closed this May 8, 2026
@vfsci-bot vfsci-bot Bot deleted the pw/1090995/vfs.base.ci branch May 8, 2026 19:16
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