Messages in this thread Patch in this message | | | Date | Wed, 9 Jun 1999 16:44:03 +0100 (GMT) | From | Tim Waugh <> | Subject | Re: oops with 2.2.9 |
| |
This looks like filp->f_op is NULL. If I understand correctly that's allowed, so perhaps this patch is all that's needed:
--- linux-2.2.9/fs/locks.c~ Wed Jun 9 16:39:33 1999 +++ linux-2.2.9/fs/locks.c Wed Jun 9 16:42:20 1999 @@ -512,7 +512,9 @@ while ((fl = *before) != NULL) { if ((fl->fl_flags & FL_FLOCK) && fl->fl_file == filp) { int (*lock)(struct file *, int, struct file_lock *); - lock = filp->f_op->lock; + lock = NULL; + if (filp->f_op) + lock = filp->f_op->lock; if (lock) { file_lock = *fl; file_lock.fl_type = F_UNLCK; Tim. */
On Fri, 4 Jun 1999, Oleg Drokin wrote:
> Options used: -V (default) > -o /lib/modules/2.2.9/ (default) > -k /proc/ksyms (default) > -l /proc/modules (default) > -m /boot/System.map-2.2.9 (specified) > -c 1 (default) > > Unable to handle kernel NULL pointer dereference at virtual address 00000038 > current->tss.cr3 = 01e55000, %cr3 = 01e55000 > *pde = 00000000 > Oops: 0000 > CPU: 0 > EIP: 0010:[<c012d3ae>] > EFLAGS: 00010246 > eax: 00000000 ebx: c2a8aea0 ecx: c2a8aea0 edx: c2a8aea0 > esi: c0bd5a80 edi: c30f8f60 ebp: c2d5a4b0 esp: c0d9ff3c > ds: 0018 es: 0018 ss: 0018 > Process sendmail (pid: 14234, process nr: 132, stackpage=c0d9f000) > Stack: c30f8f60 c2da45a0 c2d5a440 c2da45a0 c2d5a440 c0119f72 c1235c60 40008000 > 40009000 c1235c60 c0fa5f60 c0d9e000 bfffe714 c0d9ffc0 00000000 fffffff4 > c010c8c8 00000000 c0124011 c2a8aea0 c2a8aea0 c0122f7e c2a8aea0 00000008 > Call Trace: [<c0119f72>] [<c010c8c8>] [<c0124011>] [<c0122f7e>] [<c0122fd4>] [<c0108874>] > Code: 8b 58 38 85 db 74 11 8d 7c 24 14 fc b9 0f 00 00 00 f3 a5 c6 > > >>EIP: c012d3ae <locks_remove_flock+3a/88> > Trace: c0119f72 <do_mmap+36a/3dc> > Trace: c010c8c8 <old_mmap+b0/e8> > Trace: c0124011 <fput+11/48> > Trace: c0122f7e <filp_close+5a/64> > Trace: c0122fd4 <sys_close+4c/58> > Trace: c0108874 <system_call+34/40> > Code: c012d3ae <locks_remove_flock+3a/88> 00000000 <_EIP>: <=== > Code: c012d3ae <locks_remove_flock+3a/88> 0: 8b 58 38 movl 0x38(%eax),%ebx <=== > Code: c012d3b1 <locks_remove_flock+3d/88> 3: 85 db testl %ebx,%ebx > Code: c012d3b3 <locks_remove_flock+3f/88> 5: 74 11 je c012d3c6 <locks_remove_flock+52/88> > Code: c012d3b5 <locks_remove_flock+41/88> 7: 8d 7c 24 14 leal 0x14(%esp,1),%edi > Code: c012d3b9 <locks_remove_flock+45/88> b: fc cld > Code: c012d3ba <locks_remove_flock+46/88> c: b9 0f 00 00 00 movl $0xf,%ecx > Code: c012d3bf <locks_remove_flock+4b/88> 11: f3 a5 repz movsl %ds:(%esi),%es:(%edi) > Code: c012d3c1 <locks_remove_flock+4d/88> 13: c6 00 00 movb $0x0,(%eax)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |