From: Aron Griffis <aron@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch 3/3] IA64: verify the base address of crashkernel
Date: Tue, 06 Mar 2007 17:08:17 +0000 [thread overview]
Message-ID: <20070306170817.GC28832@fc.hp.com> (raw)
In-Reply-To: <20070306073756.245032985@tabatha.lab.ultramonkey.org>
Simon Horman wrote: [Tue Mar 06 2007, 02:28:52AM EST]
> +/* find a block of memory aligned to 64M exclude reserved regions
> + rsvd_regions are sorted
> + */
> +static int __init
> +kdump_region_verify_rsvd_region (unsigned long base, unsigned long size,
> + struct rsvd_region *rsvd_regions, int n)
> +{
> + int i;
> +
> + for (i = 0; i < n; i++) {
> + if (__pa(rsvd_regions[i].start) < base ||
> + __pa(rsvd_regions[i].end) >= base + size - 1)
> + continue;
> + printk(KERN_WARNING "Kdump: crashkernel region 0x%lx-0x%lx "
> + "clashes with reserved region 0x%lx-0x%lx\n", base,
> + base + size - 1, __pa(rsvd_regions[i].start),
> + __pa(rsvd_regions[i].end));
> + return 0;
> + }
> + return 0;
> +}
You're returning 0 in both cases here, is that what you really want?
> +/* find a block of memory aligned to 64M exclude reserved regions
> + rsvd_regions are sorted
> + */
> +int __init
> +kdump_region_verify (unsigned long base, unsigned long size,
> + struct rsvd_region *rsvd_regions, int n)
> +{
> + /* This isn't considered to be a failure condition,
> + * but it isn't desireable either, so log it */
> + if (ALIGN(base, CRASHDUMP_ALIGNMENT) != base)
> + printk(KERN_WARNING "Kdump: warning: crashkernel region "
> + "0x%lx-0x%lx is not aligned to 0x%x\n",
> + base, base + size - 1, CRASHDUMP_ALIGNMENT);
> +
> + if (!kdump_region_verify_efi(base, size))
> + return 0;
> +
> + if (!kdump_region_verify_rsvd_region(base, size, rsvd_regions, n))
> + return 0;
> +
> + printk(KERN_INFO "Kdump: crashkernel region verified\n");
> + return 1;
> + return 1;
and here it appears you have an extra return.
Aron
next prev parent reply other threads:[~2007-03-06 17:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 7:28 [patch 3/3] IA64: verify the base address of crashkernel Horms
2007-03-06 8:23 ` Zou, Nanhai
2007-03-06 17:08 ` Aron Griffis [this message]
2007-03-07 0:42 ` Horms
2007-03-07 0:50 ` Horms
2007-03-07 0:57 ` Horms
2007-03-07 2:15 ` Zou, Nanhai
2007-03-07 3:46 ` Horms
2007-03-07 4:50 ` Zou, Nanhai
2007-03-07 7:55 ` Horms
2007-03-07 9:06 ` Zou, Nanhai
2007-03-07 9:49 ` Horms
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=20070306170817.GC28832@fc.hp.com \
--to=aron@hp.com \
--cc=linux-ia64@vger.kernel.org \
/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