patch for sound mmap oops in 2.1.63

Mark Pulford (markp@adl.auslink.net)
Sat, 15 Nov 1997 19:07:26 +1030 (CST)


The following patch fixes this oops which I get when quitting squake:

Negative d_count (-1) for dev/dsp
<00000000/00000000>
Unable to handle kernel NULL pointer dereference at virtual address
00000000
current->tss.cr3 = 00101000, %cr3 = 00101000
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c012e506>]
EFLAGS: 00010286
eax: 00000022 ebx: c1d95340 ecx: c01c63c0 edx: c1da6000
esi: ffffffff edi: 00010000 ebp: c1754240 esp: c1619f60
ds: 0018 es: 0018 ss: 0018
Process squake (pid: 505, process nr: 38, stackpage=c1619000)
Stack: c01ace08 ffffffff c0099720 c1630740 c1669860 40928000 c011a5f5 c1d95340
c1754240 ffffffff fffffffc 00000000 c1669260 c0110639 c1754240 c1618000
c01155ee c1754240 c1618000 ffffffff fffffffc 00000000 c0115756 00000000
Call Trace: [<c01ace08>] [<c011a5f5>] [<c0110639>] [<c01155ee>]
[<c0115756>] [<c010925a>]
Code: c7 05 00 00 00 00 00 00 00 00 83 c4 10 5b 5e c3 89 f6 53 8b

Using `/boot/System.map-2.1.63' to map addresses to symbols.

>>EIP: c012e506 <dput+da/ec>
Trace: c01ace08 <tvecs+20c0/4dd9>
Trace: c011a5f5 <exit_mmap+b1/d8>
Trace: c0110639 <mmput+19/30>
Trace: c01155ee <do_exit+96/1f0>
Trace: c0115756 <sys_exit+e/10>
Trace: c010925a <system_call+3a/40>
Code: c012e506 <dput+da/ec>
Code: c012e506 <dput+da/ec> c7 05 00 00 00 movl $0x0,0x0
Code: c012e50b <dput+df/ec> 00 00 00 00 00
Code: c012e516 <dput+ea/ec> 83 c4 10 addl $0x10,%esp
Code: c012e519 <d_invalidate+1/2c> 5b popl %ebx
Code: c012e51a <d_invalidate+2/2c> 5e popl %esi
Code: c012e51b <d_invalidate+3/2c> c3 ret
Code: c012e51c <d_invalidate+4/2c> 89 f6 movl %esi,%esi
Code: c012e51e <d_invalidate+6/2c> 53 pushl %ebx
Code: c012e51f <d_invalidate+7/2c> 8b 00 movl (%eax),%eax
Code: c012e527 <d_invalidate+f/2c> 90 nop
Code: c012e528 <d_invalidate+10/2c> 90 nop
Code: c012e529 <d_invalidate+11/2c> 90 nop

Regards,
Mark

--- soundcard.c_orig Sat Nov 15 17:11:56 1997
+++ soundcard.c Sat Nov 15 18:40:18 1997
@@ -327,7 +327,7 @@
vma->vm_page_prot))
return -EAGAIN;

- vma->vm_dentry = file->f_dentry;
+ vma->vm_dentry = dget(file->f_dentry);

dmap->mapping_flags |= DMA_MAP_MAPPED;