]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_tcm: Don't prepare BOT write request twice
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 11 Dec 2024 00:32:07 +0000 (00:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:43 +0000 (13:49 +0100)
commitbde20431745a3b1173689cbdd679f0538092ff6a
tree1a5af66450d5a427bdae5a5bac394b97930dfa4d
parentc38aea9f67e89194b10f57c5c64800ebe3cf347c
usb: gadget: f_tcm: Don't prepare BOT write request twice

commit 94d9bf671ae314cacc2d7bf96bd233b4abc7cede upstream.

The duplicate kmalloc here is causing memory leak. The request
preparation in bot_send_write_request is also done in
usbg_prepare_w_request. Remove the duplicate work.

Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/f4f26c3d586cde0d46f8c3bcb4e8ae32311b650d.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_tcm.c