]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_tcm: Decrement command ref count on cleanup
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 11 Dec 2024 00:31:48 +0000 (00:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:43 +0000 (13:49 +0100)
commitc686d44fe45ebb5d89788ba433661b85184e3309
tree100682a75707e8ff28b8496aa95ab17045027936
parentff42148e63d70571e831b301360b3d4262775456
usb: gadget: f_tcm: Decrement command ref count on cleanup

commit 3b2a52e88ab0c9469eaadd4d4c8f57d072477820 upstream.

We submitted the command with TARGET_SCF_ACK_KREF, which requires
acknowledgment of command completion. If the command fails, make sure to
decrement the ref count.

Fixes: cff834c16d23 ("usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/3c667b4d9c8b0b580346a69ff53616b6a74cfea2.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_tcm.c