public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.26-git] Fix oops on remounting nfsroot
@ 2008-07-24  9:51 Atsushi Nemoto
  2008-07-24 21:29 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Atsushi Nemoto @ 2008-07-24  9:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Trond Myklebust

I got this oops when remounting nfsroot using busybox's mount:

VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 180k freed
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 801c3160, ra == 801744d0
...
Call Trace:
[<801c3160>] nfs_remount+0x60/0x2e0
[<801744d0>] do_remount_sb+0x184/0x1fc
[<8018b7a8>] do_remount+0x140/0x194
[<8018d824>] do_mount+0x138/0x1f0
[<8018d970>] sys_mount+0x94/0x1b4
[<80108df0>] stack_done+0x20/0x3c

This is a quick workaround, but I'm not sure this is proper fix.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 1b94e36..adc96cd 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1718,7 +1718,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
 	 * ones were explicitly specified. Fall back to legacy behavior and
 	 * just return success.
 	 */
-	if ((nfsvers == 4 && options4->version == 1) ||
+	if (!options ||
+	    (nfsvers == 4 && options4->version == 1) ||
 	    (nfsvers <= 3 && options->version >= 1 &&
 	     options->version <= 6))
 		return 0;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6.26-git] Fix oops on remounting nfsroot
  2008-07-24  9:51 [PATCH 2.6.26-git] Fix oops on remounting nfsroot Atsushi Nemoto
@ 2008-07-24 21:29 ` Trond Myklebust
  2008-07-25 14:59   ` Atsushi Nemoto
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2008-07-24 21:29 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-kernel

On Thu, 2008-07-24 at 18:51 +0900, Atsushi Nemoto wrote:
> I got this oops when remounting nfsroot using busybox's mount:
> 
> VFS: Mounted root (nfs filesystem) readonly.
> Freeing unused kernel memory: 180k freed
> CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 801c3160, ra == 801744d0
> ...
> Call Trace:
> [<801c3160>] nfs_remount+0x60/0x2e0
> [<801744d0>] do_remount_sb+0x184/0x1fc
> [<8018b7a8>] do_remount+0x140/0x194
> [<8018d824>] do_mount+0x138/0x1f0
> [<8018d970>] sys_mount+0x94/0x1b4
> [<80108df0>] stack_done+0x20/0x3c
> 
> This is a quick workaround, but I'm not sure this is proper fix.
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 1b94e36..adc96cd 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -1718,7 +1718,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
>  	 * ones were explicitly specified. Fall back to legacy behavior and
>  	 * just return success.
>  	 */
> -	if ((nfsvers == 4 && options4->version == 1) ||
> +	if (!options ||
> +	    (nfsvers == 4 && options4->version == 1) ||
>  	    (nfsvers <= 3 && options->version >= 1 &&
>  	     options->version <= 6))
>  		return 0;

Hi,

The above is almost correct. You need to test for options4 if the
filesystem is NFSv4.

Marc Zyngier sent me a patch for the same problem a couple of days ago,
but I have yet to pass it on to Linus.

Thanks
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6.26-git] Fix oops on remounting nfsroot
  2008-07-24 21:29 ` Trond Myklebust
@ 2008-07-25 14:59   ` Atsushi Nemoto
  0 siblings, 0 replies; 3+ messages in thread
From: Atsushi Nemoto @ 2008-07-25 14:59 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-kernel

On Thu, 24 Jul 2008 14:29:43 -0700, Trond Myklebust <Trond.Myklebust@netapp.com> wrote:
> > +	if (!options ||
> > +	    (nfsvers == 4 && options4->version == 1) ||
> >  	    (nfsvers <= 3 && options->version >= 1 &&
> >  	     options->version <= 6))
> >  		return 0;
> 
> The above is almost correct. You need to test for options4 if the
> filesystem is NFSv4.

But options == options4 == raw_data ;)

> Marc Zyngier sent me a patch for the same problem a couple of days ago,
> but I have yet to pass it on to Linus.

OK, I'll wait that patch merged.  Thanks.

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-25 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24  9:51 [PATCH 2.6.26-git] Fix oops on remounting nfsroot Atsushi Nemoto
2008-07-24 21:29 ` Trond Myklebust
2008-07-25 14:59   ` Atsushi Nemoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox