From: tom.leiming@gmail.com (Ming Lei)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM/kirkwood: v3.12-rc6: kernel BUG at mm/util.c:390!
Date: Sun, 27 Oct 2013 19:51:15 +0800 [thread overview]
Message-ID: <20131027195115.208f40f3@tom-ThinkPad-T410> (raw)
In-Reply-To: <20131026143617.GA14034@mudshark.cambridge.arm.com>
On Sat, 26 Oct 2013 15:36:17 +0100
Will Deacon <will.deacon@arm.com> wrote:
> On Thu, Oct 24, 2013 at 09:07:30PM +0100, Aaro Koskinen wrote:
>
> > [ 36.477203] Backtrace:
> > [ 36.535603] [<c009237c>] (page_mapping+0x0/0x50) from [<c0010dd8>] (flush_kernel_dcache_page+0x14/0x98)
> > [ 36.661070] [<c0010dc4>] (flush_kernel_dcache_page+0x0/0x98) from [<c0172b60>] (sg_miter_stop+0xc8/0x10c)
> > [ 36.792813] r4:df8a9a64 r3:00000003
> > [ 36.857524] [<c0172a98>] (sg_miter_stop+0x0/0x10c) from [<c0172f20>] (sg_miter_next+0x14/0x13c)
>
> ... assumedly for scatter/gather DMA. How is your block driver allocating
> its buffers? If you're using the DMA API, I can't see how this would happen.
Lots of SCSI commands(inquiry, ...) pass kmalloc buffer to block layer,
then the sg buffer copy helpers and flush_kernel_dcache_page() may see
slab page.
That has been here from commit b1adaf65ba03( [SCSI] block: add sg buffer copy
helper functions).
So how about letting below patch to workaround the issue?
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index a685c8a..eea8806 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -577,7 +577,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
miter->__offset += miter->consumed;
miter->__remaining -= miter->consumed;
- if (miter->__flags & SG_MITER_TO_SG)
+ if ((miter->__flags & SG_MITER_TO_SG) && !PageSlab(page))
flush_kernel_dcache_page(miter->page);
if (miter->__flags & SG_MITER_ATOMIC) {
Thanks,
--
Ming Lei
next prev parent reply other threads:[~2013-10-27 11:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 20:07 ARM/kirkwood: v3.12-rc6: kernel BUG at mm/util.c:390! Aaro Koskinen
2013-10-26 14:36 ` Will Deacon
2013-10-26 17:23 ` Aaro Koskinen
2013-10-27 11:51 ` Ming Lei [this message]
2013-10-27 12:50 ` Aaro Koskinen
2013-10-27 13:16 ` Ming Lei
2013-10-27 13:42 ` Tejun Heo
2013-10-27 13:47 ` Russell King - ARM Linux
2013-10-27 13:53 ` Russell King - ARM Linux
2013-10-27 14:18 ` Simon Baatz
2013-10-28 12:48 ` Catalin Marinas
2013-10-27 14:19 ` Ming Lei
2013-10-28 14:13 ` Simon Baatz
2013-10-28 15:45 ` Ming Lei
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=20131027195115.208f40f3@tom-ThinkPad-T410 \
--to=tom.leiming@gmail.com \
--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).