2002-04-24 07:45:30

by Ph. Marek

[permalink] [raw]
Subject: Re: [PATCH] open files in kjournald & all other kernel threads

Hello everybody.

As this problem becomes more and more a general kernel-thread problem I'm
taking the ext3-mailing list out of the CC.


So far I didn't get an answer to why all kernel threads get the files of
init, so I'll make my own conclusions.

As with my tries yesterday where I've discovered that keventd oopses (in
exec_usermodehelper, if I remember correctly) if I insert comments in
sched.c like this:
exit_fs(current); /* current->fs->count--; */
/*
fs = init_task.fs;
current->fs = fs;
atomic_inc(&fs->count);
*/
exit_files(current);
/*
current->files = init_task.files;
atomic_inc(&current->files->count);
*/

So I expect that keventd needs a valid ->files structure.
Is it ok to create a single structure (empty), which all kernel threads use?
Or are there side-effects?


BTW on my system keventd, ksoftirq, kswapd, bdflush, kupdated and khupd all
have /dev/initctl left open. (I patched scsi_eh_* and kjournald, so these
don't).


Thanks & regards,

Phil