public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Selvin Xavier <selvin.xavier@broadcom.com>,
	 Jason Gunthorpe <jgg@ziepe.ca>,
	Devesh Sharma <devesh.sharma@broadcom.com>,
	 Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>,
	 Michal Schmidt <mschmidt@redhat.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq
Date: Thu, 09 May 2024 11:59:53 +0300	[thread overview]
Message-ID: <171524519355.889134.12469325518934159365.b4-ty@kernel.org> (raw)
In-Reply-To: <20240507103929.30003-1-mschmidt@redhat.com>


On Tue, 07 May 2024 12:39:28 +0200, Michal Schmidt wrote:
> Undefined behavior is triggered when bnxt_qplib_alloc_init_hwq is called
> with hwq_attr->aux_depth != 0 and hwq_attr->aux_stride == 0.
> In that case, "roundup_pow_of_two(hwq_attr->aux_stride)" gets called.
> roundup_pow_of_two is documented as undefined for 0.
> 
> Fix it in the one caller that had this combination.
> 
> [...]

Applied, thanks!

[1/1] bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq
      https://git.kernel.org/rdma/rdma/c/78cfd17142ef70

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


      parent reply	other threads:[~2024-05-09  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 10:39 [PATCH] bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq Michal Schmidt
2024-05-08 10:53 ` Leon Romanovsky
2024-05-08 11:37 ` Selvin Xavier
2024-05-09  8:59 ` Leon Romanovsky [this message]

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=171524519355.889134.12469325518934159365.b4-ty@kernel.org \
    --to=leon@kernel.org \
    --cc=devesh.sharma@broadcom.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=nareshkumar.pbs@broadcom.com \
    --cc=selvin.xavier@broadcom.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