From: sashiko-bot@kernel.org
To: "Sam Agazaryan" <samagazaryan@google.com>, linux-i3c@lists.infradead.org
Cc: Frank.Li@kernel.org, "Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v2 1/4] i3c: dw: Fix IBI slot leak on oversized payload
Date: Sat, 05 Dec 2026 07:06:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-251186@kernel.org> (raw)
In-Reply-To: <20261205065552.2594113-2-samagazaryan@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] i3c: dw: check payload length before taking IBI slot
--
commit 2966934f7f5a248b3700a8c4400e2a6033800193
Author: Sam Agazaryan <samagazaryan@google.com>
i3c: dw: Fix IBI slot leak on oversized payload
This commit recycles the allocated IBI slot in
dw_i3c_master_handle_ibi_sir() before draining the queue when the payload
length exceeds dev->ibi->max_payload_len.
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 76875301b5ce2..9434d13830334 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1486,6 +1486,7 @@ static void dw_i3c_master_handle_ibi_sir(struct dw_i3c_master *master,
> dev_dbg_ratelimited(&master->base.dev,
> "IBI payload len %d greater than max %d\n",
> len, dev->ibi->max_payload_len);
> + i3c_generic_ibi_recycle_slot(data->ibi_pool, slot);
> goto err_drain;
> }
[Severity: Low]
Would it be simpler to check dev->ibi->max_payload_len < len before calling
i3c_generic_ibi_get_free_slot()?
Neither len nor dev->ibi->max_payload_len depends on the slot. Checking it
first avoids taking and immediately recycling a slot under pool->lock in IRQ
context, and logs the length error rather than "No IBI slots available" when
the pool is empty (as hci_dma_process_ibi() does).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205065552.2594113-1-samagazaryan@google.com?part=1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2026-12-05 7:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 6:55 [PATCH v2 0/4] i3c: master: Fix IBI teardown when DAA re-adds a device Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan
2026-12-05 6:55 ` [PATCH v2 1/4] i3c: dw: Fix IBI slot leak on oversized payload Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan
2026-12-05 7:06 ` sashiko-bot [this message]
2026-12-05 6:55 ` [PATCH v2 2/4] i3c: master: Move generic IBI pool definitions Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan
2026-12-05 6:55 ` [PATCH v2 3/4] i3c: master: Drain IBI slot pool before freeing Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan
2026-12-05 7:17 ` sashiko-bot
2026-12-05 6:55 ` [PATCH v2 4/4] i3c: master: Preserve IBI workqueue across DAA Sam Agazaryan
2026-12-05 6:55 ` Sam Agazaryan
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-251186@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=samagazaryan@google.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.