From: sashiko-bot@kernel.org
To: "Yehyeong Lee" <yhlee@isslab.korea.ac.kr>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v8 5/6] IB/isert: do not build a new isert_device for a device being removed
Date: Wed, 04 Nov 2026 04:20:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-196649@kernel.org> (raw)
In-Reply-To: <20261104040318.1844865-6-yhlee@isslab.korea.ac.kr>
> isert_device_get() looks the device up by node_guid and has no reason to
> refuse one. A CONNECT_REQUEST arriving while isert_remove_one() runs
> therefore builds a new isert_device on an ib_device the core is about to
> free, and nothing waits for its QP, CQ or PD. cma_process_remove() waits
> only for id destruction, and the core takes no device reference for them,
> so ib_dealloc_device() can run while they are still being released.
>
> node_guid is also the wrong key. Two ib_devices can share one, and an
> isert_device holds the PD and the DMA mappings of the device it was built
> on, while isert_remove_one() looks it up by the ib_device pointer.
>
> Let the ib_client data say whether a device may be used, and match the
> ib_device pointer. isert_add_one() stores a non-NULL value,
> isert_remove_one() clears it, and isert_device_get() refuses a device
> whose data is NULL. The clear, the lookup, the reference and the removing
> [ ... ]
>
> Fixes: b8d26b3be8b3 ("iser-target: Add iSCSI Extensions for RDMA (iSER) target driver")
> Fixes: 63b268d232b8 ("IB/isert: Properly release resources on DEVICE_REMOVAL")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104040318.1844865-1-yhlee@isslab.korea.ac.kr?part=5
next prev parent reply other threads:[~2026-11-04 4:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 4:03 [PATCH v8 0/6] IB/isert: fix the device removal use-after-free Yehyeong Lee
2026-11-04 4:03 ` [PATCH v8 1/6] IB/isert: do not publish connections being released on a second list Yehyeong Lee
2026-11-04 4:24 ` sashiko-bot
2026-11-04 4:03 ` [PATCH v8 2/6] IB/isert: drain the QP without holding isert_conn->mutex Yehyeong Lee
2026-11-04 4:22 ` sashiko-bot
2026-11-04 4:03 ` [PATCH v8 3/6] IB/isert: tear connections down from an ib_client on device removal Yehyeong Lee
2026-11-04 4:33 ` sashiko-bot
2026-11-04 4:03 ` [PATCH v8 4/6] IB/isert: drop the promotion reference when a connection errors out Yehyeong Lee
2026-11-04 4:16 ` sashiko-bot
2026-11-04 4:03 ` [PATCH v8 5/6] IB/isert: do not build a new isert_device for a device being removed Yehyeong Lee
2026-11-04 4:20 ` sashiko-bot [this message]
2026-11-04 4:03 ` [PATCH v8 6/6] IB/isert: only reinstate a connection that reached full feature phase Yehyeong Lee
2026-11-04 4:29 ` sashiko-bot
2026-11-04 14:20 ` [PATCH v8 0/6] IB/isert: fix the device removal use-after-free 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=sashiko-outbox-196649@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yhlee@isslab.korea.ac.kr \
/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.