[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161204071734.GI4497@leon.nu>
Date: Sun, 4 Dec 2016 09:17:34 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Pan Bian <bianpan201603@....com>
Cc: Yishai Hadas <yishaih@...lanox.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
Pan Bian <bianpan2016@....com>
Subject: Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value
On Sun, Dec 04, 2016 at 02:45:38PM +0800, Pan Bian wrote:
> From: Pan Bian <bianpan2016@....com>
>
> If uhw->inlen is non-zero, the value of variable err is 0 if the copy
> succeeds. Then, if kzalloc() or kmalloc() returns a NULL pointer, it
> will return 0 to the callers. As a result, the callers cannot detect the
> errors. This patch fixes the bug, assign "-ENOMEM" to err before the
> NULL pointer checks, and remove the initialization of err at the
> beginning.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189031
> Signed-off-by: Pan Bian <bianpan2016@....com>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...lanox.com>
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists