From patchwork Wed Apr 13 20:32:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 705711 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 p3DKReQQ007461 for ; Wed, 13 Apr 2011 20:27:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758537Ab1DMU1m (ORCPT ); Wed, 13 Apr 2011 16:27:42 -0400 Received: from pullcord.laptop.org ([18.85.46.20]:56368 "EHLO pullcord.laptop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758515Ab1DMU1m (ORCPT ); Wed, 13 Apr 2011 16:27:42 -0400 Received: from pullcord.laptop.org (localhost.localdomain [127.0.0.1]) by pullcord.laptop.org (8.14.4/8.14.4) with ESMTP id p3DKWTwp017366; Wed, 13 Apr 2011 16:32:29 -0400 Received: (from cjb@localhost) by pullcord.laptop.org (8.14.4/8.14.4/Submit) id p3DKWTGZ017365; Wed, 13 Apr 2011 16:32:29 -0400 From: Chris Ball To: linux-mmc@vger.kernel.org Cc: Chris Ball Subject: [PATCH 2/2] mmc: card: Fix use of uninitialized data in mmc_blk_issue_rw_rq. Date: Wed, 13 Apr 2011 16:32:10 -0400 Message-Id: <1302726730-17324-2-git-send-email-cjb@laptop.org> X-Mailer: git-send-email 1.7.0.1 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 20:27:43 +0000 (UTC) mmc_blk_issue_rw_rq did not zero out mmc_command on stack. Signed-off-by: Chris Ball --- drivers/mmc/card/block.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index c209953..9e30cf6 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -504,6 +504,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req) struct mmc_command cmd; u32 readcmd, writecmd, status = 0; + memset(&cmd, 0, sizeof(struct mmc_command)); memset(&brq, 0, sizeof(struct mmc_blk_request)); brq.mrq.cmd = &brq.cmd; brq.mrq.data = &brq.data;