From: Yuval Shaia <yuval.shaia@oracle.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: john.hubbard@gmail.com, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/umem: minor bug fix in error handling path
Date: Tue, 5 Mar 2019 17:04:06 +0200 [thread overview]
Message-ID: <20190305150406.GA12098@lap1> (raw)
In-Reply-To: <20190304115814.GE30058@iweiny-DESK2.sc.intel.com>
On Mon, Mar 04, 2019 at 03:58:15AM -0800, Ira Weiny wrote:
> On Mon, Mar 04, 2019 at 11:46:45AM -0800, john.hubbard@gmail.com wrote:
> > From: John Hubbard <jhubbard@nvidia.com>
> >
> > 1. Bug fix: fix an off by one error in the code that
> > cleans up if it fails to dma-map a page, after having
> > done a get_user_pages_remote() on a range of pages.
> >
> > 2. Refinement: for that same cleanup code, release_pages()
> > is better than put_page() in a loop.
> >
> > Cc: Leon Romanovsky <leon@kernel.org>
> > Cc: Ira Weiny <ira.weiny@intel.com>
> > Cc: Jason Gunthorpe <jgg@ziepe.ca>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Doug Ledford <dledford@redhat.com>
> > Cc: linux-rdma@vger.kernel.org
> > Cc: linux-mm@kvack.org
> > Signed-off-by: John Hubbard <jhubbard@nvidia.com>
>
> I meant...
>
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
>
> <sigh> just a bit too quick on the keyboard before lunch... ;-)
>
> Ira
I have this mapping in vimrc so i just have to do shift+!
map ! o\rReviewed-by: Yuval Shaia <yuval.shaia@oracle.com>\r^[
>
>
> > ---
> > drivers/infiniband/core/umem_odp.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c
> > index acb882f279cb..d45735b02e07 100644
> > --- a/drivers/infiniband/core/umem_odp.c
> > +++ b/drivers/infiniband/core/umem_odp.c
> > @@ -40,6 +40,7 @@
> > #include <linux/vmalloc.h>
> > #include <linux/hugetlb.h>
> > #include <linux/interval_tree_generic.h>
> > +#include <linux/pagemap.h>
> >
> > #include <rdma/ib_verbs.h>
> > #include <rdma/ib_umem.h>
> > @@ -684,9 +685,11 @@ int ib_umem_odp_map_dma_pages(struct ib_umem_odp *umem_odp, u64 user_virt,
> > mutex_unlock(&umem_odp->umem_mutex);
> >
> > if (ret < 0) {
> > - /* Release left over pages when handling errors. */
> > - for (++j; j < npages; ++j)
> > - put_page(local_page_list[j]);
> > + /*
> > + * Release pages, starting at the the first page
> > + * that experienced an error.
> > + */
> > + release_pages(&local_page_list[j], npages - j);
> > break;
> > }
> > }
> > --
> > 2.21.0
> >
next prev parent reply other threads:[~2019-03-05 15:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 19:46 [PATCH v3 0/1] RDMA/umem: minor bug fix in error handling path john.hubbard
2019-03-04 19:46 ` [PATCH v3] " john.hubbard
2019-03-04 11:57 ` Ira Weiny
2019-03-04 11:58 ` Ira Weiny
2019-03-05 15:04 ` Yuval Shaia [this message]
2019-03-05 16:45 ` Leon Romanovsky
2019-03-04 19:53 ` Leon Romanovsky
2019-03-04 20:31 ` Jason Gunthorpe
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=20190305150406.GA12098@lap1 \
--to=yuval.shaia@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dledford@redhat.com \
--cc=ira.weiny@intel.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=john.hubbard@gmail.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).