Skip to contentSkip to conversation

2.5.62, bootup, do_add_mount

OOPS David Ford 4 participants 5 messages Feb 22, 2003 – Feb 25, 2003

lore
Share & tools
lore

David Ford

author
#0 lore raw

Pentium II, kernel compiled with gcc 2.95.3

[...]
802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
BIOS EDD facility v0.09 2003-Jan-22, 3 devices found
ACPI: (supports S0 S1 S4 S5)
Started krxiod 12
Started krxsecd 13
(filter_get_filter_fs,l. 234): ops at c05d4918 (fs/intermezzo/super.c:presto_get_sb,l. 253 1): Presto: unrecognized fs type or cache type

Unable to handle kernel NULL pointer dereference at virtual address 0000003c
printing eip:
c016a6a4
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0060:[<c016a6a4>]    Not tainted
EFLAGS: 00010217

EIP is at do_kern_mount+0x58/0xa8
eax: 00000000 ebx: c3fe9720 ecx: c3f55000 edx: c3f55010
esi: 00000000 edi: c05124a0 ebp: c3fcbee0 esp: c3fcbed4
ds: 007b es: 007b ss: 0068
Process swapper (pid: 1, threadinfo=c3fca000 task=c3fc8000)

Stack: 00008001 c3fca000 c3e2800a c3fcbf04 c0186546 c3e28000 00008001 c11ff000
      00000000 00008001 00000000 c3fcbf38 c3fcbf54 c018683d c3fcbf38 
c3e28000
      00008001 00000000 c11ff000 00000000 c3fca000 00000001 c3e29000 
c11ff000
Call Trace:
[<c0186546>] do_add_mount+0x62/0x150
[<c018683d>] do_mount+0x139/0x150
[<c018718e>] sys_mount+0x136/0x224
[<c010545e>] prepare_namespace+0xfe/0x140
[<c01051a5>] init+0xcd/0x288
[<c01050d8>] init+0x0/0x288
[<c0107211>] kernel_thread_helper+0x5/0xc

Code: 8b 46 3c 85 c0 74 06 ff 00 80 48 04 08 89 43 10 8b 46 3c 89

<0>Kernel panic: Attempted to kill init!

Signature · 4 lines
I may have the information you need and I may choose only HTML.  It's up to you. Disclaimer: I am not responsible for any email that you send me nor am I bound to any obligation to deal with any received email in any given fashion.  If you send me spam or a virus, I may in whole or part send you 50,000 return copies of it. I may also publically announce any and all emails and post them to message boards, news sites, and even parody sites.  I may also mark them up, cut and paste, print, and staple them to telephone poles for the enjoyment of people without internet access.  This is not a confidential medium and your assumption that your email can or will be handled confidentially is akin to baring your backside, burying your head in the ground, and thinking nobody can see you butt nekkid and in plain view for miles away.  Don't be a cluebert, buy one from K-mart today.

When it absolutely, positively, has to be destroyed overnight.
                          AIR FORCE
#1 lore raw

Hi Peter,

presto_get_sb() is returning error resulting in the following NULL pointer reference in do_kern_mount(). The following patch corrects it.

Please let me know if it is correct or not.

Thanks
Maneesh

fs/intermezzo/super.c +1 -1
diff -urN linux-2.5.63-base/fs/intermezzo/super.c linux-2.5.63-presto_get_sb/fs/intermezzo/super.c
@@ -318,7 +318,7 @@
 
         CDEBUG(D_MALLOC, "mount error exit: kmem %ld, vmem %ld\n",
                presto_kmemory, presto_vmemory);
-        return NULL;
+        return sb;
 }
 
Quoted 67 lines · David Ford

Pentium II, kernel compiled with gcc 2.95.3

[...]
802.1Q VLAN Support v1.8 Ben Greear <[email protected]> All bugs added by David S. Miller <[email protected]>
BIOS EDD facility v0.09 2003-Jan-22, 3 devices found
ACPI: (supports S0 S1 S4 S5)
Started krxiod 12
Started krxsecd 13
(filter_get_filter_fs,l. 234): ops at c05d4918 (fs/intermezzo/super.c:presto_get_sb,l. 253 1): Presto: unrecognized fs type or cache type

Unable to handle kernel NULL pointer dereference at virtual address 0000003c
printing eip:
c016a6a4
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0060:[<c016a6a4>]    Not tainted
EFLAGS: 00010217

EIP is at do_kern_mount+0x58/0xa8
eax: 00000000 ebx: c3fe9720 ecx: c3f55000 edx: c3f55010
esi: 00000000 edi: c05124a0 ebp: c3fcbee0 esp: c3fcbed4
ds: 007b es: 007b ss: 0068
Process swapper (pid: 1, threadinfo=c3fca000 task=c3fc8000)

