gadgetfs: ep_io - wait until IRQ finishes
authorJozef Martiniak <jomajm@gmail.com>
Fri, 8 Jul 2022 07:06:44 +0000 (09:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:09:30 +0000 (11:09 +0200)
commit67a4874461422e633236a0286a01b483cd647113
tree3878063612d5ff2d71f4f458617249aa7b8125de
parentfe6fe64403710287f0ae61a516954d8a4f7c9e3f
gadgetfs: ep_io - wait until IRQ finishes

[ Upstream commit 04cb742d4d8f30dc2e83b46ac317eec09191c68e ]

after usb_ep_queue() if wait_for_completion_interruptible() is
interrupted we need to wait until IRQ gets finished.

Otherwise complete() from epio_complete() can corrupt stack.

Signed-off-by: Jozef Martiniak <jomajm@gmail.com>
Link: https://lore.kernel.org/r/20220708070645.6130-1-jomajm@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/legacy/inode.c