summaryrefslogtreecommitdiff
path: root/scripts/include/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>2026-01-10 12:19:58 -0800
committerVinod Koul <vkoul@kernel.org>2026-01-13 16:56:03 +0530
commit12d4fd9a657174496677cff2841315090f1c11fc (patch)
tree7b880c35fd1b5919bdc26f1d9489c6daff6586b4 /scripts/include/git@git.tavy.me:linux.git
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
soundwire: bus: fix off-by-one when allocating slave IDs
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> Link: https://patch.msgid.link/20260110201959.2523024-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions