Re: [PATCH] pipe: return -ENOIOCTLCMD instead of -EINVAL on unknownioctl command

From: Alan Cox
Date: Fri May 25 2012 - 09:41:03 EST


On Fri, 25 May 2012 11:39:13 +0100
Will Deacon <will.deacon@xxxxxxx> wrote:

> 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@xxxxxxxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Will Deacon <will.deacon@xxxxxxx>

Acked-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/