Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices
From: Linus Torvalds
Date: Thu Jan 05 2012 - 11:16:25 EST
On Thu, Jan 5, 2012 at 5:18 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> Hence, changing scsi_verify_blk_ioctl to return ENOIOCTLCMD is not
> really possible.
What?
"We have a bug in the block IO layer, so we cannot possible fix
another problem?"
Whjat the f*ck is the logic there?
Just fix the *obvious* breakage in BLKROSET. It's clearly what the
code *intends* to do, it just didn't check for ENOIOCTLCMD.
In fact, fixing that BLKROSET case would make it much more obvious
*why* it has those error tests at all. And we really should try to
just remove the crazy EINVAL case, because it really is wrong - and
then fix any broken drivers that exposes.
It's a DISEASE how you seem to think that "we have ugly mistakes in
the kernel, SO LET'S ADD ANOTHER ONE".
That's not how we do things. We *fix* things, instead of making things
even *worse*.
Stop this insanity from spreading, instead of making it spread more!
Linus
--
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/