public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Irwin <bill.irwin@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	wli@holomorphy.com
Subject: Re: [PATCH] i386: fix suspend/resume with dynamically allocated irq stacks
Date: Wed, 2 May 2007 19:25:34 -0700	[thread overview]
Message-ID: <20070503022534.GD26598@holomorphy.com> (raw)
In-Reply-To: <46394139.605@goop.org>

On Wed, May 02, 2007 at 06:56:09PM -0700, Jeremy Fitzhardinge wrote:
> +static void __cpuinit __free_irqstack(int cpu, void *stk)
> +{
> +	int i;
> +
> +	if (!cpu)
> +		return;
> +
> +	unmap_vm_area(per_cpu(irqstack_area, cpu));
> +
> +	for (i = 0; i < THREAD_SIZE/PAGE_SIZE; ++i)
> +		__free_page(per_cpu(irqstack_pages, cpu)[i]);
> +}

This will leak the vm_struct and also leave it in the vmlist.
work_free_thread_info() needs to be redone too. It should be

	remove_vm_area( /* unmap and remove the vm_struct from vmlist */ );
	kfree( /* free the vm_struct */ );
	for (i = 0; i < THREAD_SIZE/PAGE_SIZE; ++i)
		__free_page( /* dredge up the appropriate page to free */ );


-- wli

  reply	other threads:[~2007-05-03  2:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-03  1:56 [PATCH] i386: fix suspend/resume with dynamically allocated irq stacks Jeremy Fitzhardinge
2007-05-03  2:25 ` Bill Irwin [this message]
2007-05-03  2:31   ` Bill Irwin
2007-05-03  5:48 ` Bill Irwin
2007-05-03  6:01   ` Jeremy Fitzhardinge
2007-05-03  6:12     ` Bill Irwin
2007-05-03  7:07       ` Jeremy Fitzhardinge
2007-05-03  7:39         ` Bill Irwin
2007-05-03  8:04           ` Bill Irwin
2007-05-03  6:41   ` Bill Irwin

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=20070503022534.GD26598@holomorphy.com \
    --to=bill.irwin@oracle.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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