Commit d015f3ec authored by Matthijs van Duin's avatar Matthijs van Duin Committed by H. Nikolaus Schaller
Browse files

f_mass_storage: fix potentially unsafe thread wakeup

Signalling from interrupt to thread using a variable should always
either mark that variable 'volatile' or use a suitable barrier.
parent c4f5c41a
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/usb/gadget/f_mass_storage.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ struct fsg_common {
	unsigned int		bad_lun_okay:1;
	unsigned int		running:1;

	int			thread_wakeup_needed;
	int volatile		thread_wakeup_needed;
	struct completion	thread_notifier;
	struct task_struct	*thread_task;