Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fix a use-after-free in the SRP target driver
@ 2022-07-27 19:34 Bart Van Assche
  2022-07-27 19:34 ` [PATCH v2 1/3] RDMA/srpt: Duplicate port name members Bart Van Assche
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bart Van Assche @ 2022-07-27 19:34 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Leon Romanovsky, linux-rdma, Li Zhijian, Hillf Danton,
	Mike Christie, Bart Van Assche

Hi Jason,

A known issue in the SRP target driver is that a use-after-free is triggered
if an RDMA port is removed while a LIO target port is still associated with
that RDMA port. This patch series fixes that use-after-free.

Thanks,

Bart.

See also:
* Commit 9b64f7d0bb0a ("RDMA/srpt: Postpone HCA removal until after configfs directory removal").
* https://lore.kernel.org/all/17649b9c-7e42-1625-8bc9-8ad333ab771c@fujitsu.com/

Changes compared to v1:
- Left out three BUG_ON() statements.
- Added three WARN_ON_ONCE() statements.
- Removed an unnecessary if (!sport_id) statement block.

Bart Van Assche (3):
  RDMA/srpt: Duplicate port name members
  RDMA/srpt: Introduce a reference count in struct srpt_device
  RDMA/srpt: Fix a use-after-free

 drivers/infiniband/ulp/srpt/ib_srpt.c | 148 ++++++++++++++++++--------
 drivers/infiniband/ulp/srpt/ib_srpt.h |  18 ++--
 2 files changed, 118 insertions(+), 48 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-29 19:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 19:34 [PATCH v2 0/3] Fix a use-after-free in the SRP target driver Bart Van Assche
2022-07-27 19:34 ` [PATCH v2 1/3] RDMA/srpt: Duplicate port name members Bart Van Assche
2022-07-27 19:34 ` [PATCH v2 2/3] RDMA/srpt: Introduce a reference count in struct srpt_device Bart Van Assche
2022-07-27 19:34 ` [PATCH v2 3/3] RDMA/srpt: Fix a use-after-free Bart Van Assche
2022-07-29 19:46 ` [PATCH v2 0/3] Fix a use-after-free in the SRP target driver Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox