Bug 181810 - apm spinlock panic during hibernation resume bug (+fix ?)
Summary: apm spinlock panic during hibernation resume bug (+fix ?)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Martuccelli
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-16 19:14 UTC by Peter Skensved
Modified: 2012-06-20 13:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:22:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Skensved 2006-02-16 19:14:17 UTC
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 Program Management 2006-10-19 22:02:04 UTC
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 12:57:44 UTC
QE ack for 4.5.

Comment 7 RHEL Program Management 2007-05-09 10:50:24 UTC
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 Program Management 2007-09-07 19:45:44 UTC
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 13:22:11 UTC
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.