Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Krishna Kondaka <krishna@sanera.net>
Cc: linux-mips@oss.sgi.com
Subject: Re: BUG : Memory leak in Linux 2.4.2 MIPS SMP kernel
Date: Wed, 14 Nov 2001 10:47:53 +1100	[thread overview]
Message-ID: <20011114104753.A10410@dea.linux-mips.net> (raw)
In-Reply-To: <200111132336.PAA06294@exceed1.sanera.net>; from krishna@sanera.net on Tue, Nov 13, 2001 at 03:36:32PM -0800

On Tue, Nov 13, 2001 at 03:36:32PM -0800, Krishna Kondaka wrote:

> extern inline void destroy_context(struct mm_struct *mm)
> {
> #ifdef CONFIG_SMP
>         kfree((void *)mm->context);
> #else
>         /* Nothing to do.  */
> #endif
> }
> 
> And when I tested this I do not see the memory leak any more.

Almost correct, as James already explained you have to check for a
non-null pointer first.  We got a more elegant implementation of
context switching which I'll add to CVS asap; it gets away without
any memory allocation.

  Ralf

  parent reply	other threads:[~2001-11-13 23:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-13 23:36 BUG : Memory leak in Linux 2.4.2 MIPS SMP kernel Krishna Kondaka
2001-11-13 23:42 ` James Simmons
2001-11-13 23:47 ` Ralf Baechle [this message]
2001-11-14  0:16   ` James Simmons
2001-11-14  0:19     ` Ralf Baechle
2001-11-14  0:28       ` James Simmons

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=20011114104753.A10410@dea.linux-mips.net \
    --to=ralf@oss.sgi.com \
    --cc=krishna@sanera.net \
    --cc=linux-mips@oss.sgi.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