Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 5, 2012 at 9:26 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> On 01/05/2012 06:02 PM, Linus Torvalds wrote:
>>
>> +       return  ret == -EINVAL ||
>> +               ret == -ENOTTY ||
>> +               ret == ENOIOCTLCMD;
>
>
> Missing minus before ENOIOCTLCMD.

Oops, thanks, fixed.

Also, I do realize that the patch results in a warning about
"compat_ioctl_error()" no longer being used. I've removed it in my
tree, but I do wonder if we could perhaps have some kind of better
check, so maybe it is useful if somebody can come up with a saner way
to do it. Or at least a way that doesn't cause the kind of crazy code
that net/socket.c had.

And I notice that not only net/socket.c had workarounds for the bogus
warning, but fs/compat_ioctl.c itself does too: it's why we have those
IGNORE_IOCTL() entries.

So *maybe* we can reinstate that compat_ioctl_error() check, and just
remove the net/socket.c stuff, and make sure that all the ioctls that
net/socket.c had hacks for are mentioned as IGNORE_IOCTL's. Dunno.

Anybody have strong opinions either way? Has that printout helped
compat ioctl debugging a lot lately and we really want to maintain it?
Otherwise I'm inclined to remove it (we can always reinstate it later,
it's not like removal is necessarily final).

                            Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux