From: Jason Gunthorpe <jgg@ziepe.ca>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Leon Romanovsky <leonro@mellanox.com>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org, Moni Shoua <monis@mellanox.com>
Subject: Re: [PATCH] RDMA/rxe: Fix configuration of atomic queue pair attributes
Date: Wed, 19 Feb 2020 16:58:06 -0400 [thread overview]
Message-ID: <20200219205806.GA26379@ziepe.ca> (raw)
In-Reply-To: <20200217205714.26937-1-bvanassche@acm.org>
On Mon, Feb 17, 2020 at 12:57:14PM -0800, Bart Van Assche wrote:
> >From the comment above the definition of the roundup_pow_of_two() macro:
>
> The result is undefined when n == 0.
>
> Hence only pass positive values to roundup_pow_of_two(). This patch fixes
> the following UBSAN complaint:
>
> UBSAN: Undefined behaviour in ./include/linux/log2.h:57:13
> shift exponent 64 is too large for 64-bit type 'long unsigned int'
> Call Trace:
> dump_stack+0xa5/0xe6
> ubsan_epilogue+0x9/0x26
> __ubsan_handle_shift_out_of_bounds.cold+0x4c/0xf9
> rxe_qp_from_attr.cold+0x37/0x5d [rdma_rxe]
> rxe_modify_qp+0x59/0x70 [rdma_rxe]
> _ib_modify_qp+0x5aa/0x7c0 [ib_core]
> ib_modify_qp+0x3b/0x50 [ib_core]
> cma_modify_qp_rtr+0x234/0x260 [rdma_cm]
> __rdma_accept+0x1a7/0x650 [rdma_cm]
> nvmet_rdma_cm_handler+0x1286/0x14cd [nvmet_rdma]
> cma_cm_event_handler+0x6b/0x330 [rdma_cm]
> cma_ib_req_handler+0xe60/0x22d0 [rdma_cm]
> cm_process_work+0x30/0x140 [ib_cm]
> cm_req_handler+0x11f4/0x1cd0 [ib_cm]
> cm_work_handler+0xb8/0x344e [ib_cm]
> process_one_work+0x569/0xb60
> worker_thread+0x7a/0x5d0
> kthread+0x1e6/0x210
> ret_from_fork+0x24/0x30
>
> Cc: Moni Shoua <monis@mellanox.com>
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/infiniband/sw/rxe/rxe_qp.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2020-02-19 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 20:57 [PATCH] RDMA/rxe: Fix configuration of atomic queue pair attributes Bart Van Assche
2020-02-18 9:53 ` Zhu Yanjun
2020-02-18 13:09 ` Leon Romanovsky
2020-02-19 0:50 ` Zhu Yanjun
2020-02-19 8:30 ` Leon Romanovsky
2020-02-19 20:58 ` Jason Gunthorpe [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=20200219205806.GA26379@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=bvanassche@acm.org \
--cc=dledford@redhat.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=monis@mellanox.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;
as well as URLs for NNTP newsgroup(s).