2.5.61 oops running SDET
Quoted 6 lines
OK, I did the following, which is what I think you wanted, plus Zwane's
observation thattask_stateacquires thetask_structlock (we're the only caller, so I just removed it), but I still get the same panic and this time the box hung.
AFAICS both exec and exit rely on write_lock_irq(tasklist_lock) for synchronization of changes to tsk->sig{,hand}. I bet an __exit_sighand occurs in the middle of proc_pid_status() - after the NULL test, before the access in task_sig.
Martin, could you check what happens if you do not release the tasklist_lock until after the task_sig()?
--
Manfred
Quoted 3 lines · Manfred Spraul
AFAICS both exec and exit rely on
write_lock_irq(tasklist_lock)for synchronization of changes to tsk->sig{,hand}.
Yeah, as I sent out in my last email this does seem to be true right now, but it's really not correct. It's disgusting that we use such a fundamental global lock to protect something so trivially local to the one process, where the local per-process lock really should be more than enough.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Manfred Spraul
AFAICS both exec and exit rely on
write_lock_irq(tasklist_lock)for synchronization of changes to tsk->sig{,hand}.Yeah, as I sent out in my last email this does seem to be true right now, but it's really not correct. It's disgusting that we use such a fundamental global lock to protect something so trivially local to the one process, where the local per-process lock really should be more than enough.
The difference between the tasklist_lock and task_lock is that task_lock is not an interrupt lock. Think about signal delivery during exec.
Do you want to replace tasklist_lock with task_lock in exit_sighand() and during exec, or do you want to add task_lock to tasklist_lock?
Hmm.
Someone removed the read_lock(tasklist_lock) around send_specific_sig_info() - which lock synchronizes exec and signal delivery?
--
Manfred
Quoted 3 lines · Manfred Spraul
Do you want to replace
tasklist_lockwithtask_lockinexit_sighand()and during exec, or do you want to addtask_locktotasklist_lock?
I'd rather replace it, but your point about irq-safeness is a good one. Clearly signal sending cannot take the task lock if we want to keep it irq-unsafe.
So the signal stuff probably does need to be protected by _both_ the tasklist lock and the provate task lock.
Quoted 2 lines
Someone removed the
read_lock(tasklist_lock)aroundsend_specific_sig_info()- which lock synchronizes exec and signal delivery?
Looks like none. And I think it was Ingo who removed it. Ingo?
Linus