public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavan Naregundi <pavan@linux.vnet.ibm.com>
Cc: "Simon Horman" <horms@verge.net.au>,
	"Américo Wang" <xiyou.wangcong@gmail.com>,
	linux-kernel@vger.kernel.org, vgoyal@redhat.com,
	hbabu@us.ibm.com, kexec@lists.infradead.org
Subject: Re: [PATCH] Fix Oops in crash_shrink_memory
Date: Thu, 10 Jun 2010 14:26:22 -0700	[thread overview]
Message-ID: <20100610142622.497061e8.akpm@linux-foundation.org> (raw)
In-Reply-To: <1276064834.2622.7.camel@pavan.naregundi>

On Wed, 09 Jun 2010 11:57:14 +0530
Pavan Naregundi <pavan@linux.vnet.ibm.com> wrote:

> Resending the patch with fixed style issues.
> 
> Signed-off-by: Pavan Naregundi <pavan@linux.vnet.ibm.com>
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> --
> 
> 
> 
> 
> [fix-kexec.patch  text/x-patch (685B)]
> diff -Naur a/kernel/kexec.c b/kernel/kexec.c
> --- a/kernel/kexec.c	2010-06-08 21:17:21.850000033 +0530
> +++ b/kernel/kexec.c	2010-06-09 18:01:37.590007921 +0530
> @@ -1089,9 +1089,10 @@
>  
>  size_t crash_get_memory_size(void)
>  {
> -	size_t size;
> +	size_t size = 0;
>  	mutex_lock(&kexec_mutex);
> -	size = crashk_res.end - crashk_res.start + 1;
> +	if (crashk_res.end != crashk_res.start)
> +		size = crashk_res.end - crashk_res.start + 1;
>  	mutex_unlock(&kexec_mutex);
>  	return size;
>  }
> @@ -1134,7 +1135,7 @@
>  
>  	free_reserved_phys_range(end, crashk_res.end);
>  
> -	if (start == end)
> +	if ((start == end) && (crashk_res.parent != NULL))
>  		release_resource(&crashk_res);
>  	crashk_res.end = end - 1;

The patch doesn't have a changelog and I'd prefer not to have to crawl
through the email thread and write one myself.

Please resend, including a full description of the bug and of its fix.

  parent reply	other threads:[~2010-06-10 21:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07  7:28 [PATCH] Fix Oops in crash_shrink_memory Pavan Naregundi
2010-06-08  7:07 ` Pavan Naregundi
2010-06-08  7:59   ` Américo Wang
2010-06-08  8:40     ` Pavan Naregundi
2010-06-08  8:54       ` Américo Wang
2010-06-08  9:41         ` Pavan Naregundi
2010-06-09  3:44           ` Simon Horman
2010-06-09  6:27             ` Pavan Naregundi
2010-06-09 14:05               ` Vivek Goyal
2010-06-10 21:26               ` Andrew Morton [this message]
2010-06-11  7:30                 ` Pavan Naregundi

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=20100610142622.497061e8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hbabu@us.ibm.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavan@linux.vnet.ibm.com \
    --cc=vgoyal@redhat.com \
    --cc=xiyou.wangcong@gmail.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