From: Jason Gunthorpe <jgg@nvidia.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: Kernel warning at drivers/infiniband/core/rw.c:349
Date: Wed, 13 Oct 2021 13:20:18 -0300 [thread overview]
Message-ID: <20211013162018.GI2744544@nvidia.com> (raw)
In-Reply-To: <6ff6b13c-d5c8-eec1-6949-5aabf28a5e68@deltatee.com>
On Wed, Oct 13, 2021 at 10:15:59AM -0600, Logan Gunthorpe wrote:
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 4b50d9a3018a..4ba642fc8a19 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -4097,8 +4097,13 @@ static inline int ib_dma_map_sgtable_attrs(struct ib_dev>
> enum dma_data_direction direction,
> unsigned long dma_attrs)
> {
> + int nents;
> +
> if (ib_uses_virt_dma(dev)) {
> - ib_dma_virt_map_sg(dev, sgt->sgl, sgt->orig_nents);
> + nents = ib_dma_virt_map_sg(dev, sgt->sgl, sgt->orig_nents);
> + if (!nents)
> + return -EIO;
> + sgt->nents = nents;
> return 0;
> }
Oh yes, that definitely looks needed.
Jason
next prev parent reply other threads:[~2021-10-13 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 0:07 Kernel warning at drivers/infiniband/core/rw.c:349 Bart Van Assche
2021-10-13 0:30 ` Logan Gunthorpe
2021-10-13 5:34 ` Bart Van Assche
2021-10-13 16:15 ` Logan Gunthorpe
2021-10-13 16:20 ` Jason Gunthorpe [this message]
2021-10-13 16:38 ` Bart Van Assche
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=20211013162018.GI2744544@nvidia.com \
--to=jgg@nvidia.com \
--cc=bvanassche@acm.org \
--cc=linux-rdma@vger.kernel.org \
--cc=logang@deltatee.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox