All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Li Zhijian <lizhijian@fujitsu.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/cm: Remove redundant WARN_ON in cm_free_priv_msg
Date: Mon, 12 May 2025 13:53:04 +0300	[thread overview]
Message-ID: <20250512105304.GC22843@unreal> (raw)
In-Reply-To: <20250509081840.40628-1-lizhijian@fujitsu.com>

On Fri, May 09, 2025 at 04:18:40PM +0800, Li Zhijian wrote:
> Sometimes, the blktests triggered this WARN_ON():
>  ------------[ cut here ]------------
>  WARNING: CPU: 3 PID: 1330889 at cm.c:353 cm_free_priv_msg+0xaa/0xc0 [ib_cm]
> ...
>  CPU: 3 UID: 0 PID: 1330889 Comm: kworker/u16:1 Tainted: G        W  OE      6.13.0-rc3+ #3
>  Tainted: [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
>  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
>  Workqueue: ib_mad1 timeout_sends [ib_core]
>  RIP: 0010:cm_free_priv_msg+0xaa/0xc0 [ib_cm]
> ...
>  Call Trace:
>   <TASK>
>   ? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
>   ? __warn.cold+0x93/0xfa
>   ? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
>   ? report_bug+0xff/0x140
>   ? handle_bug+0x58/0x90
>   ? exc_invalid_op+0x17/0x70
>   ? asm_exc_invalid_op+0x1a/0x20
>   ? cm_free_priv_msg+0xaa/0xc0 [ib_cm]
>   cm_process_send_error+0x64/0x1f0 [ib_cm]
>   timeout_sends+0x1e5/0x2d0 [ib_core]
>   process_one_work+0x156/0x310
>   worker_thread+0x252/0x390
>   ? __pfx_worker_thread+0x10/0x10
>   kthread+0xd2/0x100
>   ? __pfx_kthread+0x10/0x10
>   ret_from_fork+0x34/0x50
>   ? __pfx_kthread+0x10/0x10
>   ret_from_fork_asm+0x1a/0x30
>   </TASK>
>  ---[ end trace 0000000000000000 ]---
> 
> In cm_process_send_error(), cm_free_priv_msg() will be called
> when (msg != cm_id_priv->msg) is true. And all other calling to
> cm_free_priv_msg() cases, msg is always the same as cm_id_priv->msg.
> 
> So it's safe to remove this WARN_ON

This patch should fix the issue.
https://lore.kernel.org/all/0c364c29142f72b7875fdeba51f3c9bd6ca863ee.1745839788.git.leon@kernel.org/
7590649ee7af ("IB/cm: Drop lockdep assert and WARN when freeing old msg")

Thanks

  reply	other threads:[~2025-05-12 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  8:18 [PATCH] IB/cm: Remove redundant WARN_ON in cm_free_priv_msg Li Zhijian
2025-05-12 10:53 ` Leon Romanovsky [this message]
2025-05-13  0:42   ` Zhijian Li (Fujitsu)

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=20250512105304.GC22843@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.