Re: Linux 2.2.9-ac6 - missing "init_task_union"

David Dyck (dcd@tc.fluke.com)
Mon, 14 Jun 1999 11:16:36 -0700 (PDT)



As Eyal Lebedinsky already mentioned
init_task_union
is not defined when creating scsi_mod.o

Here's a little more info that I gleaned by looking at
the preprocessor output of scsi_error.c

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 \
-fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -m486 \
-malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -DMODULE \
-E scsi_error.c

in /usr/src/linux/include/asm/pgtable.h
the macro for_each_task is used in set_pgdir
for_each_task is defined in include/linux/sched.h as
#define for_each_task(p) \
for (p = &init_task ; (p = p->next_task) != &init_task ; )

[ set_pgdir is not called, so this probably isn't the problem ]

and the macro init_task in scsi_error_handler
defined in include/*/processor.h as (init_task_union.task)

Seems like the problem is in the following lines in scsi_error_handler()
of scsi_error.c:

/* Become as one with the init task */

exit_fs(current); /* current->fs->count--; */
fs = init_task.fs;
current->fs = fs;
atomic_inc(&fs->count);


How are modules supposed to access kernel data in init_task_union?

David Dyck

-
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/