-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Bluetooth: Host: Fix ISO buffers leak #77008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Host: Fix ISO buffers leak #77008
Conversation
When disconnected while sending data, if ISO doesn't get the number of completed packets it will not call `process_unack_tx` and thus will leak TX context. Fix that by setting the connection state in ISO disconnection which will trigger a call to `process_unack_tx`. Signed-off-by: Théo Battrel <[email protected]>
e2d8225
to
8aaddb9
Compare
|
Oh yeah true, thanks! |
8aaddb9
to
1b09f4b
Compare
When sending data using ISO and the data is fragmented, if the connection is cut before all the fragments are sent, the data buffer will be leaked. Fix the issue by unref'ing the buffer when ISO is not in a connected state. Signed-off-by: Théo Battrel <[email protected]>
1b09f4b
to
f008309
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to get backported?
This test create a setup where an ISO broadcaster will send fragmented data and get stopped after sending the first fragment and repeating that operation multiple time to verify that buffers are not leaked. Signed-off-by: Théo Battrel <[email protected]>
f008309
to
1fca0b9
Compare
Fixes #77006
Fixes #77007
Add a test to reproduce those issues.