Stack: 00008001 c3fca000 c3e2800a c3fcbf04 c0186546 c3e28000 00008001 
c11ff000
      00000000 00008001 00000000 c3fcbf38 c3fcbf54 c018683d c3fcbf38 
c3e28000
      00008001 00000000 c11ff000 00000000 c3fca000 00000001 c3e29000 
c11ff000
Call Trace:
[<c0186546>] do_add_mount+0x62/0x150
[<c018683d>] do_mount+0x139/0x150
[<c018718e>] sys_mount+0x136/0x224
[<c010545e>] prepare_namespace+0xfe/0x140
[<c01051a5>] init+0xcd/0x288
[<c01050d8>] init+0x0/0x288
[<c0107211>] kernel_thread_helper+0x5/0xc

Code: 8b 46 3c 85 c0 74 06 ff 00 80 48 04 08 89 43 10 8b 46 3c 89

<0>Kernel panic: Attempted to kill init!

Signature · 22 lines
I may have the information you need and I may choose only HTML.  It's up to 
you. Disclaimer: I am not responsible for any email that you send me nor am 
I bound to any obligation to deal with any received email in any given 
fashion.  If you send me spam or a virus, I may in whole or part send you 
50,000 return copies of it. I may also publically announce any and all 
emails and post them to message boards, news sites, and even parody sites.  
I may also mark them up, cut and paste, print, and staple them to telephone 
poles for the enjoyment of people without internet access.  This is not a 
confidential medium and your assumption that your email can or will be 
handled confidentially is akin to baring your backside, burying your head 
in the ground, and thinking nobody can see you butt nekkid and in plain 
view for miles away.  Don't be a cluebert, buy one from K-mart today.

When it absolutely, positively, has to be destroyed overnight.
                          AIR FORCE


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 5 lines
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: [email protected]
http://lse.sourceforge.net/
#2 lore raw
Quoted 8 lines · Maneesh Soni

Hi Peter,

presto_get_sb() is returning error resulting in the following NULL pointer reference in do_kern_mount(). The following patch corrects it.

It should be returning some ERR_PTR value. Seems that presto_get_sb() isn't very careful in tracking the reason for the failed mount, so

	return ERR_PTR(-EINVAL);

should suffice.

#3 lore raw
Quoted 10 lines · Andrew Morton
Quoted 8 lines · Maneesh Soni

Hi Peter,

presto_get_sb() is returning error resulting in the following NULL pointer reference in do_kern_mount(). The following patch corrects it.

Quoted 6 lines

It should be returning some ERR_PTR value. Seems that presto_get_sb() isn't very careful in tracking the reason for the failed mount, so

	return ERR_PTR(-EINVAL);

should suffice.

Actually previous fix I posted is not correct also. Returning -EINVAL seems logical.

fs/intermezzo/super.c +1 -1
diff -urN linux-2.5.63-base/fs/intermezzo/super.c linux-2.5.63-presto_get_sb/fs/intermezzo/super.c
@@ -318,7 +318,7 @@
 
         CDEBUG(D_MALLOC, "mount error exit: kmem %ld, vmem %ld\n",
                presto_kmemory, presto_vmemory);
-        return NULL;
+        return ERR_PTR(-EINVAL);
 }
 
 

Regards,
Maneesh

Signature · 5 lines
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: [email protected]
http://lse.sourceforge.net/
#4 lore raw

This looks good to me. Chen Yang, can you make sure this makes it into our CVS also?

- Peter -

Quoted 34 lines · Maneesh Soni
Quoted 10 lines · Andrew Morton
Quoted 8 lines · Maneesh Soni

Hi Peter,

presto_get_sb() is returning error resulting in the following NULL pointer reference in do_kern_mount(). The following patch corrects it.

Quoted 6 lines

It should be returning some ERR_PTR value. Seems that presto_get_sb() isn't very careful in tracking the reason for the failed mount, so

	return ERR_PTR(-EINVAL);

should suffice.

Actually previous fix I posted is not correct also. Returning -EINVAL seems logical.

diff -urN linux-2.5.63-base/fs/intermezzo/super.c linux-2.5.63-presto_get_sb/fs/intermezzo/super.c

fs/intermezzo/super.c +1 -1
@@ -318,7 +318,7 @@
 
         CDEBUG(D_MALLOC, "mount error exit: kmem %ld, vmem %ld\n",
                presto_kmemory, presto_vmemory);
-        return NULL;
+        return ERR_PTR(-EINVAL);
 }
 
 
Quoted 9 lines

Regards,
Maneesh

Signature · 5 lines
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: [email protected]
http://lse.sourceforge.net/

- Peter -