diff options
author | Jeff <jlayton@redhat.com> | 2007-06-25 18:16:35 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-06-25 18:16:35 -0400 |
commit | 5d9c720678f9b4ed3db86466223dc61cbf78361d (patch) | |
tree | 8bf8e4417a5c8a33b64227156476f053ea5829f0 /fs/cifs/connect.c | |
parent | ffdd6e4d1685779a413e4a8d753b1862259ed42a (diff) |
[CIFS] Do not allow signals in cifs_demultiplex_thread
Switch from send_sig to force_sig and do not allow signal for this
background thread (the signal is needed to wakeup the thread when
blocked in the network stack).
Signed-off-by: Jeff Layton <jlayton@readhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4a2af78083fb..cf606910cb68 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -348,7 +348,6 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
348 | int isMultiRsp; | 348 | int isMultiRsp; |
349 | int reconnect; | 349 | int reconnect; |
350 | 350 | ||
351 | allow_signal(SIGKILL); | ||
352 | current->flags |= PF_MEMALLOC; | 351 | current->flags |= PF_MEMALLOC; |
353 | server->tsk = current; /* save process info to wake at shutdown */ | 352 | server->tsk = current; /* save process info to wake at shutdown */ |
354 | cFYI(1, ("Demultiplex PID: %d", current->pid)); | 353 | cFYI(1, ("Demultiplex PID: %d", current->pid)); |
@@ -2089,7 +2088,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2089 | always wake up processes blocked in | 2088 | always wake up processes blocked in |
2090 | tcp in recv_mesg then we could remove the | 2089 | tcp in recv_mesg then we could remove the |
2091 | send_sig call */ | 2090 | send_sig call */ |
2092 | send_sig(SIGKILL,srvTcp->tsk,1); | 2091 | force_sig(SIGKILL,srvTcp->tsk); |
2093 | tsk = srvTcp->tsk; | 2092 | tsk = srvTcp->tsk; |
2094 | if(tsk) | 2093 | if(tsk) |
2095 | kthread_stop(tsk); | 2094 | kthread_stop(tsk); |
@@ -2106,9 +2105,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2106 | temp_rc = CIFSSMBLogoff(xid, pSesInfo); | 2105 | temp_rc = CIFSSMBLogoff(xid, pSesInfo); |
2107 | /* if the socketUseCount is now zero */ | 2106 | /* if the socketUseCount is now zero */ |
2108 | if ((temp_rc == -ESHUTDOWN) && | 2107 | if ((temp_rc == -ESHUTDOWN) && |
2109 | (pSesInfo->server) && (pSesInfo->server->tsk)) { | 2108 | (pSesInfo->server) && |
2109 | (pSesInfo->server->tsk)) { | ||
2110 | struct task_struct *tsk; | 2110 | struct task_struct *tsk; |
2111 | send_sig(SIGKILL,pSesInfo->server->tsk,1); | 2111 | force_sig(SIGKILL, |
2112 | pSesInfo->server->tsk); | ||
2112 | tsk = pSesInfo->server->tsk; | 2113 | tsk = pSesInfo->server->tsk; |
2113 | if (tsk) | 2114 | if (tsk) |
2114 | kthread_stop(tsk); | 2115 | kthread_stop(tsk); |
@@ -3364,9 +3365,9 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb) | |||
3364 | FreeXid(xid); | 3365 | FreeXid(xid); |
3365 | return 0; | 3366 | return 0; |
3366 | } else if (rc == -ESHUTDOWN) { | 3367 | } else if (rc == -ESHUTDOWN) { |
3367 | cFYI(1,("Waking up socket by sending it signal")); | 3368 | cFYI(1,("Waking up socket by sending signal")); |
3368 | if (cifsd_task) { | 3369 | if (cifsd_task) { |
3369 | send_sig(SIGKILL,cifsd_task,1); | 3370 | force_sig(SIGKILL,cifsd_task); |
3370 | kthread_stop(cifsd_task); | 3371 | kthread_stop(cifsd_task); |
3371 | } | 3372 | } |
3372 | rc = 0; | 3373 | rc = 0; |