mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
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>
This commit is contained in:
parent
927907f1cb
commit
ca06b4cde5
1 changed files with 1 additions and 0 deletions
|
|
@ -362,6 +362,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
|
|||
spin_unlock_irq (&epdata->dev->lock);
|
||||
|
||||
DBG (epdata->dev, "endpoint gone\n");
|
||||
wait_for_completion(&done);
|
||||
epdata->status = -ENODEV;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue