Crash in exit_mmap()

ralf@uni-koblenz.de
Tue, 17 Mar 1998 12:53:27 +0100


Hi,

upgrading the MIPS port to 2.1.89 I ran into a crash in exit_mmap(). The
program counter points to 0x88037b3c which is in the inlined version of
remove_shared_vm_struct() in exit_mmap():

88037b1c <exit_mmap+90> lw $v1,44($s1)
88037b20 <exit_mmap+94> beqzl $v1,88037b70 <exit_mmap+e4>
88037b24 <exit_mmap+98> move $a0,$s2
88037b28 <exit_mmap+9c> lhu $v0,16($s1)
88037b2c <exit_mmap+a0> andi $v0,$v0,0x800
88037b30 <exit_mmap+a4> beqz $v0,88037b4c <exit_mmap+c0>
...
88037b38 <exit_mmap+ac> lw $v0,8($v1)
88037b3c <exit_mmap+b0> lw $v1,8($v0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C0_epc points here.

or in the source in mm/mmap.c:

[...]
static inline void remove_shared_vm_struct(struct vm_area_struct *vma)
{
struct file * file = vma->vm_file;

if (file) {
if (vma->vm_flags & VM_DENYWRITE)
file->f_dentry->d_inode->i_writecount++;
^^^^^^^
The kernel crashes when accessing f_dentry because file->f_dentry is NULL.

Is this a known bug?

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu