Bug 220585 - Kernel panic during suspend to disk
Kernel panic during suspend to disk
Status: CLOSED DUPLICATE of bug 215954
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Nigel Cunningham
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-22 05:09 EST by jordan hargrave
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-18 18:04:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch __pa macro for kernel source map (676 bytes, patch)
2006-12-22 05:11 EST, jordan hargrave
no flags Details | Diff

  None (edit)
Description jordan hargrave 2006-12-22 05:09:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060527 SUSE/1.5.0.4-1.9 Firefox/1.5.0.4

Description of problem:
Performing a suspend to disk (echo -n disk > /sys/power/status) causes a kernel panic.  The mark_swapfiles (kernel/power/swap.c) function is passing an incorrect page address to rw_swap_page_sync.  There are two address spaces in the x86_64 kernel, __PAGE_OFFSET and __START_KERNEL_map; the __pa macro (include/asm-x86_64/page.h) does not properly handle this.

Version-Release number of selected component (if applicable):
kernel-2.6.18-2839.el5

How reproducible:
Always


Steps to Reproduce:
1.Install RHEL5 beta2 x86-64 kernel
2.Perform suspenmd to disk (echo -n disk > /sys/power/state)
3.System will panic

Actual Results:


Expected Results:


Additional info:
The bug exists in include/asm-x86_64/page.h in the __pa macro.  It does not properly handle addresses above __START_KERNEL_map.

From kernel.org source:
112 /* Note: __pa(&symbol_visible_to_c) should be always replaced with __pa_symbol.
113    Otherwise you risk miscompilation. */ 
114 #define __pa(x)                 (((unsigned long)(x)>=__START_KERNEL_map)?(unsigned long)(x) - (unsigned long)__START_KERNEL_map:(unsigned long)(x) - PAGE_OFFSET)
115 /* __pa_symbol should be used for C visible symbols.
116    This seems to be the official gcc blessed way to do such arithmetic. */ 
117 #define __pa_symbol(x)          \
118         ({unsigned long v;  \
119           asm("" : "=r" (v) : "" (x)); \
120           __pa(v); })
Comment 1 jordan hargrave 2006-12-22 05:11:35 EST
Created attachment 144263 [details]
Patch __pa macro for kernel source map
Comment 3 Nigel Cunningham 2006-12-22 15:59:58 EST
I've checked with other kernel developers, and we can't apply this patch 
because we've diverged from mainstream in this area in order to provide 
improved kdump support.

A solution is being worked on that should address this issue.

Reassigning to me so I remember to follow this up.
Comment 4 jordan hargrave 2007-02-05 12:50:07 EST
Any updates on this issue?
Comment 5 Nigel Cunningham 2007-02-05 19:08:05 EST
Work on finding the cause is in progress. It's just taking a while as it's non-
trivial and I'm only a part-timer.

Regards,

Nigel
Comment 6 Nigel Cunningham 2007-02-20 04:50:49 EST
Patch now available, in BZ 215954.
Comment 7 Nigel Cunningham 2007-03-18 18:04:16 EDT

*** This bug has been marked as a duplicate of 215954 ***

Note You need to log in before you can comment on or make changes to this bug.