Re: 2.6.22-rc1-mm1 cifs_mount oops

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, May 22, 2007 - 7:22 pm

On Wed, 23 May 2007 00:50:13 +0000 "young dave" <hidave.darkstar@gmail.com> wrote:


I assume cifs_demultiplex_thread() took the SIGKILL, zeroed server->tsk
then exitted.  Then, cifs_mount() did a kthread_stop() on the now-NULL
pointer.

I don't see a non-racy way of fixing this as the code stands at present. 
This:

--- a/fs/cifs/connect.c~cifs-oops-fix
+++ a/fs/cifs/connect.c
@@ -2086,7 +2086,6 @@ cifs_mount(struct super_block *sb, struc
 					if ((temp_rc == -ESHUTDOWN) &&
 					   (pSesInfo->server) && (pSesInfo->server->tsk)) {
 						send_sig(SIGKILL,pSesInfo->server->tsk,1);
-						kthread_stop(pSesInfo->server->tsk);
 					}
 				} else
 					cFYI(1, ("No session or bad tcon"));
_

has a decent chance of fixing it.  But it's now racy against thread
*startup*: if we send SIGKILL to that task before it has done its
allow_signal(), it will presumably never get shut down.

Steve, can we just pull all the signal stuff out of there and use the
kthread machinery alone?

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.22-rc1-mm1 cifs_mount oops, young dave, (Tue May 22, 5:50 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Andrew Morton, (Tue May 22, 7:22 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, young dave, (Tue May 22, 7:59 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Andrew Morton, (Tue May 22, 8:21 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, young dave, (Wed May 23, 12:16 am)
Re: 2.6.22-rc1-mm1 cifs_mount oops, young dave, (Wed May 23, 1:37 am)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Steven French, (Wed May 23, 6:28 am)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Steven French, (Wed May 23, 6:56 am)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Andrew Morton, (Wed May 23, 9:10 am)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Steven French, (Wed May 23, 3:14 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, young dave, (Wed May 23, 6:05 pm)
Re: 2.6.22-rc1-mm1 cifs_mount oops, Steven French, (Wed May 23, 7:38 pm)