Bug 181810 - apm spinlock panic during hibernation resume bug (+fix ?)
apm spinlock panic during hibernation resume bug (+fix ?)
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Martuccelli
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-16 14:14 EST by Peter Skensved
Modified: 2012-06-20 09:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:22:11 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)

  None (edit)
Description Peter Skensved 2006-02-16 14:14:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 CentOS/1.0.7-1.4.1.centos4 Firefox/1.0.7

Description of problem:
Dell 4100 laptop running CentOS4.2 ( I know it isn't RHEL but it is the same source code ... ) with ACPI turned off and APM turned on. When resuming from hibernate to RAM ( which worked with RH 7.3 -> 9 + all CentOS 2.4 kernels ) I get a :
kernel panic - not syncing : arch/i386/kernel/time.c:178 : spinlock(arch/i386/kernrl/time.c: c034d0a8) already locked by arch/i386/kernel/time.c/310

at least 90% of the time.

 Although I do not understand the source code fully I believe the problem is caused by two lines of code in time_resume ( in arch/i386/kenel/time.c ) being in the wrong order. The call to get_cmos_time shouldn't happen until after the write_seqlock_irqsave() since normal timer interrupts can happen at any time and the interrupt code calls get_cmos_time(). 

 After applying the patch below I have had no panics during suspend/resume

Version-Release number of selected component (if applicable):
kernel-2.6.9-*

How reproducible:
Always

Steps to Reproduce:
1.Do an APM suspend to RAM
2.Do an APM resume 
3.
  

Actual Results:  kernel panic - not syncing : arch/i386/kernel/time.c:178 : spinlock(arch/i386/kernrl/time.c: c034d0a8) already locked by arch/i386/kernel/i386/time.c/310

Expected Results:  A normal resume

Additional info:

*** linux-2.6.9/arch/i386/kernel/time.c.orig    2006-01-27 10:29:13.000000000 -0500
--- linux-2.6.9/arch/i386/kernel/time.c 2006-01-27 10:35:02.000000000 -0500
***************
*** 334,341 ****
  static int time_resume(struct sys_device *dev)
  {
        unsigned long flags;
!       unsigned long sec = get_cmos_time() + clock_cmos_diff;
        write_seqlock_irqsave(&xtime_lock, flags);
        xtime.tv_sec = sec;
        xtime.tv_nsec = 0;
        write_sequnlock_irqrestore(&xtime_lock, flags);
--- 334,342 ----
  static int time_resume(struct sys_device *dev)
  {
        unsigned long flags;
!       unsigned long sec;
        write_seqlock_irqsave(&xtime_lock, flags);
+       sec  = get_cmos_time() + clock_cmos_diff;
        xtime.tv_sec = sec;
        xtime.tv_nsec = 0;
        write_sequnlock_irqrestore(&xtime_lock, flags);
Comment 2 RHEL Product and Program Management 2006-10-19 18:02:04 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 3 Jay Turner 2006-11-21 07:57:44 EST
QE ack for 4.5.
Comment 7 RHEL Product and Program Management 2007-05-09 06:50:24 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 RHEL Product and Program Management 2007-09-07 15:45:44 EDT
This request was previously evaluated by Red Hat Product Management
for inclusion in the current Red Hat Enterprise Linux release, but
Red Hat was unable to resolve it in time.  This request will be
reviewed for a future Red Hat Enterprise Linux release.
Comment 10 Jiri Pallich 2012-06-20 09:22:11 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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