linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: core: Fix use of uninitialized data in mmc_send_if_cond.
@ 2011-04-13 20:32 Chris Ball
  0 siblings, 0 replies; only message in thread
From: Chris Ball @ 2011-04-13 20:32 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball

mmc_send_if_cond did not zero out mmc_command on stack.

Signed-off-by: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/core/sd_ops.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 71fdb07..da50849 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -201,6 +201,8 @@ int mmc_send_if_cond(struct mmc_host *host, u32 ocr)
 	static const u8 test_pattern = 0xAA;
 	u8 result_pattern;
 
+	memset(&cmd, 0, sizeof(struct mmc_command));
+
 	/*
 	 * To support SD 2.0 cards, we must always invoke SD_SEND_IF_COND
 	 * before SD_APP_OP_COND. This command will harmlessly fail for
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-13 20:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 20:32 [PATCH 1/2] mmc: core: Fix use of uninitialized data in mmc_send_if_cond Chris Ball

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).