[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1502897557.33760.12.camel@redhat.com>
Date: Wed, 16 Aug 2017 11:32:37 -0400
From: Doug Ledford <dledford@...hat.com>
To: Parav Pandit <parav@...lanox.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
Colin Ian King <colin.king@...onical.com>
Cc: Lijun Ou <oulijun@...wei.com>, Wei Hu <xavier.huwei@...wei.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
On Tue, 2017-08-08 at 19:48 +0000, Parav Pandit wrote:
> 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.
This sounds like a nice patch to push into for-next, but in the
meantime I took the V2 of this patch as it silences a checker warning.
--
Doug Ledford <dledford@...hat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Powered by blists - more mailing lists