From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org,
error27@gmail.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] soundwire: bus: fix off-by-one when allocating slave IDs
Date: Mon, 12 Jan 2026 09:56:02 +0000 [thread overview]
Message-ID: <aWTFMrNExMP0WNS6@opensource.cirrus.com> (raw)
In-Reply-To: <20260110201959.2523024-1-harshit.m.mogalapalli@oracle.com>
On Sat, Jan 10, 2026 at 12:19:58PM -0800, Harshit Mogalapalli wrote:
> ida_alloc_max() interprets its max argument as inclusive.
>
> Using SDW_FW_MAX_DEVICES(16) therefore allows an ID of 16 to be
> allocated, but the IRQ domain created for the bus is sized for IDs
> 0-15. If 16 is returned, irq_create_mapping() fails and the driver
> ends up with an invalid IRQ mapping.
>
> Limit the allocation to 0-15 by passing SDW_FW_MAX_DEVICES - 1.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202512240450.hlDH3nCs-lkp@intel.com/
> Fixes: aab12022b076 ("soundwire: bus: Add internal slave ID and use for IRQs")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
next prev parent reply other threads:[~2026-01-12 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-10 20:19 [PATCH] soundwire: bus: fix off-by-one when allocating slave IDs Harshit Mogalapalli
2026-01-11 9:27 ` Markus Elfring
2026-01-12 8:26 ` Dan Carpenter
2026-01-12 8:49 ` Dan Carpenter
2026-01-12 10:55 ` Markus Elfring
2026-01-12 11:13 ` Richard Fitzgerald
2026-01-13 11:24 ` Vinod Koul
2026-01-12 9:56 ` Charles Keepax [this message]
2026-01-13 11:29 ` [PATCH] " Vinod Koul
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=aWTFMrNExMP0WNS6@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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.