lkml.org 
[lkml]   [2011]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices
On Thu, Dec 22, 2011 at 12:23 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> I disagree.  ENOTTY is perfect in all cases except the compat_ioctl (which
> I'm not denying is ugly, but beautifying it would make everything else
> ugly).

No it's not.

ENOTTTY isn't ever perfect. We should never have used it to begin with
inside the kernel.

Why would it make *anything* else uglier? Just return it, don't try to
change it anywhere. Does it break anything?

> Secondarily, ENOIOCTLCMD is ultimately turned into EINVAL when the system
> call returns (not ENOTTY).

That's a completely independent bug that has been discussed several
times. We probably should just bite the bullet and fix it. EINVAL is
never the right return value (unless the per-ioctl arguments
themselves are invalid, not for bad ioctls).

The EINVAL return comes from some people who didn't understand that
ENOTTY means "no such ioctl" despite the name.

But regardless, for your patch, it shouldn't matter.

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

\
 
 \ /
  Last update: 2011-12-22 21:55    [W:0.068 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site