Re: [PATCH] Bluetooth: btusb: fix memory leak

2021-04-13 Thread Marcel Holtmann
Hi Muhammad, > If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and > then error should be returned to prevent memory leak. > > Addresses-Coverity: ("Prevent memory leak") > Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for > Mediatek Chip.") > Signed-of

[PATCH] Bluetooth: btusb: fix memory leak

2021-04-13 Thread Muhammad Usama Anjum
If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and then error should be returned to prevent memory leak. Addresses-Coverity: ("Prevent memory leak") Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip.") Signed-off-by: Muhammad Usama Anjum

[PATCH] Bluetooth: btusb: fix memory leak on suspend and resume

2021-01-14 Thread Vamshi K Sthambamkadi
kmemleak report: unreferenced object 0x9b1127f00500 (size 208): comm "kworker/u17:2", pid 500, jiffies 4294937470 (age 580.136s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 ed 05 11 9b ff ff 00 00 00 00 00 00 00 00 .`..

Re: [RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-07-17 Thread jeffy
Hi Oliver, Thanks for your reply. On 07/17/2017 11:26 PM, Oliver Neukum wrote: Am Mittwoch, den 12.07.2017, 10:27 +0800 schrieb jeffy: Hi Oliver, Thanx for your comments, and sorry for reply late. If you do that you have to change submit_tx_urb() to be called under a spinlock. sorry, why

Re: [RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-07-17 Thread Oliver Neukum
Am Mittwoch, den 12.07.2017, 10:27 +0800 schrieb jeffy: > Hi Oliver, > > Thanx for your comments, and sorry for reply late. > > > > If you do that you have to change submit_tx_urb() to be called under a > > spinlock. > > sorry, why we need that? since submit_tx_urb is basically > usb_anchor_ur

Re: [RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-07-11 Thread jeffy
Hi Oliver, Thanx for your comments, and sorry for reply late. On 07/04/2017 07:38 PM, Oliver Neukum wrote: Am Freitag, den 23.06.2017, 11:46 +0800 schrieb jeffy: --- drivers/bluetooth/btusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/dr

Re: [RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-06-22 Thread Marcel Holtmann
Hi Jeffy, > Currently in play_deferred, we are calling usb_submit_urb directly to > submit deferred tx urb after unanchor it. > > So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb > and cause memory leak: > unreferenced object 0xffc0ce0fa400 (size 256): > ... > backtrac

[RFC PATCH] Bluetooth: btusb: Fix memory leak in play_deferred

2017-06-22 Thread Jeffy Chen
Currently in play_deferred, we are calling usb_submit_urb directly to submit deferred tx urb after unanchor it. So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb and cause memory leak: unreferenced object 0xffc0ce0fa400 (size 256): ... backtrace: [] __save_stack_tra