All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Pan Bian <bianpan201603-9Onoh4P/yGk@public.gmane.org>
Cc: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pan Bian <bianpan2016-9Onoh4P/yGk@public.gmane.org>
Subject: Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value
Date: Sun, 4 Dec 2016 09:17:34 +0200	[thread overview]
Message-ID: <20161204071734.GI4497@leon.nu> (raw)
In-Reply-To: <1480833938-6284-1-git-send-email-bianpan201603-9Onoh4P/yGk@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

On Sun, Dec 04, 2016 at 02:45:38PM +0800, Pan Bian wrote:
> From: Pan Bian <bianpan2016-9Onoh4P/yGk@public.gmane.org>
>
> 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-9Onoh4P/yGk@public.gmane.org>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Leon Romanovsky <leon@kernel.org>
To: Pan Bian <bianpan201603@163.com>
Cc: Yishai Hadas <yishaih@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pan Bian <bianpan2016@163.com>
Subject: Re: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value
Date: Sun, 4 Dec 2016 09:17:34 +0200	[thread overview]
Message-ID: <20161204071734.GI4497@leon.nu> (raw)
In-Reply-To: <1480833938-6284-1-git-send-email-bianpan201603@163.com>

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

On Sun, Dec 04, 2016 at 02:45:38PM +0800, 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,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-12-04  7:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-04  6:45 [PATCH 1/1] infiniband: hw: mlx4: fix improper return value Pan Bian
     [not found] ` <1480833938-6284-1-git-send-email-bianpan201603-9Onoh4P/yGk@public.gmane.org>
2016-12-04  7:17   ` Leon Romanovsky [this message]
2016-12-04  7:17     ` Leon Romanovsky
2016-12-14 19:35 ` Doug Ledford
  -- strict thread matches above, loose matches on Subject: below --
2016-12-04  5:49 Pan Bian
     [not found] ` <1480830544-5002-1-git-send-email-bianpan201603-9Onoh4P/yGk@public.gmane.org>
2016-12-04  6:15   ` Leon Romanovsky
2016-12-04  6:15     ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161204071734.GI4497@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bianpan2016-9Onoh4P/yGk@public.gmane.org \
    --cc=bianpan201603-9Onoh4P/yGk@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.