Re: [PATCH] multithreaded coredumps for elf exeecutables for O(1)

Manfred Spraul (manfred@colorfullife.com)
Fri, 10 May 2002 19:13:49 +0200


Have you checked that your patch doesn't deadlock on ia64?

> + /* First pause all related threaded processes */
> + if (dump_threads) {
> + suspend_threads();
> + }
> +
> + /* now stop all vm operations */
> + down_write(&current->mm->mmap_sem);
> + segs = current->mm->map_count;
> +
Stopping all vm operations means that copy_{to,from}_user can cause
deadlocks.
ia64 needs copy_to_user in their stack unwind handler, IIRC called by
ELF_CORE_COPY_REGS.

Afaics you don't handle that. You must dump all thread state before
down_write(mmap_sem). And I don't see how you protect against 2 threads
of one process calling suspend_threads() simultaneously.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/