From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Joe Perches <joe@perches.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD)
Date: Fri, 8 Mar 2019 08:08:47 +0100 [thread overview]
Message-ID: <20190308080847.70910d18@mschwideX1> (raw)
In-Reply-To: <d81a9133ad20d478dc8c14fbc8d1bacf4c8ffe94.camel@perches.com>
On Thu, 07 Mar 2019 15:51:45 -0800
Joe Perches <joe@perches.com> wrote:
> IS_ENABLED should generally use CONFIG_ prefaced symbols and
> it doesn't appear as if there is a BLK_DEV_INITRD define.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/s390/boot/mem_detect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
> index 4cb771ba13fa..5d316fe40480 100644
> --- a/arch/s390/boot/mem_detect.c
> +++ b/arch/s390/boot/mem_detect.c
> @@ -25,7 +25,7 @@ static void *mem_detect_alloc_extended(void)
> {
> unsigned long offset = ALIGN(mem_safe_offset(), sizeof(u64));
>
> - if (IS_ENABLED(BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
> + if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
> INITRD_START < offset + ENTRIES_EXTENDED_MAX)
> offset = ALIGN(INITRD_START + INITRD_SIZE, sizeof(u64));
>
>
With more than the 255 embedded entries and a initrd that sits in the
wrong location that would have resulted in a corrupted ramdisk.
Nice catch, thanks. I'll add the patch to my queue.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
prev parent reply other threads:[~2019-03-08 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 23:51 [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) Joe Perches
2019-03-08 7:08 ` Martin Schwidefsky [this message]
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=20190308080847.70910d18@mschwideX1 \
--to=schwidefsky@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@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