diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index c6b6479fa4dd..4639b629e60c 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -686,7 +686,6 @@ struct fsg_dev { | |||
686 | int thread_wakeup_needed; | 686 | int thread_wakeup_needed; |
687 | struct completion thread_notifier; | 687 | struct completion thread_notifier; |
688 | struct task_struct *thread_task; | 688 | struct task_struct *thread_task; |
689 | sigset_t thread_signal_mask; | ||
690 | 689 | ||
691 | int cmnd_size; | 690 | int cmnd_size; |
692 | u8 cmnd[MAX_COMMAND_SIZE]; | 691 | u8 cmnd[MAX_COMMAND_SIZE]; |
@@ -3277,8 +3276,7 @@ static void handle_exception(struct fsg_dev *fsg) | |||
3277 | /* Clear the existing signals. Anything but SIGUSR1 is converted | 3276 | /* Clear the existing signals. Anything but SIGUSR1 is converted |
3278 | * into a high-priority EXIT exception. */ | 3277 | * into a high-priority EXIT exception. */ |
3279 | for (;;) { | 3278 | for (;;) { |
3280 | sig = dequeue_signal_lock(current, &fsg->thread_signal_mask, | 3279 | sig = dequeue_signal_lock(current, ¤t->blocked, &info); |
3281 | &info); | ||
3282 | if (!sig) | 3280 | if (!sig) |
3283 | break; | 3281 | break; |
3284 | if (sig != SIGUSR1) { | 3282 | if (sig != SIGUSR1) { |
@@ -3431,10 +3429,10 @@ static int fsg_main_thread(void *fsg_) | |||
3431 | 3429 | ||
3432 | /* Allow the thread to be killed by a signal, but set the signal mask | 3430 | /* Allow the thread to be killed by a signal, but set the signal mask |
3433 | * to block everything but INT, TERM, KILL, and USR1. */ | 3431 | * to block everything but INT, TERM, KILL, and USR1. */ |
3434 | siginitsetinv(&fsg->thread_signal_mask, sigmask(SIGINT) | | 3432 | allow_signal(SIGINT); |
3435 | sigmask(SIGTERM) | sigmask(SIGKILL) | | 3433 | allow_signal(SIGTERM); |
3436 | sigmask(SIGUSR1)); | 3434 | allow_signal(SIGKILL); |
3437 | sigprocmask(SIG_SETMASK, &fsg->thread_signal_mask, NULL); | 3435 | allow_signal(SIGUSR1); |
3438 | 3436 | ||
3439 | /* Arrange for userspace references to be interpreted as kernel | 3437 | /* Arrange for userspace references to be interpreted as kernel |
3440 | * pointers. That way we can pass a kernel pointer to a routine | 3438 | * pointers. That way we can pass a kernel pointer to a routine |