Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
as someone else already pointed out: our definitions for the DEFINE_WAIT marco, as well as the prepare_to_wait and _finish_wait functions, are the problem here. DEFINE_WAIT is maped to DECLARE_WAIT, which initializes w.task_list.{prev,next} == NULL, thus list_empty(&wait->task_list) is false, and the wait thingy is never added to the list in prepare_to_wait --- but it is removed later in finish_wait, where the NULL dereference happens. in 2.6 this problem does not occur, since there "list_empty_careful" is used... anyways, this should help (untested... I'm not at my own work place, and currently I can not even do a test compile ...) lge Index: drbd_receiver.c =================================================================== RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v retrieving revision 1.97.2.175 diff -u -p -r1.97.2.175 drbd_receiver.c --- drbd_receiver.c 26 Jun 2004 08:05:40 -0000 1.97.2.175 +++ drbd_receiver.c 28 Jun 2004 22:20:14 -0000 @@ -267,7 +267,10 @@ STATIC void finish_wait(wait_queue_head_ spin_unlock_irqrestore(&q->lock, flags); } -#define DEFINE_WAIT(name) DECLARE_WAITQUEUE(name,current) +#define DEFINE_WAIT(name) do { \ + DECLARE_WAITQUEUE(name,current);\ + list_init(&name.task_list); \ +} while (0) #endif > kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000004 > kernel: df5a81cf > kernel: *pde = 00000000 > kernel: Oops: 0002 2.4.21-215-default #1 Tue Apr 27 16:17:49 UTC 2004 > kernel: CPU: 0 > kernel: EIP: 0010:[drbd:finish_wait+31/48] Not tainted > kernel: EIP: 0010:[<df5a81cf>] Not tainted > kernel: EFLAGS: 00000086 > kernel: eax: d4e47f38 ebx: d4e47f30 ecx: 00000000 edx: 00000000 > kernel: esi: 00000086 edi: c6370428 ebp: d4e47f30 esp: d4e47ef4 > kernel: ds: 0018 es: 0018 ss: 0018 > kernel: Process drbd0_receiver (pid: 1751, stackpage=d4e47000) > kernel: Stack: c6370000 c6370468 df5a832a c6370468 d4e47f30 d4e46000 d4e47f18 00000000 > kernel: d4e46000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > kernel: d4e46000 00000000 00000000 00000000 c0000000 df5a8976 c9b46508 00001000 > kernel: Call Trace: [drbd:drbd_get_ee+330/464] (76) [drbd:drbd_recv+134/448] (24) [drbd:read_in_block+19/336] (24)