From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: atmel-mci causes kernel panic when CONFIG_DEBUG_VM is set
Date: Thu, 19 May 2011 20:25:15 +0200 [thread overview]
Message-ID: <20110519182515.GC21172@pengutronix.de> (raw)
In-Reply-To: <4DD4CC68.80408@atmel.com>
Hello,
On Thu, May 19, 2011 at 09:53:12AM +0200, Ludovic Desroches wrote:
> There is a bug with the atmel-mci driver when the debug feature
> CONFIG_DEBUG_VM is set.
for the new audience: the driver does the following:
flush_dcache_page(sg_page(sg));
with sg being a struct scatterlist * provided by the caller of the
struct mmc_host_ops.request callback.
> Into the atmci_read_data_pio function we use flush_dcache_page (do
> we really need it?) which call the page_mapping function where we
> can find VM_BUG_ON(PageSlab(Page)). Then a kernel panic happens.
>
> I don't understand the purpose of the VM_BUG_ON(PageSlab(Page)) (the
> page comes from a scatter list). How could I correct this problem?
I discussed this problem with Steven and Peter on irc and Steven found
two functions in the mmc code (mmc_send_cxd_data and mmc_send_bus_test)
that use the following idiom:
struct scatterlist sg;
void *data_buf;
data_buf = kmalloc(len, GFP_KERNEL);
sg_init_one(&sg, data_buf, len);
Is that allowed (i.e. pass kmalloc'd memory to sg_init_one)? That might
be the source of the slub page in the scatterlist, no?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2011-05-19 18:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 7:53 atmel-mci causes kernel panic when CONFIG_DEBUG_VM is set Ludovic Desroches
2011-05-19 8:04 ` Barry Song
2011-05-19 9:24 ` Ludovic Desroches
2011-05-19 12:17 ` Ludovic Desroches
2011-05-19 15:16 ` Ludovic Desroches
2011-05-19 18:25 ` Uwe Kleine-König [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=20110519182515.GC21172@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).