Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316764 Details for
Bug 462150
Concurrent CIFS mount/umount processes to same windows machine, different shares hangs umount processes or crashes kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
...also adds locking arround CIFSTCon()
linux-2.6-eliminate_usage_of_kthread_stop_for_cifsd.patch (text/plain), 4.54 KB, created by
Olivier Fourdan
on 2008-09-15 17:24:43 UTC
(
hide
)
Description:
...also adds locking arround CIFSTCon()
Filename:
MIME Type:
Creator:
Olivier Fourdan
Created:
2008-09-15 17:24:43 UTC
Size:
4.54 KB
patch
obsolete
>--- linux-2.6.18.i686/fs/cifs/connect.c.cifs 2008-09-09 15:31:57.000000000 +0100 >+++ linux-2.6.18.i686/fs/cifs/connect.c 2008-09-15 17:56:45.000000000 +0100 >@@ -139,7 +139,7 @@ > struct mid_q_entry *mid_entry; > > spin_lock(&GlobalMid_Lock); >- if (kthread_should_stop()) { >+ if (server->tcpStatus == CifsExiting) { > /* the demux thread will exit normally > next time through the loop */ > spin_unlock(&GlobalMid_Lock); >@@ -201,7 +201,8 @@ > spin_unlock(&GlobalMid_Lock); > up(&server->tcpSem); > >- while ((!kthread_should_stop()) && (server->tcpStatus != CifsGood)) { >+ while ((server->tcpStatus != CifsExiting) && >+ (server->tcpStatus != CifsGood)) { > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 12) > try_to_freeze(); > #endif >@@ -220,7 +221,7 @@ > } else { > atomic_inc(&tcpSesReconnectCount); > spin_lock(&GlobalMid_Lock); >- if (!kthread_should_stop()) >+ if (server->tcpStatus != CifsExiting) > server->tcpStatus = CifsGood; > server->sequence_number = 0; > spin_unlock(&GlobalMid_Lock); >@@ -394,7 +395,7 @@ > set_freezable(); > #endif > >- while (!kthread_should_stop()) { >+ while (server->tcpStatus != CifsExiting) { > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 12) > if (try_to_freeze()) > continue; >@@ -444,7 +445,7 @@ > &iov, 1, pdu_length, 0 /* BB other flags? */); > #endif > >- if (kthread_should_stop()) { >+ if (server->tcpStatus == CifsExiting) { > break; > } else if (server->tcpStatus == CifsNeedReconnect) { > cFYI(1, ("Reconnect after server stopped responding")); >@@ -578,7 +579,7 @@ > length = kernel_recvmsg(csocket, &smb_msg, &iov, 1, > pdu_length - total_read, 0); > #endif >- if (kthread_should_stop() || >+ if ((server->tcpStatus == CifsExiting) || > (length == -EINTR)) { > /* then will exit */ > reconnect = 2; >@@ -707,14 +708,6 @@ > spin_unlock(&GlobalMid_Lock); > wake_up_all(&server->response_q); > >- /* don't exit until kthread_stop is called */ >- set_current_state(TASK_UNINTERRUPTIBLE); >- while (!kthread_should_stop()) { >- schedule(); >- set_current_state(TASK_UNINTERRUPTIBLE); >- } >- set_current_state(TASK_RUNNING); >- > /* check if we have blocked requests that need to free */ > /* Note that cifs_max_pending is normally 50, but > can be set at module install time to as little as two */ >@@ -1491,7 +1484,9 @@ > temp_unc[1] = '\\'; > strcpy(temp_unc + 2, pSesInfo->serverName); > strcpy(temp_unc + 2 + strlen(pSesInfo->serverName), "\\IPC$"); >+ down(&pSesInfo->sesSem); > rc = CIFSTCon(xid, pSesInfo, temp_unc, NULL, nls_codepage); >+ up(&pSesInfo->sesSem); > cFYI(1, > ("CIFS Tcon rc = %d ipc_tid = %d", rc, pSesInfo->ipc_tid)); > kfree(temp_unc); >@@ -2213,9 +2208,11 @@ > /* BB Do we need to wrap sesSem around > * this TCon call and Unix SetFS as > * we do on SessSetup and reconnect? */ >+ down(&pSesInfo->sesSem); > rc = CIFSTCon(xid, pSesInfo, > volume_info.UNC, > tcon, cifs_sb->local_nls); >+ up(&pSesInfo->sesSem); > cFYI(1, ("CIFS Tcon rc = %d", rc)); > } > if (!rc) { >@@ -2246,14 +2243,7 @@ > spin_lock(&GlobalMid_Lock); > srvTcp->tcpStatus = CifsExiting; > spin_unlock(&GlobalMid_Lock); >- if (srvTcp->tsk) { >- /* If we could verify that kthread_stop would >- always wake up processes blocked in >- tcp in recv_mesg then we could remove the >- send_sig call */ >- force_sig(SIGKILL, srvTcp->tsk); >- kthread_stop(srvTcp->tsk); >- } >+ force_sig(SIGKILL, srvTcp->tsk); > } > /* If find_unc succeeded then rc == 0 so we can not end */ > if (tcon) /* up accidently freeing someone elses tcon struct */ >@@ -2267,18 +2257,18 @@ > /* if the socketUseCount is now zero */ > if ((temp_rc == -ESHUTDOWN) && > (pSesInfo->server) && >- (pSesInfo->server->tsk)) { >+ (pSesInfo->server->tsk)) > force_sig(SIGKILL, > pSesInfo->server->tsk); >- kthread_stop(pSesInfo->server->tsk); >- } > } else { > cFYI(1, ("No session or bad tcon")); > if ((pSesInfo->server) && > (pSesInfo->server->tsk)) { >+ spin_lock(&GlobalMid_Lock); >+ srvTcp->tcpStatus = CifsExiting; >+ spin_unlock(&GlobalMid_Lock); > force_sig(SIGKILL, > pSesInfo->server->tsk); >- kthread_stop(pSesInfo->server->tsk); > } > } > sesInfoFree(pSesInfo); >@@ -3602,10 +3592,8 @@ > return 0; > } else if (rc == -ESHUTDOWN) { > cFYI(1, ("Waking up socket by sending signal")); >- if (cifsd_task) { >+ if (cifsd_task) > force_sig(SIGKILL, cifsd_task); >- kthread_stop(cifsd_task); >- } > rc = 0; > } /* else - we have an smb session > left on this socket do not kill cifsd */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 462150
:
316764
|
316776
|
316932
|
319417
|
319418
|
319419
|
319420
|
320000
|
320011
|
320186