summaryrefslogtreecommitdiff
path: root/include/uapi/linux/android/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRaphael Pinsonneault-Thibeault <rpthibeault@gmail.com>2025-12-10 11:02:28 -0500
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2025-12-19 17:23:18 -0500
commit252714f1e8bdd542025b16321c790458014d6880 (patch)
tree4adbcac9d8ca98b8127a69551f6045e4e59434d1 /include/uapi/linux/android/git@git.tavy.me:linux.git
parent348240e5fa901d3d4ba8dffa0e2ba9fc7aba93ab (diff)
Bluetooth: btusb: revert use of devm_kzalloc in btusb
This reverts commit 98921dbd00c4e ("Bluetooth: Use devm_kzalloc in btusb.c file"). In btusb_probe(), we use devm_kzalloc() to allocate the btusb data. This ties the lifetime of all the btusb data to the binding of a driver to one interface, INTF. In a driver that binds to other interfaces, ISOC and DIAG, this is an accident waiting to happen. The issue is revealed in btusb_disconnect(), where calling usb_driver_release_interface(&btusb_driver, data->intf) will have devm free the data that is also being used by the other interfaces of the driver that may not be released yet. To fix this, revert the use of devm and go back to freeing memory explicitly. Fixes: 98921dbd00c4e ("Bluetooth: Use devm_kzalloc in btusb.c file") Signed-off-by: Raphael Pinsonneault-Thibeault <rpthibeault@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/uapi/linux/android/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions