From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Mark Zhang <markzhang@nvidia.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next 3/6] IB/cm: Remove "mad_agent" parameter of ib_modify_mad
Date: Mon, 29 Mar 2021 09:41:01 -0300 [thread overview]
Message-ID: <20210329124101.GA887238@nvidia.com> (raw)
In-Reply-To: <20210318100309.670344-4-leon@kernel.org>
On Thu, Mar 18, 2021 at 12:03:06PM +0200, Leon Romanovsky wrote:
> +static void cm_send_free_msg(struct ib_mad_send_buf *msg)
> +{
> + struct cm_id_private *cm_id_priv;
> +
> + cm_id_priv = msg->context[0];
> + if (!cm_id_priv || cm_id_priv->msg != msg) {
> + cm_free_msg(msg);
> + return;
> + }
> +
> + spin_lock_irq(&cm_id_priv->lock);
> + cm_free_msg(msg);
> + cm_id_priv->msg = NULL;
> + spin_unlock_irq(&cm_id_priv->lock);
> +}
Either the whole sequence should be inside the lock or nothing should
be in the lock..
Oh this is all messed up and needs a big fix. Review and include this
in the series and drop the above function.
https://github.com/jgunthorpe/linux/commits/for-markz
Jason
next prev parent reply other threads:[~2021-03-29 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 10:03 [PATCH rdma-next 0/6] Fix memory corruption in CM Leon Romanovsky
2021-03-18 10:03 ` [PATCH rdma-next 1/6] Revert "IB/cm: Mark stale CM id's whenever the mad agent was unregistered" Leon Romanovsky
2021-03-18 10:03 ` [PATCH rdma-next 2/6] IB/cm: Remove "mad_agent" parameter of ib_cancel_mad Leon Romanovsky
2021-03-26 20:24 ` Jason Gunthorpe
2021-03-18 10:03 ` [PATCH rdma-next 3/6] IB/cm: Remove "mad_agent" parameter of ib_modify_mad Leon Romanovsky
2021-03-29 12:41 ` Jason Gunthorpe [this message]
2021-04-01 8:12 ` Leon Romanovsky
2021-03-18 10:03 ` [PATCH rdma-next 4/6] IB/cm: Clear all associated AV's ports when remove a cm device Leon Romanovsky
2021-03-18 10:03 ` [PATCH rdma-next 5/6] IB/cm: Add lock protection when access av/alt_av's port of a cm_id Leon Romanovsky
2021-03-18 10:03 ` [PATCH rdma-next 6/6] IB/cm: Initialize av before acquire the spin lock in cm_lap_handler 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=20210329124101.GA887238@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markzhang@nvidia.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