* nvme: submit internal commands through the block layer
[not found] <20150526090815.GA32137@mwanda>
@ 2015-05-27 7:56 ` Christoph Hellwig
2015-05-27 10:47 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2015-05-27 7:56 UTC (permalink / raw)
On Tue, May 26, 2015@12:08:15PM +0300, Dan Carpenter wrote:
> drivers/block/nvme-core.c
> 853 */
> 854 if (ns && ns->ms && !blk_integrity_rq(req)) {
> ^^
> Patch adds a new check.
Correctly so ..
> 912 nvme_set_info(cmd, iod, req_completion);
> 913 spin_lock_irq(&nvmeq->q_lock);
> 914 if (req->cmd_type == REQ_TYPE_DRV_PRIV)
> 915 nvme_submit_priv(nvmeq, req, iod);
> 916 else if (req->cmd_flags & REQ_DISCARD)
> 917 nvme_submit_discard(nvmeq, ns, req, iod);
> ^^
> Dereferenced inside function.
>
> 918 else if (req->cmd_flags & REQ_FLUSH)
> 919 nvme_submit_flush(nvmeq, ns, req->tag);
We'll only get REQ_TYPE_DRV_PRIV requests through the passthrough
interface, so this is unrechable.
^ permalink raw reply [flat|nested] 2+ messages in thread
* nvme: submit internal commands through the block layer
2015-05-27 7:56 ` nvme: submit internal commands through the block layer Christoph Hellwig
@ 2015-05-27 10:47 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-05-27 10:47 UTC (permalink / raw)
On Wed, May 27, 2015@09:56:52AM +0200, Christoph Hellwig wrote:
> On Tue, May 26, 2015@12:08:15PM +0300, Dan Carpenter wrote:
> > drivers/block/nvme-core.c
> > 853 */
> > 854 if (ns && ns->ms && !blk_integrity_rq(req)) {
> > ^^
> > Patch adds a new check.
>
> Correctly so ..
>
> > 912 nvme_set_info(cmd, iod, req_completion);
> > 913 spin_lock_irq(&nvmeq->q_lock);
> > 914 if (req->cmd_type == REQ_TYPE_DRV_PRIV)
> > 915 nvme_submit_priv(nvmeq, req, iod);
> > 916 else if (req->cmd_flags & REQ_DISCARD)
> > 917 nvme_submit_discard(nvmeq, ns, req, iod);
> > ^^
> > Dereferenced inside function.
> >
> > 918 else if (req->cmd_flags & REQ_FLUSH)
> > 919 nvme_submit_flush(nvmeq, ns, req->tag);
>
> We'll only get REQ_TYPE_DRV_PRIV requests through the passthrough
> interface, so this is unrechable.
Thanks for looking into this, Christoph.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-27 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150526090815.GA32137@mwanda>
2015-05-27 7:56 ` nvme: submit internal commands through the block layer Christoph Hellwig
2015-05-27 10:47 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.