Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542145

Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value

From Doug Ledford <dledford@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value
Date 2016-12-14 20:40 +0100
Message-ID <sOnzb-2MP-5@gated-at.bofh.it> (permalink)
References <sKyMx-3Ka-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 12/4/2016 1:45 AM, Pan Bian wrote:
> From: Pan Bian <bianpan2016@163.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@163.com>

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG Key ID: 0E572FDD

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value Doug Ledford <dledford@redhat.com> - 2016-12-14 20:40 +0100

csiph-web