mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: ddugger@willie.n0ano.com (Don Dugger)
Cc: torvalds@transmeta.com (Linus Torvalds),
	linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk (Alan Cox)
Subject: Re: [PATCH] Core dumps for threads
Date: Tue, 27 Feb 2001 17:55:45 +0000 (GMT)	[thread overview]
Message-ID: <E14XoLk-0003tW-00@the-village.bc.nu> (raw)
In-Reply-To: <20010227102954.A26230@willie.n0ano.com> from "Don Dugger" at Feb 27, 2001 10:29:54 AM

> the 2.4.1 kernel, that copies the mm and dumps the corefile from
> that copy.  Also, whenever there are multiple users of the original
> mm it creates the core dump in the file `core.n' where `n' is the
> PID of the offending process.

> +	if ((mm = kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) == NULL)
> +		goto close_fail;
> +	memcpy(mm, current->mm, sizeof(*mm));
> +	if (!mm_init(mm)) {
> +		kmem_cache_free(mm_cachep, mm);
> +		goto close_fail;
> +	}
> +	down(&current->mm->mmap_sem);

Umm not quite what I meant. Take a look at copy_mm in fork.c

The code starting

	m = allocate_mm()

down to just before

	/*
  	 * child gets a 

Does the real thing you need to do to be sure the mm is properly set up.
You can also drop the original mm and make that current->mm to avoid the
passing of mm around. In fact you probably should do that.


	





  reply	other threads:[~2001-02-27 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-24 21:45 Don Dugger
2001-02-24 21:57 ` Alan Cox
2001-02-25  9:15   ` Chris Wedgwood
2001-02-25  9:40     ` Adam Fritzler
2001-02-26  0:36       ` davids
2001-02-25 10:28     ` Andi Kleen
2001-02-25 11:03       ` Chris Wedgwood
2001-02-25 13:57     ` Alan Cox
2001-02-27 17:29   ` [PATCH] " Don Dugger
2001-02-27 17:55     ` Alan Cox [this message]
2001-02-27 17:57     ` Alan Cox
2001-04-06 21:03 John Van Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E14XoLk-0003tW-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=ddugger@willie.n0ano.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®