All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk
Subject: [PATCH] 2.5.64 ACPI suspend/resume locking fix
Date: Mon, 10 Mar 2003 14:14:58 +0100	[thread overview]
Message-ID: <20030310131458.GA1063@note.hausnetz> (raw)

Hi,

doing an
echo 1 >/proc/acpi/sleep
caused quite some trouble on resume, such as
bad: scheduling while atomic!
Call Trace:
 [<c011d4c0>] schedule+0x220/0x230
 [<c0140608>] __pdflush+0x98/0x1e0
 [<c0140750>] pdflush+0x0/0x20
 [<c0140761>] pdflush+0x11/0x20
 [<c010826d>] kernel_thread_helper+0x5/0x18

(see BugZilla #455).

Turned out that the suspend handling in __pdflush() was abusing
pdflush_lock, by not relocking before going back up the loop (which then
unlocked again --> refcount -1 --> haywire!).

With the locking fix below,
doing
echo 1 >/proc/acpi/sleep
now suspends/resumes beautifully without giving further errors.

Note that my machine still gets killed completely if I do
echo 3 >/proc/acpi/sleep
, however. Any ideas? How to debug this?

Thanks,

Andreas Mohr

--- mm/pdflush.c.org	2003-03-10 14:04:00.000000000 +0100
+++ mm/pdflush.c	2003-03-10 13:14:57.000000000 +0100
@@ -106,6 +106,7 @@
 		schedule();
 		if (current->flags & PF_FREEZE) {
 			refrigerator(PF_IOTHREAD);
+			spin_lock_irq(&pdflush_lock);
 			continue;
 		}
 

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany

                 reply	other threads:[~2003-03-10 13:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030310131458.GA1063@note.hausnetz \
    --to=andi@rhlx01.fht-esslingen.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.