lkml.org 
[lkml]   [2006]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] fix panic when swsusp signature can't be read
Do not panic a machine when swsusp signature can't be read.

From: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit 05f70501240c6ad5f852f13c187ee55579ad7bb8
tree 1a8e0dcdc2b19c5fb782e2fb95b39af59f7c353e
parent cb0a153122dfc556ca94d0b5dc0e06813b152539
author <pavel@amd.ucw.cz> Sat, 08 Jul 2006 14:22:36 +0200
committer <pavel@amd.ucw.cz> Sat, 08 Jul 2006 14:22:36 +0200

kernel/power/swap.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 044b8e0..7d5dd97 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -311,8 +311,10 @@ static atomic_t io_done = ATOMIC_INIT(0)

static int end_io(struct bio *bio, unsigned int num, int err)
{
- if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
- panic("I/O error reading memory image");
+ if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+ printk(KERN_ERR "I/O error reading swsusp image.\n");
+ return -EIO;
+ }
atomic_set(&io_done, 0);
return 0;
}
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-08 14:27    [W:0.029 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site