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 316932 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]
Updated patch
linux-2.6-eliminate_usage_of_kthread_stop_for_cifsd-v4.patch (text/plain), 5.49 KB, created by
Olivier Fourdan
on 2008-09-17 10:00:47 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Olivier Fourdan
Created:
2008-09-17 10:00:47 UTC
Size:
5.49 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-17 09:54:24.000000000 +0100 >@@ -139,7 +139,7 @@ cifs_reconnect(struct TCP_Server_Info *s > 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 @@ cifs_reconnect(struct TCP_Server_Info *s > 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 @@ cifs_reconnect(struct TCP_Server_Info *s > } 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 @@ cifs_demultiplex_thread(struct TCP_Serve > 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 @@ incomplete_rcv: > &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 @@ incomplete_rcv: > 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 @@ multi_t2_fnd: > 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 @@ get_dfs_path(int xid, struct cifsSesInfo > 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,15 +2208,19 @@ cifs_mount(struct super_block *sb, struc > /* 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) { >+ down(&pSesInfo->sesSem); > atomic_inc(&pSesInfo->inUse); > tcon->retry = volume_info.retry; > tcon->nocase = volume_info.nocase; >+ up(&pSesInfo->sesSem); > } > } > } >@@ -2246,14 +2245,7 @@ cifs_mount(struct super_block *sb, struc > 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 */ >@@ -2270,15 +2262,20 @@ cifs_mount(struct super_block *sb, struc > (pSesInfo->server->tsk)) { > force_sig(SIGKILL, > pSesInfo->server->tsk); >- kthread_stop(pSesInfo->server->tsk); >+ /* Invalid the task struct to avoid a race with umount */ >+ pSesInfo->server->tsk = NULL; > } > } 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); >+ /* Invalid the task struct to avoid a race with umount */ >+ pSesInfo->server->tsk = NULL; > } > } > sesInfoFree(pSesInfo); >@@ -3602,10 +3599,8 @@ cifs_umount(struct super_block *sb, stru > 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 */ >@@ -3747,7 +3742,9 @@ int cifs_setup_session(unsigned int xid, > cERROR(1, ("Send error in SessSetup = %d", rc)); > } else { > cFYI(1, ("CIFS Session Established successfully")); >+ spin_lock(&GlobalMid_Lock); > pSesInfo->status = CifsGood; >+ spin_unlock(&GlobalMid_Lock); > } > } > ss_err_exit:
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