Re: [PATCH rdma-next v3 2/2] RDMA/umem: Refactor exit paths in ib_umem_get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 10, 2018 at 01:23:35PM +0000, Ruhl, Michael J wrote:
> >-----Original Message-----
> >From: Leon Romanovsky [mailto:leon@xxxxxxxxxx]
> >Sent: Tuesday, July 10, 2018 6:32 AM
> >To: Doug Ledford <dledford@xxxxxxxxxx>; Jason Gunthorpe
> ><jgg@xxxxxxxxxxxx>
> >Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-
> >rdma@xxxxxxxxxxxxxxx>; Huy Nguyen <huyn@xxxxxxxxxxxx>; Ruhl, Michael J
> ><michael.j.ruhl@xxxxxxxxx>
> >Subject: [PATCH rdma-next v3 2/2] RDMA/umem: Refactor exit paths in
> >ib_umem_get
> >
> >From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >
> >Simplify exit paths in ib_umem_get.
> >
> >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >---
> > drivers/infiniband/core/umem.c | 44 +++++++++++++++++++------------------
> >-----
> > 1 file changed, 20 insertions(+), 24 deletions(-)
> >

<...>

> >-	}
> >-
> > 	if (vma_list)
> > 		free_page((unsigned long) vma_list);
> > 	free_page((unsigned long) page_list);
>
> It appears that free_page() will protect against a 0 address.
>
> With that in mind, is the umem_kfree: target really necessary?

IMHO, it is easier for reader to see symmetric exit points.

>
> Either way:
>
> Reviewed-By: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>
>
> Mike

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux