On 11/12/2018 12:56, Robin Murphy wrote: > On 11/12/2018 10:48, Marc Gonzalez wrote: > >> Looks like the UFS debug code might be smashing memory it doesn't own? >> I'm kinda puzzled right now. I'll keep digging. >> Are there debug options that might help figuring things out? UBSAN? > > Oh, that does rather look like something stomping all over the slab > allocator. I'd start with CONFIG_KASAN and CONFIG_SLUB_DEBUG_ON to to > catch any obvious out-of-bounds/use-after-free/double-free conditions. Thanks for pointing out CONFIG_KASAN, which instantly allowed me to pinpoint the obvious bug... in my own code! Doooh! My initial "replace memcpy_fromio" patch is garbage. I'll send a correct patch in a few minutes. I am (again) in your debt :-) Regards.