Re: Re: fr1-2.16 patch for 2.6.10 kernel
denis bonnenfant <[email protected]>
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
> ?? It didn't die in the call, so the best bet is that the iteration goes
> wrong, or rdev somehow ends up NULL. You might test the value of rdev,
> or just add
>
> if (!rdev)
> break;
>
> inside the loop. Mind you, it's fairly disastrous that rdev can be
> zero, and I don't see how it managed to negogiate the just-prior
> iteration.
>
> If you can pin the line down exactly, that would be great. It does look
> like rdev is NULL. I believe offset 4 (that was the oops, no?) in rdev
> would be the prev pointer in the list_head at the front of the struct.
> So that would be the iterator going wrong.
>
> If I am correct, rdev->same_set.next should be NULL just before the
> oops.
>
I tried this :
if (mddev->degraded) {
ITERATE_RDEV(mddev,rdev,rtmp)
if (rdev->raid_disk < 0
&& !rdev->faulty) {
printk(KERN_INFO "md: 3853 raid_disk %d %p\n", rdev->raid_disk,
rdev->same_set.next);
if (!rdev)
break;
if (mddev->pers->hot_add_disk(mddev,rdev))
spares++;
and the result is :
md: bind<sda1>
md0: notifying dev 800001 it is now in array
md0: set repair bit to 1 on superblock f7cb5280
md0: md_check_recovery 2: cleared recovery bits on sb f7cb5280
md0: md_check_recovery 2: restored repair bit on sb f7cb5280
md: 3830
md: 3838
md: 3838
md: 3853 raid_disk -1 f7ff9980
Unable to handle kernel NULL pointer dereference at virtual address 00000004
printing eip:
f88ac3d7
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
Modules linked in: raid1 bitmap md epic100 usbkbd parport_pc lp parport
CPU: 0
EIP: 0060:[<f88ac3d7>] Not tainted
EFLAGS: 00010006 (2.6.8-enbd-fr1-debug1)
EIP is at raid1_add_disk+0x4f/0xf8 [raid1]
eax: 00000000 ebx: f5153400 ecx: c0431cdc edx: f7cb4e80
esi: f4805a80 edi: 00000000 ebp: f7cb5280 esp: f4c85f30
ds: 007b es: 007b ss: 0068
Process md0_raid1 (pid: 899, threadinfo=f4c84000 task=f4c836b0)
Stack: f4805a80 f7ff9980 f7cb5280 f7cb5290 00000000 f7cb4e80 f88b9caa
f7cb5280
f4805a80 f4cdcf00 f4c84000 f4c85fdc f4c84000 f7cb530c 00000000
f88ac9f5
f7cb5280 f4cdcf00 f4c84000 f4c85fdc f4c84000 00000000 f4c836b0
00000000
Call Trace:
[<f88b9caa>] md_check_recovery+0x2b2/0x438 [md]
[<f88ac9f5>] raid1d+0x19/0x1b8 [raid1]
[<f88b854f>] md_thread+0x14f/0x188 [md]
[<f88b8400>] md_thread+0x0/0x188 [md]
[<c01145a8>] autoremove_wake_function+0x0/0x40
[<c01145a8>] autoremove_wake_function+0x0/0x40
[<c0102245>] kernel_thread_helper+0x5/0xc
Code: 8b 50 04 8b 46 14 8b 40 04 8b 40 30 39 42 30 75 5f 83 3b 00
<6>note: md0_raid1[899] exited with preempt_count 1
So rdev is not NULL !
>
>
>>Just an idiot question, but i'm newbie in kernel hacking !
>>Is there a simple (and fast) way to compile *only* md.c ? (assuming that deps
>>has not changed)?
>
>
> Sure - type "make modules" after touching md.c. That's precisely what
> make does.
Ok thanks, i was looking for something more complicated !