From patchwork Wed Apr 13 20:33:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Warkentin X-Patchwork-Id: 705631 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3DJrfOq021378 for ; Wed, 13 Apr 2011 19:54:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758365Ab1DMTyc (ORCPT ); Wed, 13 Apr 2011 15:54:32 -0400 Received: from exprod5og110.obsmtp.com ([64.18.0.20]:41209 "EHLO exprod5og110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758336Ab1DMTyb (ORCPT ); Wed, 13 Apr 2011 15:54:31 -0400 Received: from il93mgrg01.am.mot-mobility.com ([144.188.21.13]) (using TLSv1) by exprod5ob110.postini.com ([64.18.4.12]) with SMTP ID DSNKTaX/dk19h6RLZcF7U1ox61Xfqob1JT40@postini.com; Wed, 13 Apr 2011 12:54:31 PDT Received: from il93mgrg01.am.mot-mobility.com ([10.22.94.168]) by il93mgrg01.am.mot-mobility.com (8.14.3/8.14.3) with ESMTP id p3DJqfGG003815 for ; Wed, 13 Apr 2011 15:52:41 -0400 (EDT) Received: from mail-gy0-f170.google.com (mail-gy0-f170.google.com [209.85.160.170]) by il93mgrg01.am.mot-mobility.com (8.14.3/8.14.3) with ESMTP id p3DJqem4003807 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 13 Apr 2011 15:52:40 -0400 (EDT) Received: by gyb11 with SMTP id 11so396995gyb.15 for ; Wed, 13 Apr 2011 12:54:29 -0700 (PDT) Received: by 10.151.132.19 with SMTP id j19mr958896ybn.272.1302724469515; Wed, 13 Apr 2011 12:54:29 -0700 (PDT) Received: from localhost.localdomain (dyngate-ca119-13.motorola.com [144.189.96.13]) by mx.google.com with ESMTPS id q18sm2299427ybk.26.2011.04.13.12.54.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Apr 2011 12:54:28 -0700 (PDT) From: Andrei Warkentin To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, Andrei Warkentin Subject: [PATCH] MMC: Fix use of uninitialized data in mmc_cmd_app. Date: Wed, 13 Apr 2011 15:33:12 -0500 Message-Id: <1302726792-4733-1-git-send-email-andreiw@motorola.com> X-Mailer: git-send-email 1.7.0.4 X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 13 Apr 2011 19:54:32 +0000 (UTC) mmc_cmd_app did not zero out mmc_command on stack. Signed-off-by: Andrei Warkentin --- 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 76af349..71fdb07 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) {