Linux USB
 help / color / mirror / Atom feed
* [PATCH v3 0/2] usb: gadget: f_fs: cancellation fix
@ 2026-11-19 15:19 Ingo Rohloff
  2026-11-19 15:19 ` [PATCH v3 1/2] usb: gadget: f_fs: register cancellation handler only after request queueing Ingo Rohloff
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ingo Rohloff @ 2026-11-19 15:19 UTC (permalink / raw)
  To: gregkh; +Cc: viro, nkapron, me, michael.bommarito, linux-usb, Ingo Rohloff

This 2 part patch series fixes a previous commit and does
some refactoring.

Note: The first patch in this series only applies cleanly, if
"[PATCH] usb: gadget: f_fs: Fix mmgrab()/mmdrop() balance."
is applied first.

Signed-off-by: Ingo Rohloff <ingo.rohloff@lauterbach.com>
---
Changes in v3:
- Neill remarked, that to avoid lockdep issues, spin_lock_irq/spin_unlock_irq
  is needed in ffs_user_copy_worker().
  Now solved differently via smp_cond_load_acquire(), avoiding a spinlock
  altogether.
- Revert order of patches:
  First cancellation fix, because this also applies to stable kernels,
  then refactoring (because this only applies to recent kernels).
- Add Stable and Fixes tags to (now) first patch.

Link to v2: https://lore.kernel.org/linux-usb/20261110171222.22633-3-ingo.rohloff@lauterbach.com/

Changes in v2:
- First patch "Fix mmgrab()/mmdrop() balance." now posted separately.
- Fix comment style and whitespace as requested by
  Neill Kapron <nkapron@google.com>
- Make sure io_data->kiocb->ki_complete() == aio_complete_rw()
  can't be called before kiocb_set_cancel_fn() has been called.
  That should it make safe to call kiocb_set_cancel_fn() after
  usb_ep_queue().

Link to v1: https://lore.kernel.org/r/20260901120908.14386-1-ingo.rohloff@lauterbach.com

---
Ingo Rohloff (2):
  usb: gadget: f_fs: register cancellation handler only after request
    queueing
  usb: gadget: f_fs: simplify error handling using goto

 drivers/usb/gadget/function/f_fs.c | 116 ++++++++++++++++-------------
 1 file changed, 66 insertions(+), 50 deletions(-)

--
2.55.0


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

end of thread, other threads:[~2026-11-20 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 15:19 [PATCH v3 0/2] usb: gadget: f_fs: cancellation fix Ingo Rohloff
2026-11-19 15:19 ` [PATCH v3 1/2] usb: gadget: f_fs: register cancellation handler only after request queueing Ingo Rohloff
2026-11-19 15:19 ` [PATCH v3 2/2] usb: gadget: f_fs: simplify error handling using goto Ingo Rohloff
2026-11-20 10:16 ` [PATCH v3 0/2] usb: gadget: f_fs: cancellation fix Greg KH
2026-11-20 10:29   ` Greg KH

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