]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
slimbus: core: fix device reference leak on report present
authorJohan Hovold <johan@kernel.org>
Wed, 26 Nov 2025 14:53:26 +0000 (15:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:39 +0000 (10:27 +0100)
commit2ddc09f6a0a221b1d91a7cbc8cc2cefdbd334fe6
treecd468e452e81ac0707136418c3b0633d5e6eddcd
parentdd58835fba5d6c5f6c6e647e9380250a6c1a6e65
slimbus: core: fix device reference leak on report present

commit 9391380eb91ea5ac792aae9273535c8da5b9aa01 upstream.

Slimbus devices can be allocated dynamically upon reception of
report-present messages.

Make sure to drop the reference taken when looking up already registered
devices.

Note that this requires taking an extra reference in case the device has
not yet been registered and has to be allocated.

Fixes: 46a2bb5a7f7e ("slimbus: core: Add slim controllers support")
Cc: stable@vger.kernel.org # 4.16
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251126145329.5022-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/core.c