[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Aug 2017 19:48:01 +0000
From: Parav Pandit <parav@...lanox.com>
To: Johannes Thumshirn <jthumshirn@...e.de>,
Colin Ian King <colin.king@...onical.com>
CC: Lijun Ou <oulijun@...wei.com>, Wei Hu <xavier.huwei@...wei.com>,
"Doug Ledford" <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
"Hal Rosenstock" <hal.rosenstock@...il.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] IB/core: fix memory leak on ah on error return path
Hi,
I need to top post because comments are unrelated to past discussion.
rdma_ah_retrieve_dmac() can never fail for RoCE as its returning pointer from structure ah_attr.
Provider driver doesn't need to check for null pointer as ib/core would never call provider if it's not RoCE provider.
So this memory leak only exist in theory.
When its null, driver should WARN_ON/BUG_ON in extreme case, but that's not necessary either.
I have patch is progress under internal review that does nice small cleanup in many provider drivers that eliminates the check completely.
Waiting for Moni to finish the review.
Parav
> -----Original Message-----
> From: linux-rdma-owner@...r.kernel.org [mailto:linux-rdma-
> owner@...r.kernel.org] On Behalf Of Johannes Thumshirn
> Sent: Tuesday, August 08, 2017 7:59 AM
> To: Colin Ian King <colin.king@...onical.com>
> Cc: Lijun Ou <oulijun@...wei.com>; Wei Hu <xavier.huwei@...wei.com>;
> Doug Ledford <dledford@...hat.com>; Sean Hefty <sean.hefty@...el.com>;
> Hal Rosenstock <hal.rosenstock@...il.com>; linux-rdma@...r.kernel.org;
> kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] IB/core: fix memory leak on ah on error return path
>
> On Tue, Aug 08, 2017 at 11:28:16AM +0100, Colin Ian King wrote:
> > I was using the same subject start as the patch that introduced the
> > memory leak and touched the same portion of code. I can resend if necessary.
>
> I think having the hns prefix makes it clearer, as the patch doesn't touch IB core
> code but hns code. The reference to the patch which introduced the leak is given
> byu the fixes line.
>
> Thanks,
> Johannes
>
> --
> Johannes Thumshirn Storage
> jthumshirn@...e.de +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body
> of a message to majordomo@...r.kernel.org More majordomo info at
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.ke
> rnel.org%2Fmajordomo-
> info.html&data=02%7C01%7Cparav%40mellanox.com%7C4b396976866648806
> a1008d4de5d512c%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63
> 6377939837218186&sdata=l9u%2Bc6N9E31L2I%2BRDBLNh7KuPi%2Fb49yAlbvw
> qZvGruk%3D&reserved=0
Powered by blists - more mailing lists