mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* /proc/*/pagemap oopses
@ 2008-07-16 15:20 Eric Sesterhenn
  2008-07-16 15:36 ` Alexey Dobriyan
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sesterhenn @ 2008-07-16 15:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: adobriyan, akpm

hi,

with current -git a "cat /proc/4260/pagemap"
gives me the following oops:


[   80.334016] general protection fault: fffc [#1] PREEMPT DEBUG_PAGEALLOC
[   80.334402] Modules linked in:
[   80.334654] 
[   80.334765] Pid: 4744, comm: cat Not tainted (2.6.26-02962-g4515889 #5)
[   80.334902] EIP: 0060:[<cb613f4b>] EFLAGS: 00010206 CPU: 0
[   80.335093] EIP is at 0xcb613f4b
[   80.335213] EAX: 96c26000 EBX: c013b06a ECX: 00400000 EDX: 00000000
[   80.335347] ESI: cb613f44 EDI: fffffff2 EBP: c016d99c ESP: cb613f04
[   80.335481]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[   80.335672] Process cat (pid: 4744, ti=cb613000 task=cb59df40 task.ti=cb613000)
[   80.335810] Stack: ffffffb0 bfffffff c0000000 00000000 cbb67000 00400000 00000001 00000000 
[   80.336019]        fffffff2 cb613f74 c01abab0 0828a000 0828a400 cb408380 cb400fe0 cb4a6c80 
[   80.336019]        c013b06a cb613f60 c01ab441 00000000 c01ab3af cb4a6c80 cb613f60 0828a000 
[   80.336019] Call Trace:
[   80.336019]  [<c01abab0>] ? pagemap_read+0x16a/0x1e3
[   80.336019]  [<c013b06a>] ? put_lock_stats+0xd/0x21
[   80.336019]  [<c01ab441>] ? pagemap_pte_range+0x0/0xdc
[   80.336019]  [<c01ab3af>] ? pagemap_pte_hole+0x0/0x37
[   80.336019]  [<c01ab946>] ? pagemap_read+0x0/0x1e3
[   80.336019]  [<c017af1f>] ? vfs_read+0x8a/0x106
[   80.336019]  [<c017b21f>] ? sys_read+0x3b/0x60
[   80.336019]  [<c01038b1>] ? sysenter_past_esp+0x6a/0xa5
[   80.336019]  =======================
[   80.336019] Code: 00 00 00 00 f2 ff ff ff 74 3f 61 cb b0 ba 1a c0 00
a0 28 08 00 a4 28 08 80 83 40 cb e0 0f 40 cb 80 6c 4a cb 6a b0 13 c0 60
3f 61 <cb> 41 b4 1a c0 00 00 00 00 af b3 1a c0 80 6c 4a cb 60 3f 61 cb 
[   80.336019] EIP: [<cb613f4b>] 0xcb613f4b SS:ESP 0068:cb613f04
[   80.455182] ---[ end trace e2b2d610b672cbbc ]---


doing this again gives a slightly different oops

[  156.814961] BUG: unable to handle kernel NULL pointer dereference at 00000002
[  156.815288] IP: [<00000002>]
[  156.815482] *pde = 00000000 
[  156.815704] Oops: 0000 [#2] PREEMPT DEBUG_PAGEALLOC
[  156.816079] Modules linked in:
[  156.816255] 
[  156.816368] Pid: 4765, comm: cat Tainted: G      D (2.6.26-02962-g4515889 #5)
[  156.816608] EIP: 0060:[<00000002>] EFLAGS: 00010202 CPU: 0
[  156.816739] EIP is at 0x2
[  156.816854] EAX: cbb67000 EBX: 00000002 ECX: 00400000 EDX: 00000000
[  156.816989] ESI: cb61ef44 EDI: fffffff2 EBP: cb61ef28 ESP: cb61ef00
[  156.817183]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[  156.817314] Process cat (pid: 4765, ti=cb61e000 task=cb626f20 task.ti=cb61e000)
[  156.817455] Stack: c016d99c cb61ef44 bfffffff c0000000 00000000 cbb67000 00400000 00000001 
[  156.818028]        00000000 fffffff2 cb61ef74 c01abab0 09740000 09740400 cb4083b8 cb400fe0 
[  156.818028]        cb4a6c80 00000002 00000000 c01ab441 00000001 c01ab3af cb4a6c80 cb61ef60 
[  156.818028] Call Trace:
[  156.818028]  [<c016d99c>] ? walk_page_range+0x70/0x180
[  156.818028]  [<c01abab0>] ? pagemap_read+0x16a/0x1e3
[  156.818028]  [<c01ab441>] ? pagemap_pte_range+0x0/0xdc
[  156.818028]  [<c01ab3af>] ? pagemap_pte_hole+0x0/0x37
[  156.818028]  [<c01ab946>] ? pagemap_read+0x0/0x1e3
[  156.818028]  [<c017af1f>] ? vfs_read+0x8a/0x106
[  156.818028]  [<c017b21f>] ? sys_read+0x3b/0x60
[  156.818028]  [<c01038b1>] ? sysenter_past_esp+0x6a/0xa5
[  156.818028]  =======================
[  156.818028] Code:  Bad EIP value.
[  156.818028] EIP: [<00000002>] 0x2 SS:ESP 0068:cb61ef00
[  156.823465] ---[ end trace e2b2d610b672cbbc ]---

Greetings, Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /proc/*/pagemap oopses
  2008-07-16 15:20 /proc/*/pagemap oopses Eric Sesterhenn
@ 2008-07-16 15:36 ` Alexey Dobriyan
  2008-07-16 15:59   ` [PATCH] proc: fix /proc/*/pagemap some more Alexey Dobriyan
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2008-07-16 15:36 UTC (permalink / raw)
  To: Eric Sesterhenn; +Cc: linux-kernel, akpm

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] proc: fix /proc/*/pagemap some more
  2008-07-16 15:36 ` Alexey Dobriyan
@ 2008-07-16 15:59   ` Alexey Dobriyan
  2008-07-16 16:13     ` Vegard Nossum
  2008-07-16 16:27     ` Eric Sesterhenn
  0 siblings, 2 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2008-07-16 15:59 UTC (permalink / raw)
  To: Eric Sesterhenn; +Cc: linux-kernel, akpm

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;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] proc: fix /proc/*/pagemap some more
  2008-07-16 15:59   ` [PATCH] proc: fix /proc/*/pagemap some more Alexey Dobriyan
@ 2008-07-16 16:13     ` Vegard Nossum
  2008-07-16 16:27     ` Eric Sesterhenn
  1 sibling, 0 replies; 5+ messages in thread
From: Vegard Nossum @ 2008-07-16 16:13 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Eric Sesterhenn, linux-kernel, akpm, stable

On Wed, Jul 16, 2008 at 5:59 PM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> 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

This reproduced for me on plain v2.6.26 as well. I'm guessing this
should be Cc stable as soon as possible...!


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] proc: fix /proc/*/pagemap some more
  2008-07-16 15:59   ` [PATCH] proc: fix /proc/*/pagemap some more Alexey Dobriyan
  2008-07-16 16:13     ` Vegard Nossum
@ 2008-07-16 16:27     ` Eric Sesterhenn
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Sesterhenn @ 2008-07-16 16:27 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-kernel, akpm

* Alexey Dobriyan (adobriyan@gmail.com) wrote:
> 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

thanks, the patch fixes the issue for me

Greetings, Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-16 16:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16 15:20 /proc/*/pagemap oopses Eric Sesterhenn
2008-07-16 15:36 ` Alexey Dobriyan
2008-07-16 15:59   ` [PATCH] proc: fix /proc/*/pagemap some more Alexey Dobriyan
2008-07-16 16:13     ` Vegard Nossum
2008-07-16 16:27     ` Eric Sesterhenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®