2002-07-29 15:12:54

by Axel H. Siebenwirth

[permalink] [raw]
Subject: 2.5.29: Oops at boot after mount of root fs (JFS)

Hi,

I get an oops during boot of 2.5.29. Since I have problems with JFS I
guessed it might be related to JFS. It happens right after rw mount of my
jfs root filesystem. At another attempt to boot not the rm process oops but
mount itself oopsed.

Checking root file system:
fsck 1.27 (18-Mar-2002)
fsck.jfs version 1.0.20, 21-Jun-2002
The current device is : /dev/hda3
Block size in bytes: 4096
File system size in blocks: 1492036
Phase 0 - Replay Journal Log
File System is clean.
Remounting root device with read-write enabled.
/dev/hda3 on / type jfs (rw)

Then I get this oops:

ksymoops 2.4.6 on i686 2.4.19-rc3-ac3. Options used
-V (default)
-K (specified)
-l /proc/modules (default)
-o /lib/modules/2.5.29/ (specified)
-m /boot/System.map-2.5.29 (specified)

No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel NULL pointer dereference at virtual address 0000005c
c014f3c9
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c014f3c9>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010246
eax: 00000000 ebx: 00000000 ecx: 0000005c edx: 00000044
esi: cb926960 edi: cbb14eac ebp: cb926960 esp: cb8c9f60
ds: 0018 es: 0018 ss: 0018
Stack: cbb14eac cb926960 cbbd0000 cb926960 cb8c9f80 c014f627 cbb14eac
cb926960
cbb1218c c11ed368 cbbd0005 00000004 01afef23 00000010 00000000
00000000
00000000 3d451c26 00001000 00000008 cb8c8000 bfffff41 00000000
bffffc8c
Call Trace: [<c014f627>] [<c010765f>]
Code: ff 405c 0f 8e d4 16 00 00 85 db 74 04 89 d8 eb be 89 34 24


>>EIP; c014f3c9 <vfs_unlink+79/1c0> <=====

Trace; c014f627 <sys_unlink+117/120>
Trace; c010765f <syscall_call+7/b>

Code; c014f3c9 <vfs_unlink+79/1c0>
00000000 <_EIP>:
Code; c014f3c9 <vfs_unlink+79/1c0> <=====
0: ff 5c 40 0f lcall *0xf(%eax,%eax,2) <=====
Code; c014f3cd <vfs_unlink+7d/1c0>
4: 8e d4 mov %esp,%ss
Code; c014f3cf <vfs_unlink+7f/1c0>
6: 16 push %ss
Code; c014f3d0 <vfs_unlink+80/1c0>
7: 00 00 add %al,(%eax)
Code; c014f3d2 <vfs_unlink+82/1c0>
9: 85 db test %ebx,%ebx
Code; c014f3d4 <vfs_unlink+84/1c0>
b: 74 04 je 11 <_EIP+0x11> c014f3da
<vfs_unlink+8a/1c0>
Code; c014f3d6 <vfs_unlink+86/1c0>
d: 89 d8 mov %ebx,%eax
Code; c014f3d8 <vfs_unlink+88/1c0>
f: eb be jmp ffffffcf <_EIP+0xffffffcf> c014f398
<vfs_unlink+48/1c0>
Code; c014f3da <vfs_unlink+8a/1c0>
11: 89 34 24 mov %esi,(%esp,1)


2002-07-29 15:19:16

by Dave Kleikamp

[permalink] [raw]
Subject: [PATCH] 2.5.29: Oops at boot after mount of root fs (JFS)

On Monday 29 July 2002 10:16, Axel Siebenwirth wrote:
> Hi,
>
> I get an oops during boot of 2.5.29. Since I have problems with JFS I
> guessed it might be related to JFS. It happens right after rw mount
> of my jfs root filesystem. At another attempt to boot not the rm
> process oops but mount itself oopsed.

JFS had two incorrect calls to d_delete in jfs_rmdir and jfs_unlink. They
were needed in the 2.2 kernel, and somehow they didn't do any apparent
harm until now.

Here is that patch I sent to Linus:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.511 -> 1.512
# fs/jfs/namei.c 1.13 -> 1.14
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/29 [email protected] 1.512
# Remove d_delete call from jfs_rmdir and jfs_unlink
#
# jfs_rmdir and jfs_unlink have always called d_delete, but it hasn't
# caused a problem until 2.5.28. The call is an artifact of the 2.2
# kernel, which had gone unnoticed in 2.4 and 2.5.
# --------------------------------------------
#
diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c Mon Jul 29 09:18:53 2002
+++ b/fs/jfs/namei.c Mon Jul 29 09:18:53 2002
@@ -399,8 +399,6 @@

IWRITE_UNLOCK(dip);

- d_delete(dentry);
-
out2:
free_UCSname(&dname);

@@ -542,8 +540,6 @@
}

IWRITE_UNLOCK(dip);
-
- d_delete(dentry);

out1:
free_UCSname(&dname);