diff --git a/kernel/power/swap.c b/kernel/power/swap.c index a2dc42c33..bddfa3293 100755 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -634,7 +634,7 @@ static int lzo_compress_threadfn(void *data) d->wrk); lzo_head = (struct hib_lzo_header *)d->cmp; lzo_head->cmp_len = d->cmp_len; - lzo_head->unc_crc32 = crc32_le(0,d->unc, d->unc_len); + lzo_head->unc_crc32 = crc32_le(0,d->cmp + LZO_HEADER, d->cmp_len); atomic_set(&d->stop, 1); wake_up(&d->done); } @@ -1087,7 +1087,7 @@ static int lzo_decompress_threadfn(void *data) d->ret = lzo1x_decompress_safe(d->cmp + LZO_HEADER, d->cmp_len, d->unc, &d->unc_len); - unc_crc32 = crc32_le(0,d->unc, d->unc_len); + unc_crc32 = crc32_le(0,d->cmp + LZO_HEADER, d->cmp_len); if(unc_crc32 != get_header_crc32((struct hib_lzo_header *)&d->cmp) ) { d->crc32_err++; }