]> git.baikalelectronics.ru Git - kernel.git/commit
pipe: return -ENOIOCTLCMD instead of -EINVAL on unknown ioctl command
authorWill Deacon <will.deacon@arm.com>
Thu, 31 May 2012 23:26:10 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 00:49:27 +0000 (17:49 -0700)
commit69f702f9367bac883cdfe687159ee220ac1da1b6
tree0785413b25f5383bf736d04169151e6a251dd079
parent7e702ac0b8549941aa36100926c39ad15945b859
pipe: return -ENOIOCTLCMD instead of -EINVAL on unknown ioctl command

As described in commit d7eaa2f6c0b8 ("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.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/pipe.c