public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Seth Jennings <sjenning@linux.vnet.ibm.com>,
	dan.magenheimer@oracle.com, francis.moro@gmail.com,
	ngupta@vflare.org
Subject: [patch 1/1] staging: zcache: fix cleancache crash
Date: Tue, 20 Sep 2011 13:09:56 -0700	[thread overview]
Message-ID: <20110920200956.GB8147@kroah.com> (raw)
In-Reply-To: <20110920200924.GA8147@kroah.com>


From: Seth Jennings <sjenning@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.


Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Tested-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/zcache/zcache-main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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_fre
 	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;


      reply	other threads:[~2011-09-20 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 20:09 [patch 0/1] One more staging fix for 3.1 Greg KH
2011-09-20 20:09 ` Greg KH [this message]

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=20110920200956.GB8147@kroah.com \
    --to=gregkh@suse.de \
    --cc=dan.magenheimer@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=francis.moro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sjenning@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.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