pidfs: fix check for valid ioctl command

Pidfs supports extensible and non-extensible ioctls. The extensible
ioctls need to check for the ioctl number itself not just the ioctl
command otherwise both backward- and forward compatibility are broken.

Reported-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org # v6.13
Fixes: https://lore.kernel.org/r/CAG48ez2K9A5GwtgqO31u9ZL292we8ZwAA=TJwwEv7wRuJ3j4Lw@mail.gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
1 file changed