linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro@intel.com>
To: jgg@ziepe.ca, dledford@redhat.com
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>,
	linux-rdma@vger.kernel.org, stable@vger.kernel.org,
	"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
	Kamenee Arumugam <kamenee.arumugam@intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH for-rc 3/3] IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values
Date: Tue, 26 Jun 2018 11:19:19 -0400	[thread overview]
Message-ID: <cc4f30ab-3032-4220-ee41-2d547c8856fb@intel.com> (raw)
In-Reply-To: <20180620162904.13582.22527.stgit@scvm10.sc.intel.com>

On 6/20/2018 12:29 PM, Dennis Dalessandro wrote:
> From: Michael J. Ruhl <michael.j.ruhl@intel.com>
> 
> The __get_txreq() function can return a pointer, ERR_PTR(-EBUSY),
> or NULL.  All of the relevant call sites look for IS_ERR, so the
> NULL return would lead to a NULL pointer exception.
> 
> Do not use the ERR_PTR mechanism for this function.
> 
> Update all call sites to handle the return value correctly.
> 
> Clean up error paths to reflect return value.
> 
> cc: <stable@vger.kernel.org> # 4.9.x+
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
> Reviewed-by: Kamenee Arumugam <kamenee.arumugam@intel.com>
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>

Fixes: 45842abbb292 ("staging/rdma/hfi1: move txreq header code")

-Denny

  reply	other threads:[~2018-06-26 15:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 16:28 [PATCH for-rc 0/3] Dennis Dalessandro
2018-06-20 16:29 ` [PATCH for-rc 3/3] IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values Dennis Dalessandro
2018-06-26 15:19   ` Dennis Dalessandro [this message]
2018-06-26 20:37     ` Jason Gunthorpe
2018-06-20 16:33 ` [PATCH for-rc 0/3] Dennis Dalessandro
2018-06-20 18:43 ` Jason Gunthorpe
2018-06-26 15:20   ` Dennis Dalessandro
2018-06-26 20:41     ` Jason Gunthorpe

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=cc4f30ab-3032-4220-ee41-2d547c8856fb@intel.com \
    --to=dennis.dalessandro@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kamenee.arumugam@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.j.ruhl@intel.com \
    --cc=mike.marciniszyn@intel.com \
    --cc=stable@vger.kernel.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 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).