]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/pipe.c
pipe: return -ENOIOCTLCMD instead of -EINVAL on unknown ioctl command
authorWill Deacon <will.deacon@arm.com>
Fri, 25 May 2012 10:39:13 +0000 (11:39 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 31 May 2012 01:04:55 +0000 (21:04 -0400)
commit46ce341b2f176c2611f12ac390adf862e932eb02
tree17884033d37ddf08d20b69739aa5a3559c232fc0
parent3f50fff4dace23d3cfeb195d5cd4ee813cee68b7
pipe: return -ENOIOCTLCMD instead of -EINVAL on unknown ioctl command

As described in commit 07d106d0a ("vfs: fix up ENOIOCTLCMD error
handling"), drivers should return -ENOIOCTLCMD if they receive an ioctl
command which they don't understand. Doing so will result in -ENOTTY
being returned to userspace, which matches the behaviour of the compat
layer if it fails to translate an ioctl command.

This patch fixes the pipe ioctl to return -ENOIOCTLCMD instead of
-EINVAL when passed an unknown ioctl command.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/pipe.c