From: Leon Romanovsky <leon@kernel.org>
To: Jack Wang <jinpu.wang@cloud.ionos.com>
Cc: linux-rdma@vger.kernel.org, bvanassche@acm.org,
dledford@redhat.com, jgg@ziepe.ca, danil.kipnis@cloud.ionos.com,
Gioh Kim <gi-oh.kim@cloud.ionos.com>
Subject: Re: [PATCH for-next 1/4] RDMA/rtrs-srv: Fix BUG: KASAN: stack-out-of-bounds
Date: Thu, 11 Feb 2021 10:33:23 +0200 [thread overview]
Message-ID: <20210211083323.GA1275163@unreal> (raw)
In-Reply-To: <20210211065526.7510-2-jinpu.wang@cloud.ionos.com>
On Thu, Feb 11, 2021 at 07:55:23AM +0100, Jack Wang wrote:
> [ 125.352752] ==================================================================
> [ 125.353122] BUG: KASAN: stack-out-of-bounds in _mlx4_ib_post_send+0x1bd2/0x2770 [mlx4_ib]
> [ 125.353337] Read of size 4 at addr ffff8880d5a7f980 by task kworker/0:1H/565
>
> [ 125.353655] CPU: 0 PID: 565 Comm: kworker/0:1H Tainted: G O 5.4.84-storage #5.4.84-1+feature+linux+5.4.y+dbg+20201216.1319+b6b887b~deb10
> [ 125.353924] Hardware name: Supermicro H8QG6/H8QG6, BIOS 3.00 09/04/2012
> [ 125.354144] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core]
> [ 125.354317] Call Trace:
> [ 125.354531] dump_stack+0x96/0xe0
> [ 125.354715] print_address_description.constprop.4+0x1f/0x300
> [ 125.354943] ? irq_work_claim+0x2e/0x50
> [ 125.355129] __kasan_report.cold.8+0x78/0x92
> [ 125.355334] ? _mlx4_ib_post_send+0x1bd2/0x2770 [mlx4_ib]
> [ 125.355545] kasan_report+0x10/0x20
> [ 125.355730] _mlx4_ib_post_send+0x1bd2/0x2770 [mlx4_ib]
> [ 125.355930] ? check_chain_key+0x1d7/0x2e0
> [ 125.356203] ? _mlx4_ib_post_recv+0x630/0x630 [mlx4_ib]
> [ 125.356399] ? lockdep_hardirqs_on+0x1a8/0x290
> [ 125.356595] ? stack_depot_save+0x218/0x56e
> [ 125.356781] ? do_profile_hits.isra.6.cold.13+0x1d/0x1d
> [ 125.356973] ? check_chain_key+0x1d7/0x2e0
> [ 125.357174] ? save_stack+0x4d/0x80
> [ 125.357374] ? save_stack+0x19/0x80
> [ 125.357547] ? __kasan_slab_free+0x125/0x170
> [ 125.357728] ? kfree+0xe7/0x3b0
> [ 125.357899] rdma_write_sg+0x5b0/0x950 [rtrs_server]
>
> The problem is when we send imm_wr, the type should be ib_rdma_wr, so
> hw driver like mlx4 can do rdma_wr(wr), so fix it by use the ib_rdma_wr
> as type for imm_wr.
>
> Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality")
> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> Reviewed-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-srv.c | 64 +++++++++++++-------------
> 1 file changed, 33 insertions(+), 31 deletions(-)
>
You have many lines with double space before "=".
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2021-02-11 8:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 6:55 [PATCH for-next 0/4] A few bugfix for RTRS Jack Wang
2021-02-11 6:55 ` [PATCH for-next 1/4] RDMA/rtrs-srv: Fix BUG: KASAN: stack-out-of-bounds Jack Wang
2021-02-11 8:33 ` Leon Romanovsky [this message]
2021-02-11 6:55 ` [PATCH for-next 2/4] RDMA/rtrs: Only allow addition of path to an already established session Jack Wang
2021-02-11 8:43 ` Leon Romanovsky
2021-02-11 9:23 ` Jinpu Wang
2021-02-11 9:36 ` Leon Romanovsky
2021-02-11 9:48 ` Jinpu Wang
2021-02-11 9:51 ` Leon Romanovsky
2021-02-11 6:55 ` [PATCH for-next 3/4] RDMA/rtrs-srv: fix memory leak by missing kobject free Jack Wang
2021-02-11 6:55 ` [PATCH for-next 4/4] RDMA/rtrs-srv-sysfs: fix missing put_device Jack Wang
2021-02-11 8:48 ` 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=20210211083323.GA1275163@unreal \
--to=leon@kernel.org \
--cc=bvanassche@acm.org \
--cc=danil.kipnis@cloud.ionos.com \
--cc=dledford@redhat.com \
--cc=gi-oh.kim@cloud.ionos.com \
--cc=jgg@ziepe.ca \
--cc=jinpu.wang@cloud.ionos.com \
--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