Re: [PATCH] usb: gadget: f_fs: Init reset_work at alloc to avoid kill_sb WARN

From: Greg Kroah-Hartman

Date: Fri Nov 20 2026 - 05:22:07 EST


On Sat, Jul 25, 2026 at 02:08:34PM +0200, Ondřej Jirman wrote:
> From: Ondrej Jirman <megi@xxxxxx>
>
> ffs_data is zero-allocated and reset_work is only INIT_WORK'd on the
> FFS_DEACTIVATED path in set_alt/disable, which the normal flow never
> takes. ffs_fs_kill_sb() then cancel_work_sync()s it unconditionally,
> tripping the WARN_ON(!work->func) in __flush_work() with a NULL func.

How does that happen? What triggers it?

>
> Initialize reset_work once in ffs_data_new() and drop the redundant
> lazy INIT_WORK calls.
>
> Signed-off-by: Ondrej Jirman <megi@xxxxxx>

No fixes tag? No cc: stable?

What found this issue? How was it tested?

thanks,

greg k-h