Re: [PATCH v2] ioctl_pidfd05: accept both EINVAL and ENOTTY as valid errors

From: Petr Vorel
Date: Fri Oct 24 2025 - 04:16:43 EST


Hi all,

> On Thu, 23 Oct 2025 at 18:44, Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> wrote:

> > Newer kernels (since ~v6.18-rc1) return ENOTTY instead of EINVAL when
> > invoking ioctl(pidfd, PIDFD_GET_INFO_SHORT, info_invalid). Update the
> > test to accept both EINVAL and ENOTTY as valid errors to ensure
> > compatibility across different kernel versions.

I dared to add a commit which caused the change (found by Cyril Hrubis):
3c17001b21b9f ("pidfs: validate extensible ioctls")

and merged!

Thanks for fix and review!

Kind regards,
Petr