Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8cfbe7e60d9618d8f80a3cd218c45dd64cb9e5cf
Commit:     8cfbe7e60d9618d8f80a3cd218c45dd64cb9e5cf
Parent:     189548642c5962e60c3667bdb3a703fe0bed12a6
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Wed May 30 11:06:33 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Mon Jun 25 23:38:05 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 c6b6479..4639b62 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -686,7 +686,6 @@ struct fsg_dev {
        int                     thread_wakeup_needed;
        struct completion       thread_notifier;
        struct task_struct      *thread_task;
-       sigset_t                thread_signal_mask;
 
        int                     cmnd_size;
        u8                      cmnd[MAX_COMMAND_SIZE];
@@ -3277,8 +3276,7 @@ static void handle_exception(struct fsg_dev *fsg)
        /* Clear the existing signals.  Anything but SIGUSR1 is converted
         * into a high-priority EXIT exception. */
        for (;;) {
-               sig = dequeue_signal_lock(current, &fsg->thread_signal_mask,
-                               &info);
+               sig = dequeue_signal_lock(current, &current->blocked, &info);
                if (!sig)
                        break;
                if (sig != SIGUSR1) {
@@ -3431,10 +3429,10 @@ static int fsg_main_thread(void *fsg_)
 
        /* Allow the thread to be killed by a signal, but set the signal mask
         * to block everything but INT, TERM, KILL, and USR1. */
-       siginitsetinv(&fsg->thread_signal_mask, sigmask(SIGINT) |
-                       sigmask(SIGTERM) | sigmask(SIGKILL) |
-                       sigmask(SIGUSR1));
-       sigprocmask(SIG_SETMASK, &fsg->thread_signal_mask, NULL);
+       allow_signal(SIGINT);
+       allow_signal(SIGTERM);
+       allow_signal(SIGKILL);
+       allow_signal(SIGUSR1);
 
        /* Arrange for userspace references to be interpreted as kernel
         * pointers.  That way we can pass a kernel pointer to a routine
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to