[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52535098.70405@gmail.com>
Date: Tue, 08 Oct 2013 11:23:52 +1100
From: Ryan Mallon <rmallon@...il.com>
To: Janani Venkataraman <jananive@...ibm.com>,
linux-kernel@...r.kernel.org
CC: amwang@...hat.com, rdunlap@...otime.net, andi@...stfloor.org,
aravinda@...ux.vnet.ibm.com, hch@....de, mhiramat@...hat.com,
jeremy.fitzhardinge@...rix.com, xemul@...allels.com,
suzuki@...ux.vnet.ibm.com, kosaki.motohiro@...fujitsu.com,
adobriyan@...il.com, tarundsk@...ux.vnet.ibm.com,
vapier@...too.org, roland@...k.frob.com, tj@...nel.org,
ananth@...ux.vnet.ibm.com, gorcunov@...nvz.org, avagin@...nvz.org,
oleg@...hat.com, eparis@...hat.com, d.hatayama@...fujitsu.com,
james.hogan@...tec.com, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org
Subject: Re: [PATCH 02/19] Make vma_dump_size() generic
On 04/10/13 20:30, Janani Venkataraman wrote:
> From:Suzuki K. Poulose <suzuki@...ibm.com>
>
> vma_dump_size calculates the file size of a vma area in the core file. It
> assumes the vma belongs to the "current". Make it generic to work for any task.
> This will be reused by application core dump infrastructure.
>
> Signed-off-by: Suzuki K. Poulose <suzuki@...ibm.com>
> ---
> -static unsigned long vma_dump_size(struct vm_area_struct *vma,
> +unsigned long vma_dump_size(struct task_struct *p, struct vm_area_struct *vma,
> unsigned long mm_flags)
> {
> #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
> @@ -143,10 +143,18 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
> * Switch to the user "segment" for get_user(),
> * then put back what elf_core_dump() had in place.
> */
> - set_fs(USER_DS);
> - if (unlikely(get_user(word, header)))
> - word = 0;
> - set_fs(fs);
> + if (p->mm == current->mm) {
> + mm_segment_t fs = get_fs();
It looks like you missed the removal of the old:
mm_segment_t fs = get_fs();
above? Just below if (FILTER(ELF_HEADERS)).
~Ryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists