Message ID | 20211020081444.37324-1-soenke.huster@eknoes.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v2] Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle() | expand |
Context | Check | Description |
---|---|---|
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/buildkernel | success | Build Kernel PASS |
tedd_an/testrunnersetup | success | Test Runner Setup PASS |
tedd_an/testrunnerl2cap-tester | success | Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerbnep-tester | success | Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermgmt-tester | success | Total: 468, Passed: 468 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerrfcomm-tester | success | Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersco-tester | success | Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersmp-tester | success | Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneruserchan-tester | success | Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0 |
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=566845 ---Test result--- Test Summary: CheckPatch PASS 1.83 seconds GitLint PASS 0.99 seconds BuildKernel PASS 731.49 seconds TestRunner: Setup PASS 522.08 seconds TestRunner: l2cap-tester PASS 11.80 seconds TestRunner: bnep-tester PASS 6.18 seconds TestRunner: mgmt-tester PASS 107.08 seconds TestRunner: rfcomm-tester PASS 7.74 seconds TestRunner: sco-tester PASS 7.91 seconds TestRunner: smp-tester PASS 7.68 seconds TestRunner: userchan-tester PASS 6.49 seconds --- Regards, Linux Bluetooth
Hi Soenke, > On the reception of packets with an invalid packet type, the memory of > the allocated socket buffers is never freed. Add a default case that frees > these to avoid a memory leak. > > Signed-off-by: Soenke Huster <soenke.huster@eknoes.de> > --- > Changes in v2: > - Add break; to default case > > drivers/bluetooth/virtio_bt.c | 3 +++ > 1 file changed, 3 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c index 57908ce4fae8..076e4942a3f0 100644 --- a/drivers/bluetooth/virtio_bt.c +++ b/drivers/bluetooth/virtio_bt.c @@ -202,6 +202,9 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb) hci_skb_pkt_type(skb) = pkt_type; hci_recv_frame(vbt->hdev, skb); break; + default: + kfree_skb(skb); + break; } }
On the reception of packets with an invalid packet type, the memory of the allocated socket buffers is never freed. Add a default case that frees these to avoid a memory leak. Signed-off-by: Soenke Huster <soenke.huster@eknoes.de> --- Changes in v2: - Add break; to default case drivers/bluetooth/virtio_bt.c | 3 +++ 1 file changed, 3 insertions(+)