* [PATCH] bluetooth: fix memory leak in btusb_mtk_wmt_recv
@ 2021-01-29 2:08 zjp734690220
2021-01-29 3:27 ` bluez.test.bot
[not found] ` <949194D0-DD66-4626-8577-9F228D142BF9@holtmann.org>
0 siblings, 2 replies; 3+ messages in thread
From: zjp734690220 @ 2021-01-29 2:08 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjupeng
From: zhongjupeng <zhongjupeng@yulong.com>
In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should be
released.
Signed-off-by: zhongjupeng <zhongjupeng@yulong.com>
---
drivers/bluetooth/btusb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ffec6bc..cf21bba 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3217,8 +3217,10 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
*/
if (test_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags)) {
data->evt_skb = skb_clone(skb, GFP_ATOMIC);
- if (!data->evt_skb)
+ if (!data->evt_skb) {
+ kfree_skb(skb);
goto err_out;
+ }
}
err = hci_recv_frame(hdev, skb);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: bluetooth: fix memory leak in btusb_mtk_wmt_recv 2021-01-29 2:08 [PATCH] bluetooth: fix memory leak in btusb_mtk_wmt_recv zjp734690220 @ 2021-01-29 3:27 ` bluez.test.bot [not found] ` <949194D0-DD66-4626-8577-9F228D142BF9@holtmann.org> 1 sibling, 0 replies; 3+ messages in thread From: bluez.test.bot @ 2021-01-29 3:27 UTC (permalink / raw) To: linux-bluetooth, zjp734690220 [-- Attachment #1: Type: text/plain, Size: 1599 bytes --] This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=424183 ---Test result--- ############################## Test: CheckPatch - PASS ############################## Test: CheckGitLint - PASS ############################## Test: CheckBuildK - PASS ############################## Test: CheckTestRunner: Setup - PASS ############################## Test: CheckTestRunner: l2cap-tester - PASS Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6 ############################## Test: CheckTestRunner: bnep-tester - PASS Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 ############################## Test: CheckTestRunner: mgmt-tester - PASS Total: 416, Passed: 402 (96.6%), Failed: 0, Not Run: 14 ############################## Test: CheckTestRunner: rfcomm-tester - PASS Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0 ############################## Test: CheckTestRunner: sco-tester - PASS Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 ############################## Test: CheckTestRunner: smp-tester - PASS Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 ############################## Test: CheckTestRunner: userchan-tester - PASS Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0 --- Regards, Linux Bluetooth [-- Attachment #2: l2cap-tester.log --] [-- Type: application/octet-stream, Size: 43342 bytes --] [-- Attachment #3: bnep-tester.log --] [-- Type: application/octet-stream, Size: 3533 bytes --] [-- Attachment #4: mgmt-tester.log --] [-- Type: application/octet-stream, Size: 546711 bytes --] [-- Attachment #5: rfcomm-tester.log --] [-- Type: application/octet-stream, Size: 11653 bytes --] [-- Attachment #6: sco-tester.log --] [-- Type: application/octet-stream, Size: 9887 bytes --] [-- Attachment #7: smp-tester.log --] [-- Type: application/octet-stream, Size: 11799 bytes --] [-- Attachment #8: userchan-tester.log --] [-- Type: application/octet-stream, Size: 5429 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <949194D0-DD66-4626-8577-9F228D142BF9@holtmann.org>]
[parent not found: <20210130153909.00001f48@163.com>]
[parent not found: <20210201120853.00002791@163.com>]
* Re: [PATCH] bluetooth: fix memory leak in btusb_mtk_wmt_recv [not found] ` <20210201120853.00002791@163.com> @ 2021-02-01 10:45 ` Marcel Holtmann 0 siblings, 0 replies; 3+ messages in thread From: Marcel Holtmann @ 2021-02-01 10:45 UTC (permalink / raw) To: Jupeng Zhong Cc: zhongjupeng, Johan Hedberg, Luiz Augusto von Dentz, Bluetooth Kernel Mailing List, linux-kernel, Markus Elfring Hi Jupeng, >>>> In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should >>>> be released. >>>> >>>> Signed-off-by: zhongjupeng <zhongjupeng@yulong.com> >>> >>> please provide a proper From: and Signed-off-by line with full name. >>> >>> Regards >>> >>> Marcel >> >> Hi, >> >> >> Update the patch From: and Signed-off-by: as follows: >> >> Jupeng Zhong <zhongjupeng@yulong.com> > > > Hi, > > Thanks to Markus Elfring for the suggestion: > > 1. add the tag “Fixes”. > 2. omit the labels “err_out” and “err_free_skb” in this function > implementation. > > The patch has been updated, please check. > > Thanks. > <0001-Bluetooth-btusb-Fix-memory-leak-in-btusb_mtk_wmt_rec.patch> please send patch inline via git-send-email or similar so that they are easy to review. Regards Marcel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-01 10:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-29 2:08 [PATCH] bluetooth: fix memory leak in btusb_mtk_wmt_recv zjp734690220
2021-01-29 3:27 ` bluez.test.bot
[not found] ` <949194D0-DD66-4626-8577-9F228D142BF9@holtmann.org>
[not found] ` <20210130153909.00001f48@163.com>
[not found] ` <20210201120853.00002791@163.com>
2021-02-01 10:45 ` [PATCH] " Marcel Holtmann
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.