public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Steve Wise <larrystevenwise@gmail.com>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iw_cxgb4: potential NULL dereference in c4iw_fill_res_cm_id_entry()
Date: Tue, 14 Feb 2023 18:51:00 +0300	[thread overview]
Message-ID: <Y+ut5OhZFnIO2JtZ@kadam> (raw)
In-Reply-To: <Y+utb9JSKpgAeiWC@kili>

On Tue, Feb 14, 2023 at 06:49:03PM +0300, Dan Carpenter wrote:
> This condition needs to match the previous "if (epcp->state == LISTEN) {"
> exactly to avoid a NULL dereference of either "listen_ep" or "ep". The
> problem is that "epcp" has been re-assigned so just testing
> "if (epcp->state == LISTEN) {" a second time is not sufficient.
> 
> Fixes: 116aeb887371 ("iw_cxgb4: provide detailed provider-specific CM_ID information")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> >From static analysis, not from testing.  It's possible that the current
> code works but this change makes it more Obviously Correct[tm].
> 

Oops.  I accidentally sent this twice.  Sorry!

regards,
dan carpenter


  reply	other threads:[~2023-02-14 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 15:49 [PATCH] iw_cxgb4: potential NULL dereference in c4iw_fill_res_cm_id_entry() Dan Carpenter
2023-02-14 15:51 ` Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-14 15:43 Dan Carpenter
2023-02-15 11:37 ` 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=Y+ut5OhZFnIO2JtZ@kadam \
    --to=error27@gmail.com \
    --cc=bharat@chelsio.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=larrystevenwise@gmail.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@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