[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mention of New Boot Disks



 
Hi Ben,

> The problem with the freeze is more strange that I thought. It seems
> that busybox init on sparc drops out of pid 1, to pid 6. In it's place
> is the swapper thread. When things send a signal to pid 1 (assuming that
> pid 1 == init), things go wrong.
> 
> Still need to investigate. Until I resolve that problem, there's no
> point in making new disks yet.

Did you see Paulus email to l-k?

> This could be the same problem that I reported some time ago, where if
> you send a signal to the init process while it is running /linuxrc,
> the system will hang.  In my case the problem was with this code in
> prepare_namespace() in init/main.c:
> 
>         pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
>         if (pid>0)
>                 while (pid != wait(&i));
> 
> If a signal becomes pending, the wait will not block, but the signal
> never gets delivered because the process is still running inside the
> kernel (signals only get delivered on the exit from kernel to user
> space).
> 
> One solution would be to change it to something like this (caution,
> completely untested):
> 
>         pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
>         if (pid > 0) {
>                 while (pid != wait(&i)) {
>                         if (signal_pending(current)) {
>                                 spin_lock_irq(&current->sigmask_lock);
>                                 flush_signals(current);
>                                 recalc_sigpending(current);
>                                 spin_unlock_irq(&current->sigmask_lock);
>                         }
>                 }
>         }
> 
> Another alternative would be to block signals like request_module() in
> kernel/kmod.c does.
> 
> HTH,
> Paul.



Reply to: