All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Kumar <arvindkumar@vmware.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: VMware PV-Drivers <pv-drivers@vmware.com>,
	linux-scsi@vger.kernel.org,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	Josh Boyer <jwboyer@fedoraproject.org>
Subject: Re: DMA-API mapping errors in vmw_pvscsi
Date: Mon, 17 Mar 2014 13:56:55 -0700 (PDT)	[thread overview]
Message-ID: <325692752.47738484.1395089815603.JavaMail.root@vmware.com> (raw)
In-Reply-To: <1395076090.2227.29.camel@dabdike.int.hansenpartnership.com>

>It's missing checking in two places: from pci_map_single() and on
>scsi_dma_map().  In the latter case, pvscsi_map_buffers needs to return
>an error code and then pvscsi_queue_ring can return -1.

Agreed! And in addition to that pvscsi_queue_ring() also calls pci_map_single()
to map the sense buffer, which should also have the check. And if 
pvscsi_map_buffers() fails then we need to unmap the sense buffer too.

We already have an internal bug filed and we are working on this.

Thanks!
Arvind

----- Original Message -----
From: "James Bottomley" Bottomley@HansenPartnership.com>
To: "Josh Boyer" <jwboyer@fedoraproject.org>
Cc: "Arvind Kumar" <arvindkumar@vmware.com>, "VMware PV-Drivers" , linux-scsi@vger.kernel.org, "Linux-Kernel@Vger. Kernel. Org" vger.kernel.org>
Sent: Monday, March 17, 2014 10:08:10 AM
Subject: Re: DMA-API mapping errors in vmw_pvscsi

On Mon, 2014-03-17 at 12:52 -0400, Josh Boyer wrote:
> Hi All,
> 
> We've had a few reports[1][2] now on the vmw_pvscsi driver throwing
> DMA-API mapping errors when the DMA_API_DEBUG option is enabled.  I've
> included one from a recent 3.14-rc6 kernel below.  Looking at
> vmw_pvscsi.c, I can see pvscsi_map_buffers is missing the calls to
> pci_dma_mapping_error, which is what causes the warnings to be thrown.
> 
> However, I'm not familiar with this driver and I can't see what the
> proper error path should be in this case.  pvscsi_map_buffers is a
> void function and doesn't currently have the ability to return an
> error to the caller.  Even if it did, I'm not sure what the proper
> response to an error should be.  Thoughts?

It's missing checking in two places: from pci_map_single() and on
scsi_dma_map().  In the latter case, pvscsi_map_buffers needs to return
an error code and then pvscsi_queue_ring can return -1.

James

      reply	other threads:[~2014-03-17 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 16:52 DMA-API mapping errors in vmw_pvscsi Josh Boyer
2014-03-17 17:08 ` James Bottomley
2014-03-17 20:56   ` Arvind Kumar [this message]

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=325692752.47738484.1395089815603.JavaMail.root@vmware.com \
    --to=arvindkumar@vmware.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    /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 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.