public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@mellanox.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	Erez Shitrit <erezsh@mellanox.com>,
	Alex Vesker <valex@mellanox.com>,
	Dasaratharaman Chandramouli
	<dasaratharaman.chandramouli@intel.com>,
	Feras Daoud <ferasda@mellanox.com>,
	Zhu Yanjun <yanjun.zhu@oracle.com>,
	Shamir Rabinovitch <shamir.rabinovitch@oracle.com>,
	Paolo Abeni <pabeni@redhat.com>,
	David Ahern <dsa@cumulusnetworks.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] IB/IPoIB: Fix error code in ipoib_add_port()
Date: Thu, 13 Jul 2017 13:25:58 +0300	[thread overview]
Message-ID: <20170713102558.GM1528@mtr-leonro.local> (raw)
In-Reply-To: <20170713074548.i6cgpjhmmcnvtd5c@mwanda>

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

On Thu, Jul 13, 2017 at 10:45:48AM +0300, Dan Carpenter wrote:
> We accidentally don't see the error code on some of these error paths.
> It means we return ERR_PTR(0) which is NULL and it results in a NULL
> dereference in the caller.
>
> This bug dates to pre-git days.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 6e86eeee370e..ddd8114b6713 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -2212,6 +2212,7 @@ static struct net_device *ipoib_add_port(const char *format,

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

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

  reply	other threads:[~2017-07-13 10:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13  7:45 [PATCH] IB/IPoIB: Fix error code in ipoib_add_port() Dan Carpenter
2017-07-13 10:25 ` Leon Romanovsky [this message]
2017-07-22 17:27 ` Doug Ledford
2017-07-24  2:53 ` Yanjun Zhu

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=20170713102558.GM1528@mtr-leonro.local \
    --to=leonro@mellanox.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dasaratharaman.chandramouli@intel.com \
    --cc=dledford@redhat.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=erezsh@mellanox.com \
    --cc=ferasda@mellanox.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.hefty@intel.com \
    --cc=shamir.rabinovitch@oracle.com \
    --cc=valex@mellanox.com \
    --cc=yanjun.zhu@oracle.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox