From: Chris Ball <cjb@laptop.org>
To: Aaron Lu <aaron.lu@amd.com>
Cc: Girish K S <girish.shivananjappa@linaro.org>,
Subhash Jadavani <subhashj@codeaurora.org>,
Philip Rakity <prakity@marvell.com>,
linux-mmc@vger.kernel.org, Aaron Lu <aaron.lwe@gmail.com>
Subject: Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning
Date: Thu, 08 Nov 2012 20:46:54 -0500 [thread overview]
Message-ID: <87zk2reeep.fsf@octavius.laptop.org> (raw)
In-Reply-To: <87wqxzal6b.fsf@octavius.laptop.org> (Chris Ball's message of "Mon, 05 Nov 2012 14:45:16 -0500")
Hi Aaron,
On Mon, Nov 05 2012, Chris Ball wrote:
> On Tue, Jul 03 2012, Aaron Lu wrote:
>> */
>> if ((host->flags & SDHCI_NEEDS_RETUNING) &&
>> !(present_state & (SDHCI_DOING_WRITE | SDHCI_DOING_READ))) {
>> + /* eMMC uses cmd21 while sd and sdio use cmd19 */
>> + tuning_opcode = mmc->card->type == MMC_TYPE_MMC ?
>> + MMC_SEND_TUNING_BLOCK_HS200 :
>> + MMC_SEND_TUNING_BLOCK;
>
> This is causing a NULL deref crash here when run on host controllers
> with no card inserted -- mmc->card is NULL, as you'd expect, yet it's
> dereferenced anyway. Maybe the system you tested it on only has an
> eMMC, so you never noticed that it crashes if there's no card present?
> Or maybe it's abnormal for host controllers to set SDHCI_NEEDS_RETUNING
> when there's no card present?
I'm going to send my fix to Linus (and hence stable@) tomorrow morning,
since it's important to remove this crash. Let me know what you think
when you get a chance.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2012-11-09 1:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 9:27 [PATCH v2] mmc: sdhci: fix incorrect command used in tuning Aaron Lu
2012-07-03 9:58 ` Girish K S
2012-07-03 11:31 ` Aaron Lu
2012-07-03 11:57 ` Girish K S
2012-07-03 12:00 ` Girish K S
2012-07-03 12:02 ` Girish K S
2012-07-03 13:52 ` Aaron Lu
2012-07-03 14:03 ` Philip Rakity
2012-07-04 0:37 ` Chris Ball
2012-07-04 5:11 ` Aaron Lu
2012-11-05 19:45 ` Chris Ball
2012-11-09 1:46 ` 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=87zk2reeep.fsf@octavius.laptop.org \
--to=cjb@laptop.org \
--cc=aaron.lu@amd.com \
--cc=aaron.lwe@gmail.com \
--cc=girish.shivananjappa@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.com \
--cc=subhashj@codeaurora.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