From: Jason Gunthorpe <jgg@ziepe.ca>
To: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: yuanxzhang@fudan.edu.cn, kjlu@umn.edu, leon@kernel.org,
Markus.Elfring@web.de, Xin Tan <tanxin.ctf@gmail.com>,
Faisal Latif <faisal.latif@intel.com>,
Shiraz Saleem <shiraz.saleem@intel.com>,
Doug Ledford <dledford@redhat.com>,
Shannon Nelson <shannon.nelson@intel.com>,
Anjali Singhai Jain <anjali.singhai@intel.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] infiniband: i40iw: fix a potential NULL pointer dereference
Date: Fri, 3 Jan 2020 20:01:28 -0400 [thread overview]
Message-ID: <20200104000128.GA20711@ziepe.ca> (raw)
In-Reply-To: <1577672668-46499-1-git-send-email-xiyuyang19@fudan.edu.cn>
On Mon, Dec 30, 2019 at 10:24:28AM +0800, Xiyu Yang wrote:
> A NULL pointer can be returned by in_dev_get(). Thus add
> a corresponding check so that a NULL pointer dereference
> will be avoided at this place.
>
> Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status")
> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> Changes in v2:
> - Release rtnl lock when in_dev_get return NULL
> Changes in v3:
> - Continue the next loop when in_dev_get return NULL
> Changes in v4:
> - Change commit message
>
> drivers/infiniband/hw/i40iw/i40iw_main.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied to for-next
And Shiraz, Leon is right, that trylock stuff is completely wrong,
let's fix it.
Jason
next prev parent reply other threads:[~2020-01-04 0:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 2:24 [PATCH v4] infiniband: i40iw: fix a potential NULL pointer dereference Xiyu Yang
2019-12-30 13:30 ` Markus Elfring
2020-01-02 16:09 ` Saleem, Shiraz
2020-01-04 0:01 ` Jason Gunthorpe [this message]
2020-01-07 2:08 ` Saleem, Shiraz
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=20200104000128.GA20711@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=Markus.Elfring@web.de \
--cc=anjali.singhai@intel.com \
--cc=dledford@redhat.com \
--cc=faisal.latif@intel.com \
--cc=kjlu@umn.edu \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shannon.nelson@intel.com \
--cc=shiraz.saleem@intel.com \
--cc=tanxin.ctf@gmail.com \
--cc=xiyuyang19@fudan.edu.cn \
--cc=yuanxzhang@fudan.edu.cn \
/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;
as well as URLs for NNTP newsgroup(s).