From: Andrei Warkentin Date: Wed, 13 Apr 2011 20:33:12 +0000 (-0500) Subject: mmc: core: Fix use of uninitialized data in mmc_cmd_app. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=87f6119e25bbe0fd60e76f599d5fa10cf489519c;p=linux-beck.git mmc: core: Fix use of uninitialized data in mmc_cmd_app. mmc_cmd_app did not zero out mmc_command on stack. Reported-by: Chuanxiao Dong Signed-off-by: Andrei Warkentin Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 76af349c14b4..71fdb07fd8de 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c @@ -29,6 +29,8 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card) BUG_ON(!host); BUG_ON(card && (card->host != host)); + memset(&cmd, 0, sizeof(struct mmc_command)); + cmd.opcode = MMC_APP_CMD; if (card) {