Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
MAIL PROTECTED] cc "Andrew Morton" <[EMAIL PROTECTED]>, David Kleikamp/Austin/[EMAIL PROTECTED], "Linux Kernel Mailing List" , Shirish S Pargaonkar/Austin/[EMAIL PROTECTED] Subject Re: 2.6.22-rc1-mm1 cifs_mount oops Hi, I have one problem about this: after the srvT

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, I have one problem about this: after the srvTcp->tsk is set to NULL (maybe the thread is still there, isn't it?), is the kthread still needed to be stopped by calling kthread_stop()? If it is true, then the task_struct should be saved before send_sig like my patch:

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
> This can end up running kthread_stop() against an already-exited task. I don't think so since cifs_demultiplex_thread waits sufficiently long before exit but after setting srvTcp->tsk to zero (the wait is immediately after waking up any processes that may be blocked on requests on this socket

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Andrew Morton
On Wed, 23 May 2007 08:28:47 -0500 Steven French <[EMAIL PROTECTED]> wrote: > Yes - this patch looks better. > > I also am not sure whether the send_sig is still necessary to wake up a > thread blocked in tcp recv_msg (only do a wake_up_process vs. doing a > send_sig(SIGKILL) ) > > Unless

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steve French
This is what I now have in the cifs git tree. (only minor change is that I now have since fixed the missing space after the if) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 216fb62..f6963d1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2069,8 +2069,15 @@

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
TED]> cc "Linux Kernel Mailing List" , Steven French/Austin/[EMAIL PROTECTED] Subject Re: 2.6.22-rc1-mm1 cifs_mount oops On Wed, 23 May 2007 00:50:13 + "young dave" <[EMAIL PROTECTED]> wrote: > Hi, > when I use mount -t cifs , the kernel oops, seems

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
Yes - this patch looks better. I also am not sure whether the send_sig is still necessary to wake up a thread blocked in tcp recv_msg (only do a wake_up_process vs. doing a send_sig(SIGKILL) ) Unless someone knows for sure whether the send_sig is redundant, I would like to merge Shaggy's

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, Sorry for the wrong patch in my last post. How about save the tsk then call kthread_stop like this: diff -udr linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++ linux.new/fs/cifs/connect.c 2007-05-23 16:33:54.0

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, Yeah, that's racy: once we've sent the signal, the kernel thread can write NULL to srvTcp->tsk at any time. Yes, here is another patch : diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, Yeah, that's racy: once we've sent the signal, the kernel thread can write NULL to srvTcp-tsk at any time. Yes, here is another patch : diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, Sorry for the wrong patch in my last post. How about save the tsk then call kthread_stop like this: diff -udr linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++ linux.new/fs/cifs/connect.c 2007-05-23 16:33:54.0

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
Yes - this patch looks better. I also am not sure whether the send_sig is still necessary to wake up a thread blocked in tcp recv_msg (only do a wake_up_process vs. doing a send_sig(SIGKILL) ) Unless someone knows for sure whether the send_sig is redundant, I would like to merge Shaggy's

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
List linux-kernel@vger.kernel.org, Steven French/Austin/[EMAIL PROTECTED] Subject Re: 2.6.22-rc1-mm1 cifs_mount oops On Wed, 23 May 2007 00:50:13 + young dave [EMAIL PROTECTED] wrote: Hi, when I use mount -t cifs , the kernel oops, seems break at kthread_stop, I'm not sure

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steve French
This is what I now have in the cifs git tree. (only minor change is that I now have since fixed the missing space after the if) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 216fb62..f6963d1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2069,8 +2069,15 @@

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Andrew Morton
On Wed, 23 May 2007 08:28:47 -0500 Steven French [EMAIL PROTECTED] wrote: Yes - this patch looks better. I also am not sure whether the send_sig is still necessary to wake up a thread blocked in tcp recv_msg (only do a wake_up_process vs. doing a send_sig(SIGKILL) ) Unless someone

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
This can end up running kthread_stop() against an already-exited task. I don't think so since cifs_demultiplex_thread waits sufficiently long before exit but after setting srvTcp-tsk to zero (the wait is immediately after waking up any processes that may be blocked on requests on this socket

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread young dave
Hi, I have one problem about this: after the srvTcp-tsk is set to NULL (maybe the thread is still there, isn't it?), is the kthread still needed to be stopped by calling kthread_stop()? If it is true, then the task_struct should be saved before send_sig like my patch:

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-23 Thread Steven French
List linux-kernel@vger.kernel.org, Shirish S Pargaonkar/Austin/[EMAIL PROTECTED] Subject Re: 2.6.22-rc1-mm1 cifs_mount oops Hi, I have one problem about this: after the srvTcp-tsk is set to NULL (maybe the thread is still there, isn't it?), is the kthread still needed to be stopped

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread Andrew Morton
On Wed, 23 May 2007 02:59:07 + "young dave" <[EMAIL PROTECTED]> wrote: > Hi, > maybe we can add if sentence before kthread_stop. > > diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c > --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + > +++

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread young dave
Hi, maybe we can add if sentence before kthread_stop. diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++ linux.new/fs/cifs/connect.c 2007-05-23 10:58:39.0 + @@ -2070,7 +2070,8 @@

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread Andrew Morton
On Wed, 23 May 2007 00:50:13 + "young dave" <[EMAIL PROTECTED]> wrote: > Hi, > when I use mount -t cifs , the kernel oops, seems break at > kthread_stop, I'm not sure. > > But if I add the CONFIG_CIFS_DEBUG2=y to config file, rebuild kernel, > then the oops disappeared. > > Below is the

2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread young dave
Hi, when I use mount -t cifs , the kernel oops, seems break at kthread_stop, I'm not sure. But if I add the CONFIG_CIFS_DEBUG2=y to config file, rebuild kernel, then the oops disappeared. Below is the oops message: BUG: unable to handle kernel NULL pointer dereference at virtual address

2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread young dave
Hi, when I use mount -t cifs , the kernel oops, seems break at kthread_stop, I'm not sure. But if I add the CONFIG_CIFS_DEBUG2=y to config file, rebuild kernel, then the oops disappeared. Below is the oops message: BUG: unable to handle kernel NULL pointer dereference at virtual address

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread Andrew Morton
On Wed, 23 May 2007 00:50:13 + young dave [EMAIL PROTECTED] wrote: Hi, when I use mount -t cifs , the kernel oops, seems break at kthread_stop, I'm not sure. But if I add the CONFIG_CIFS_DEBUG2=y to config file, rebuild kernel, then the oops disappeared. Below is the oops message:

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread young dave
Hi, maybe we can add if sentence before kthread_stop. diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++ linux.new/fs/cifs/connect.c 2007-05-23 10:58:39.0 + @@ -2070,7 +2070,8 @@

Re: 2.6.22-rc1-mm1 cifs_mount oops

2007-05-22 Thread Andrew Morton
On Wed, 23 May 2007 02:59:07 + young dave [EMAIL PROTECTED] wrote: Hi, maybe we can add if sentence before kthread_stop. diff -ur linux/fs/cifs/connect.c linux.new/fs/cifs/connect.c --- linux/fs/cifs/connect.c 2007-05-23 10:59:13.0 + +++ linux.new/fs/cifs/connect.c