All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Serhat Kumral" <serhatkumral1@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/cxgb4: Use dealloc_driver op to fix ioremap leak on alloc failure
Date: Thu, 26 Nov 2026 17:19:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-235970@kernel.org> (raw)
In-Reply-To: <20261126170841.11048-1-serhatkumral1@gmail.com>

> In c4iw_alloc(), if c4iw_rdev_open() fails, the previously ioremapped
> BAR2/on-chip memory (bar2_kva / oc_mw_kva) is leaked because
> ib_dealloc_device() does not unmap it.
> 
> Refactor c4iw_dealloc() to take struct ib_device * and register it as the
> .dealloc_driver callback in c4iw_dev_ops. Move ib_set_device_ops() and
> the xarray/mutex/waitqueue initializations earlier in c4iw_alloc() so
> that all ib_dealloc_device() error paths invoke c4iw_dealloc(). Guard
> c4iw_rdev_close() with dev->rdev.free_workq so it is only called when
> c4iw_rdev_open() succeeded.
> 
> Update c4iw_register_device() and c4iw_remove() to rely on
> ib_dealloc_device() and ib_unregister_device() rather than calling
> c4iw_dealloc() directly, and handle the case where cancel_work_sync()
> cancels reg_work before registration runs.
> 
> Fixes: c6d7b26791a2 ("RDMA/cxgb4: Support on-chip SQs")
> Fixes: fa658a98a2d0 ("RDMA/cxgb4: Use the BAR2/WC path for kernel QPs and T5 devices")
> Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126170841.11048-1-serhatkumral1@gmail.com?part=1

  reply	other threads:[~2026-11-26 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 13:54 [PATCH] RDMA/cxgb4: Unmap BAR2 when c4iw_rdev_open() fails Serhat Kumral
2026-11-22 13:57 ` sashiko-bot
2026-11-23 16:51 ` Jason Gunthorpe
2026-11-26 17:08   ` [PATCH v2] RDMA/cxgb4: Use dealloc_driver op to fix ioremap leak on alloc failure Serhat Kumral
2026-11-26 17:19     ` sashiko-bot [this message]
2026-11-27  9:57     ` Showrya M N
2026-12-01 19:01     ` 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-235970@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=serhatkumral1@gmail.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.