From: Andrew Morton <akpm@linux-foundation.org>
To: Jungseung Lee <js07.lee@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] fs/binfmt_elf.c: fix inconsistent vma dump size
Date: Wed, 26 Nov 2014 04:43:06 -0800 [thread overview]
Message-ID: <20141126044306.36e16cad.akpm@linux-foundation.org> (raw)
In-Reply-To: <CAPP0e=Myz8B9x1pRp3q37wGEwSaACBJfUJPcf6MCzN7K4nG=sg@mail.gmail.com>
On Wed, 26 Nov 2014 21:37:54 +0900 Jungseung Lee <js07.lee@gmail.com> wrote:
> 2014-11-26 15:51 GMT+09:00 Jungseung Lee <js07.lee@gmail.com>:
>
> >>> @@ -2093,7 +2083,20 @@ static int elf_core_dump(struct coredump_params *cprm)
> >>>
> >>> dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
> >>>
> >>> - offset += elf_core_vma_data_size(gate_vma, cprm->mm_flags);
> >>> + vma_filesz = kmalloc(sizeof(*vma_filesz) * (segs - 1), GFP_KERNEL);
> >>
> >> Use kmalloc_array() here, in case a disaster has occurred...
> >>
> > I'll try to find another way how to pass or save vma size with consistency.
> >
> it looks like just to replace kmalloc to vmalloc could be solution.
> I'll send patch, thanks.
Solution to what? I was merely suggesting the use of kmalloc_array()
instead of open-coded kmalloc(n * m).
next prev parent reply other threads:[~2014-11-26 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 19:16 [RFC PATCH] fs/binfmt_elf.c: fix inconsistent vma dump size Jungseung Lee
2014-11-25 21:38 ` Andrew Morton
2014-11-26 6:51 ` Jungseung Lee
2014-11-26 12:37 ` Jungseung Lee
2014-11-26 12:43 ` Andrew Morton [this message]
2014-11-26 13:13 ` Jungseung Lee
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=20141126044306.36e16cad.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=js07.lee@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).