From: Christoph Hellwig <hch@infradead.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>,
Dmitry Vyukov <dvyukov@google.com>,
Johannes Thumshirn <jthumshirn@suse.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
syzkaller <syzkaller@googlegroups.com>,
Hannes Reinecke <hare@suse.de>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: scsi: BUG in scsi_init_io
Date: Sun, 19 Feb 2017 09:25:41 -0800 [thread overview]
Message-ID: <20170219172541.GA29867@infradead.org> (raw)
In-Reply-To: <20170219071522.GI29622@ZenIV.linux.org.uk>
On Sun, Feb 19, 2017 at 07:15:27AM +0000, Al Viro wrote:
> The root cause is unfixable without access to TARDIS and dose of
> antipsychotics sufficient to prevent /dev/sg API creation.
>
> What happens is that write to /dev/sg is given a request with non-zero
> ->iovec_count combined with zero ->dxfer_len. Or with ->dxferp pointing
> to an array full of empty iovecs.
>
> AFAICS, the minimal fix would be something like this:
>
> YAMissingSanityCheck in /dev/sg
>
> write permission to /dev/sg shouldn't be equivalent to the ability to trigger
> BUG_ON() while holding spinlocks...
Looks fine to me:
Reviewed-by: Christoph Hellwig <hch@lst.de>
The other thing we really need to consider is to finally merge the
SG_IO implementations for /dev/sg with the common block layer one.
next prev parent reply other threads:[~2017-02-19 17:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 8:55 scsi: BUG in scsi_init_io Dmitry Vyukov
2017-01-31 9:20 ` Johannes Thumshirn
2017-01-31 9:50 ` Dmitry Vyukov
2017-01-31 9:58 ` Johannes Thumshirn
2017-01-31 10:06 ` Dmitry Vyukov
2017-01-31 15:41 ` James Bottomley
2017-02-19 7:15 ` Al Viro
2017-02-19 17:25 ` Christoph Hellwig [this message]
2017-02-19 17:56 ` Linus Torvalds
2017-02-19 17:38 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170219172541.GA29867@infradead.org \
--to=hch@infradead.org \
--cc=dvyukov@google.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=syzkaller@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox