Re: [bug report] Bluetooth: Fix memory leaking when hdev->send returns an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,


On 23/05/2017 07:34, Dan Carpenter wrote:
The ti_st_send_frame() frees skb on error.  I'm surprised this bug
wasn't found by KAsan when we found acf91ec384dd ("Bluetooth: btwilink:
Save the packet type before sending").

Maybe an unreachable condition in the current ti_st implementation.
But yes this needs to be fixed.

I don't totally understand how skb is freed on the success path either.
bfusb_send_frame(), dtl1_hci_send_frame() and btqcomsmd_send() have
calls to kfree_skb() but I can't find the calls in bpa10x_send_frame()
or the other ->send functions.

bpa10x_send_frame stores a skb reference when filling urb, skb is then freed
asynchronously in the bpa10x_tx_complete callback.
What are the other send functions ? bt skb is often enqueued and not released
in the send function itself.

Regards,
Loic
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux