public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 7/8] FDPIC: Add coredump capability for the ELF-FDPIC binfmt [try #4]
@ 2006-07-10  2:46 Oleg Nesterov
  2006-07-10 13:31 ` David Howells
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg Nesterov @ 2006-07-10  2:46 UTC (permalink / raw)
  To: David Howells; +Cc: linux-kernel, Andrew Morton

David Howells wrote:
>
> +static int elf_fdpic_core_dump(long signr, struct pt_regs *regs,
> +			       struct file *file)
> +{
>
>  [... snip ...]
>
> +		read_lock(&tasklist_lock);
> +		do_each_thread(g,p)
> +			if (current->mm == p->mm && current != p) {
> +				tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC);
> +				if (!tmp) {
> +					read_unlock(&tasklist_lock);
> +					goto cleanup;
> +				}
> +				INIT_LIST_HEAD(&tmp->list);
> +				tmp->thread = p;
> +				list_add(&tmp->list, &thread_list);
> +			}
> +		while_each_thread(g,p);
> +		read_unlock(&tasklist_lock);

Do you see any reason for tasklist_lock here (and in elf_core_dump) ?

do_each_thread() is rcu-safe, and all tasks which use this ->mm must
sleep in wait_for_completion(&mm->core_done) at this point.

Oleg.


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 0/8] Fix FRV, ELF-FDPIC and NOMMU stuff [try #4]
@ 2006-07-07 11:47 David Howells
  2006-07-07 11:47 ` [PATCH 7/8] FDPIC: Add coredump capability for the ELF-FDPIC binfmt " David Howells
  0 siblings, 1 reply; 4+ messages in thread
From: David Howells @ 2006-07-07 11:47 UTC (permalink / raw)
  To: torvalds, akpm, bernds_cb1, sam; +Cc: dhowells, linux-kernel


The attached patches:

 (1) Fix compilation errors and other problems in the FRV arch and the
     ELF-FDPIC binfmt driver.

 (2) Fix a problem with the NOMMU ramfs filesystem when executing binaries
     stored therein.

 (3) Fix up the ELF-FDPIC coding style and implement a minor change to reduce
     the number of times ksize() is called.

 (4) Declare SEEK_SET, SEEK_CUR and SEEK_END in linux/fs.h.

 (5) Move roundup() to linux/kernel.h from fs/binfmt_elf.c

 (6) Add ELF-FDPIC coredump support.

 (7) Make the FRV arch make use of the asm-offsets stuff.

In [try #2] the following change has been made:

 (*) Inclusions of <linux/config.h> added by the patches have been dropped as
     they're not necessary.

In [try #3]:

 (*) ELF-FDPIC Coding style fixups.

 (*) Minor ELF-FDPIC change to reduce the number of times ksize() is called.

In [try #4]:

 (*) Fix some more FRV compile warnings.

 (*) Move roundup() to linux/kernel.h.

 (*) Declare the SEEK_* constants in linux/fs.h.

 (*) Clean up ELF-FDPIC some more.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-11 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10  2:46 [PATCH 7/8] FDPIC: Add coredump capability for the ELF-FDPIC binfmt [try #4] Oleg Nesterov
2006-07-10 13:31 ` David Howells
2006-07-11 17:45   ` Oleg Nesterov
  -- strict thread matches above, loose matches on Subject: below --
2006-07-07 11:47 [PATCH 0/8] Fix FRV, ELF-FDPIC and NOMMU stuff " David Howells
2006-07-07 11:47 ` [PATCH 7/8] FDPIC: Add coredump capability for the ELF-FDPIC binfmt " David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox