All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-mmc@vger.kernel.org, Pierre Ossman <drzeus@drzeus.cx>
Subject: Re: [PATCH] mmc: mmci: reduce max_blk_count to avoid overflowing max_req_size
Date: Fri, 02 Mar 2012 16:02:38 -0500	[thread overview]
Message-ID: <m2ehtan2c1.fsf@bob.laptop.org> (raw)
In-Reply-To: <1330082721-6021-1-git-send-email-will.deacon@arm.com> (Will Deacon's message of "Fri, 24 Feb 2012 11:25:21 +0000")

Hi Will,

On Fri, Feb 24 2012, Will Deacon wrote:
> On a system with large pages (64k in my case), the following BUG is
> triggered in MMC core:
>
> [    2.338023] BUG: failure at drivers/mmc/core/core.c:221/mmc_start_request()!
> [    2.338102] Kernel panic - not syncing: BUG!
> [    2.338155] Call trace:
> [    2.338228] [<ffffffc00008635c>] dump_backtrace+0x0/0x120
> [    2.338317] [<ffffffc0003365ec>] dump_stack+0x14/0x1c
> [    2.338403] [<ffffffc000336990>] panic+0xbc/0x1f0
> [    2.338498] [<ffffffc00027a494>] mmc_start_request+0x154/0x184
> [    2.338600] [<ffffffc00027abdc>] mmc_start_req+0x110/0x140
> [    2.338701] [<ffffffc00028604c>] mmc_blk_issue_rw_rq+0x7c/0x39c
> [    2.338804] [<ffffffc00028652c>] mmc_blk_issue_rq+0x1c0/0x468
> [    2.338905] [<ffffffc000287564>] mmc_queue_thread+0x68/0x118
> [    2.338995] [<ffffffc0000bc308>] kthread+0x84/0x8c
>
> This is because of a 64k request with a max_req_size of 64k-1 bytes.
>
> The following patch fixes the problem by limiting the max_blk_count
> such that max_blk_count * max_blk_size == max_req_size. I couldn't
> pursuade the compiler to emit a shift instead of a div without encoding
> the shift explicitly.
>
> Cc: Pierre Ossman <drzeus@drzeus.cx>
> Cc: Chris Ball <cjb@laptop.org>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Thanks, pushed to mmc-next for 3.3.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

      parent reply	other threads:[~2012-03-02 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24 11:25 [PATCH] mmc: mmci: reduce max_blk_count to avoid overflowing max_req_size Will Deacon
2012-02-29 18:41 ` Will Deacon
2012-03-02 21:02 ` Chris Ball [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=m2ehtan2c1.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=drzeus@drzeus.cx \
    --cc=linux-mmc@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.