Skip to contentSkip to conversation

2.5.61 oops running SDET

DISCUSSION Manfred Spraul 2 participants 4 messages Feb 16, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

OK, I did the following, which is what I think you wanted, plus Zwane's
observation that task_state acquires the task_struct lock (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

#1 lore raw
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

#2 lore raw
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

#3 lore raw
Quoted 3 lines · Manfred Spraul

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?

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) around send_specific_sig_info() - which lock synchronizes exec and signal delivery?

Looks like none. And I think it was Ingo who removed it. Ingo?

Linus