[PATCH master 0/6] usb: gadget: multi: fix bind error path

Ahmad Fatoum a.fatoum at pengutronix.de
Sat Mar 19 04:02:40 PDT 2022


USB mass storage gadget may fail during bind. USB multi gadget error
path for failed bind is broken. USB mass storage gadget unbind leaks
resources. Fix these three issues.

Ahmad Fatoum (6):
  usb: gadget: implement and use system_partitions_get_null
  usb: gadget: don't register UMS with empty function
  usb: gadget: mass-storage: fix clean up of file descriptors
  usb: gadget: mass-storage: reference count allocations used in bthread
  usb: gadget: multi: fix broken handling of USB function bind error
  usb: gadget: multi: free UMS instance at multi_unbind time

 common/fastboot.c                   |  4 +-
 common/usbgadget.c                  |  6 +--
 drivers/usb/gadget/f_mass_storage.c | 64 +++++++++++++++++++++++------
 drivers/usb/gadget/multi.c          | 24 ++++++++---
 include/system-partitions.h         |  8 ++++
 include/usb/mass_storage.h          |  1 +
 6 files changed, 81 insertions(+), 26 deletions(-)

-- 
2.30.2




More information about the barebox mailing list