lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] proc: fix /proc/*/pagemap some more
On Wed, Jul 16, 2008 at 07:36:28PM +0400, Alexey Dobriyan wrote:
> On Wed, Jul 16, 2008 at 05:20:25PM +0200, Eric Sesterhenn wrote:
> > with current -git a "cat /proc/4260/pagemap"
> > gives me the following oops:
>
> reproduced

Oh, wow!

[PATCH] proc: fix /proc/*/pagemap some more

struct pagemap_walk was placed on stack, some hooks are initialized, the rest
(->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.

Reported by Eric Sesterhenn.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

fs/proc/task_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -636,7 +636,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
struct pagemapread pm;
int pagecount;
int ret = -ESRCH;
- struct mm_walk pagemap_walk;
+ struct mm_walk pagemap_walk = {};
unsigned long src;
unsigned long svpfn;
unsigned long start_vaddr;


\
 
 \ /
  Last update: 2008-07-16 18:05    [W:0.056 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site