]> 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>
Thu, 13 Mar 2025 11:50:27 +0000 (12:50 +0100)
commit5fa25ae6484b15fb167049918d01836dfa39dffc
treeba7fb15ade21f7e126bf8087caf66490973f194e
parentd5e48551866e09d26dc1d8c85e94543fda1f8911
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