From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: gregkh@suse.de
Cc: devel@driverdev.osuosl.org, linux-mm@kvack.org,
ngupta@vflare.org, linux-kernel@vger.kernel.org,
francis.moro@gmail.com, dan.magenheimer@oracle.com,
Seth Jennings <sjenning@linux.vnet.ibm.com>
Subject: [PATCH] staging: zcache: fix cleancache crash
Date: Tue, 13 Sep 2011 14:19:22 -0500 [thread overview]
Message-ID: <1315941562-25422-1-git-send-email-sjenning@linux.vnet.ibm.com> (raw)
In-Reply-To: <4E6FA75A.8060308@linux.vnet.ibm.com>
After commit, c5f5c4db, cleancache crashes on the first
successful get. This was caused by a remaining virt_to_page()
call in zcache_pampd_get_data_and_free() that only gets
run in the cleancache path.
The patch converts the virt_to_page() to struct page
casting like was done for other instances in c5f5c4db.
Based on 3.1-rc4
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
---
drivers/staging/zcache/zcache-main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
index a3f5162..462fbc2 100644
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@ -1242,7 +1242,7 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *bufsize, bool raw,
int ret = 0;
BUG_ON(!is_ephemeral(pool));
- zbud_decompress(virt_to_page(data), pampd);
+ zbud_decompress((struct page *)(data), pampd);
zbud_free_and_delist((struct zbud_hdr *)pampd);
atomic_dec(&zcache_curr_eph_pampd_count);
return ret;
--
1.7.4.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-09-13 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 17:37 [REVERT for 3.1-rc7] staging: zcache: revert "fix crash on high memory swap" Dan Magenheimer
2011-09-13 18:56 ` Seth Jennings
2011-09-13 19:19 ` Seth Jennings [this message]
2011-09-13 20:56 ` [PATCH] staging: zcache: fix cleancache crash Dan Magenheimer
2011-09-14 9:26 ` Francis Moreau
2011-09-14 21:02 ` Francis Moreau
2011-09-15 14:16 ` Dan Magenheimer
2011-09-16 17:55 ` Greg KH
2011-09-15 23:56 ` Valdis.Kletnieks
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=1315941562-25422-1-git-send-email-sjenning@linux.vnet.ibm.com \
--to=sjenning@linux.vnet.ibm.com \
--cc=dan.magenheimer@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=francis.moro@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ngupta@vflare.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).