U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* usb:composite: data abort on second ums launch
@ 2025-03-24 10:42 Zixun LI
  2025-03-24 14:03 ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Zixun LI @ 2025-03-24 10:42 UTC (permalink / raw)
  To: Lukasz Majewski, Mattijs Korpershoek, Marek Vasut, Tom Rini; +Cc: u-boot

Hi,

I encountered a data abort on the 2nd "ums 0 mmc 0" command on
u-boot-at91 2024.07 with sam9x60-curiosity board.

U-Boot> ums 0 mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0x1d29000
CTRL+C - Operation aborted
U-Boot> ums 0 mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0x1d29000
data abort
pc : [<27f93428>]          lr : [<27ef7e80>]
reloc pc : [<23f16428>]    lr : [<23e7ae80>]
sp : 27ef4cf0  ip : a5200000     fp : 23f6915c
r10: deadbeef  r9 : 27ef7e80     r8 : 27f7d2a0
r7 : a5200000  r6 : 00000000     r5 : 00000000  r4 : 27f01668
r3 : 00000000  r2 : 00000000     r1 : 27fe1d88  r0 : 27f01668
Flags: nzCV  IRQs off  FIQs off  Mode SVC_32 (T)
Code: 45ac d017 68c5 4667 (60fd) 60af

From backtrace the abort happened in fREe_impl(), with some debugging
I've localized the abort in fact happened in fsg buffer allocation in
fsg_common_init() [1]

It looks like the buffer is not freed on driver unregister since
fsg_common_release() is only called if fsg_common_init() met an error.


[1] https://elixir.bootlin.com/u-boot/v2025.01/source/drivers/usb/gadget/f_mass_storage.c#L2511

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-03-28  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 10:42 usb:composite: data abort on second ums launch Zixun LI
2025-03-24 14:03 ` Marek Vasut
2025-03-24 15:18   ` Zixun LI
2025-03-24 17:21   ` Mattijs Korpershoek
2025-03-24 17:33     ` Zixun LI
2025-03-24 17:40       ` Mattijs Korpershoek
2025-03-27 13:46         ` Mattijs Korpershoek
2025-03-28  8:20           ` Mattijs Korpershoek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox