USB: g_file_storage: call allow_signal()

New changes in the signal-handling code require compensating changes
in g_file_storage. This patch (as913) by Oleg Nesterov makes the
code use allow_signal() instead of sigprocmask().

From: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Oleg Nesterov and committed by Greg Kroah-Hartman 8cfbe7e6 18954864

+5 -7
+5 -7
drivers/usb/gadget/file_storage.c
··· 686 686 int thread_wakeup_needed; 687 687 struct completion thread_notifier; 688 688 struct task_struct *thread_task; 689 - sigset_t thread_signal_mask; 690 689 691 690 int cmnd_size; 692 691 u8 cmnd[MAX_COMMAND_SIZE]; ··· 3276 3277 /* Clear the existing signals. Anything but SIGUSR1 is converted 3277 3278 * into a high-priority EXIT exception. */ 3278 3279 for (;;) { 3279 - sig = dequeue_signal_lock(current, &fsg->thread_signal_mask, 3280 - &info); 3280 + sig = dequeue_signal_lock(current, &current->blocked, &info); 3281 3281 if (!sig) 3282 3282 break; 3283 3283 if (sig != SIGUSR1) { ··· 3429 3431 3430 3432 /* Allow the thread to be killed by a signal, but set the signal mask 3431 3433 * to block everything but INT, TERM, KILL, and USR1. */ 3432 - siginitsetinv(&fsg->thread_signal_mask, sigmask(SIGINT) | 3433 - sigmask(SIGTERM) | sigmask(SIGKILL) | 3434 - sigmask(SIGUSR1)); 3435 - sigprocmask(SIG_SETMASK, &fsg->thread_signal_mask, NULL); 3434 + allow_signal(SIGINT); 3435 + allow_signal(SIGTERM); 3436 + allow_signal(SIGKILL); 3437 + allow_signal(SIGUSR1); 3436 3438 3437 3439 /* Arrange for userspace references to be interpreted as kernel 3438 3440 * pointers. That way we can pass a kernel pointer to a routine