tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cgdstrategy: divide fault in supervisor mode
Michael van Elst wrote:
> Right. This needs to be written differently. Instead of GETCGD_SOFTC()
> use:
>
> cs = getcgd_softc(bp->b_dev);
> if (!cs) {
> bp->b_error = ENXIO;
> biodone(bp);
> return;
> }
I enabled DEBUG in the config and changed cgdstrategy. Same crash:
Stopped in pid 10.1 (mount_ffs) at netbsd:cgdstrategy+0x2d: divl
4
0(%r12),%eax
ffffffff808edcd8 <cgdstrategy>:
ffffffff808edcd8: 55 push %rbp
ffffffff808edcd9: 48 89 e5 mov %rsp,%rbp
ffffffff808edcdc: 53 push %rbx
ffffffff808edcdd: 48 83 ec 08 sub $0x8,%rsp
ffffffff808edce1: 48 89 fb mov %rdi,%rbx
ffffffff808edce4: f6 05 d5 d0 8e 00 01 testb $0x1,0x8ed0d5(%rip) # ffffffff811dadc0 <cgddebug>
ffffffff808edceb: 75 52 jne ffffffff808edd3f <cgdstrategy+0x67>
ffffffff808edced: 48 8b 7b 38 mov 0x38(%rbx),%rdi
ffffffff808edcf1: e8 e5 fd ff ff callq ffffffff808edadb <getcgd_softc>
ffffffff808edcf6: 48 89 c7 mov %rax,%rdi
ffffffff808edcf9: 48 85 c0 test %rax,%rax
ffffffff808edcfc: 74 58 je ffffffff808edd56 <cgdstrategy+0x7e>
ffffffff808edcfe: 48 83 7b 48 00 cmpq $0x0,0x48(%rbx)
ffffffff808edd03: 8b 4b 34 mov 0x34(%rbx),%ecx
ffffffff808edd06: 78 11 js ffffffff808edd19 <cgdstrategy+0x41>
ffffffff808edd08: 89 c8 mov %ecx,%eax
ffffffff808edd0a: 31 d2 xor %edx,%edx
ffffffff808edd0c: f7 77 40 divl 0x40(%rdi)
ffffffff808edd0f: 85 d2 test %edx,%edx
ffffffff808edd11: 75 06 jne ffffffff808edd19 <cgdstrategy+0x41>
ffffffff808edd13: f6 43 40 03 testb $0x3,0x40(%rbx)
ffffffff808edd17: 74 18 je ffffffff808edd31 <cgdstrategy+0x59>
ffffffff808edd19: c7 43 20 16 00 00 00 movl $0x16,0x20(%rbx)
ffffffff808edd20: 89 4b 24 mov %ecx,0x24(%rbx)
ffffffff808edd23: 48 89 df mov %rbx,%rdi
ffffffff808edd26: 48 83 c4 08 add $0x8,%rsp
ffffffff808edd2a: 5b pop %rbx
ffffffff808edd2b: 5d pop %rbp
ffffffff808edd2c: e9 f0 c3 fc ff jmpq ffffffff808ba121 <biodone>
ffffffff808edd31: 48 89 de mov %rbx,%rsi
ffffffff808edd34: 48 83 c4 08 add $0x8,%rsp
ffffffff808edd38: 5b pop %rbx
ffffffff808edd39: 5d pop %rbp
ffffffff808edd3a: e9 a1 2e 00 00 jmpq ffffffff808f0be0 <dk_strategy>
ffffffff808edd3f: 48 63 57 34 movslq 0x34(%rdi),%rdx
ffffffff808edd43: 48 89 fe mov %rdi,%rsi
ffffffff808edd46: 48 c7 c7 18 15 f9 80 mov $0xffffffff80f91518,%rdi
ffffffff808edd4d: 31 c0 xor %eax,%eax
ffffffff808edd4f: e8 4f d8 f8 ff callq ffffffff8087b5a3 <printf>
ffffffff808edd54: eb 97 jmp ffffffff808edced <cgdstrategy+0x15>
ffffffff808edd56: c7 43 20 06 00 00 00 movl $0x6,0x20(%rbx)
ffffffff808edd5d: eb c4 jmp ffffffff808edd23 <cgdstrategy+0x4b>
ffffffff808eeb2e: 48 c7 c7 d8 dc 8e 80 mov $0xffffffff808edcd8,%rdi
ffffffff808eeb35: 5b pop %rbx
ffffffff808eeb36: 41 5c pop %r12
ffffffff808eeb38: 5d pop %rbp
ffffffff808eeb39: e9 4f db f4 ff jmpq ffffffff8083c68d <physio>
ffffffff808eeb9d: 48 c7 c7 d8 dc 8e 80 mov $0xffffffff808edcd8,%rdi
ffffffff808eeba4: 5b pop %rbx
ffffffff808eeba5: 41 5c pop %r12
ffffffff808eeba7: 5d pop %rbp
ffffffff808eeba8: e9 e0 da f4 ff jmpq ffffffff8083c68d <physio>
Alex
Home |
Main Index |
Thread Index |
Old Index