Commit aeceb157 authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

[PATCH] swsusp: fix panic when signature can't be read

Do not panic a machine when swsusp signature can't be read.
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 712f403a
...@@ -311,8 +311,10 @@ static atomic_t io_done = ATOMIC_INIT(0); ...@@ -311,8 +311,10 @@ static atomic_t io_done = ATOMIC_INIT(0);
static int end_io(struct bio *bio, unsigned int num, int err) static int end_io(struct bio *bio, unsigned int num, int err)
{ {
if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
panic("I/O error reading memory image"); printk(KERN_ERR "I/O error reading swsusp image.\n");
return -EIO;
}
atomic_set(&io_done, 0); atomic_set(&io_done, 0);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment