Message ID | 1389781753-28217-1-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDM5LUP2XEPRB66H3GLAKGQECUVPG3I@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 85261202FA for <linaro@patches.linaro.org>; Wed, 15 Jan 2014 10:33:32 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id k19sf6385507igc.3 for <linaro@patches.linaro.org>; Wed, 15 Jan 2014 02:33:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=BMzUjPIKsULlEfrzCKe4wgfUuDQ5PFaipO8mZUwDDek=; b=imPN8P7wfSYMKXtqanCcRUdXRHLBoNPXjKC3DgrYILBtod6ZAmoalRpSMC2AM9lw32 wmlYAEmX5Ev291HK0k/gtK/NPsv+HE8dXPUvM6Gd/vZUrC5NIlC0cQFrVjAYpyI7c4Dr tLpae+AYFfe94qeEYAG8oKC0qFRVTEHdfuXmFiCPPuBg1aH6ZjBYFV9tZS28Xz93uQXA eOXqVmDf5Q/b0cCCSxiFe6H3CsN/AI86tgZ03jm195ayNFOdc/34wHuQlB7l5HQh0uY+ /mEtQZUFs6ZveTTdGjhBCl93fXDdVf/5/1M+pMTvT+AWt0b0uYnizPVagvEYaCgm3/b3 g5IA== X-Gm-Message-State: ALoCoQnIGtN5nJEwnV9GkoxAQKEj1i+7GnIPYmcX9OYcw/K+zeV3TTZrXRXMD9ld+YyX856KpMdr X-Received: by 10.42.194.5 with SMTP id dw5mr455981icb.5.1389782011866; Wed, 15 Jan 2014 02:33:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.73 with SMTP id ju9ls535164qeb.69.gmail; Wed, 15 Jan 2014 02:33:31 -0800 (PST) X-Received: by 10.52.229.39 with SMTP id sn7mr873736vdc.2.1389782011748; Wed, 15 Jan 2014 02:33:31 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id e9si1478000vct.34.2014.01.15.02.33.31 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Jan 2014 02:33:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so332386vcb.9 for <patchwork-forward@linaro.org>; Wed, 15 Jan 2014 02:33:31 -0800 (PST) X-Received: by 10.52.251.68 with SMTP id zi4mr840308vdc.25.1389782011678; Wed, 15 Jan 2014 02:33:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp263436ved; Wed, 15 Jan 2014 02:33:31 -0800 (PST) X-Received: by 10.66.137.109 with SMTP id qh13mr1790904pab.140.1389782010695; Wed, 15 Jan 2014 02:33:30 -0800 (PST) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by mx.google.com with ESMTPS id mi5si3293545pab.188.2014.01.15.02.33.30 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Jan 2014 02:33:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.179 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.179; Received: by mail-pd0-f179.google.com with SMTP id y10so936332pdj.24 for <patches@linaro.org>; Wed, 15 Jan 2014 02:33:30 -0800 (PST) X-Received: by 10.66.139.169 with SMTP id qz9mr1880626pab.16.1389782010235; Wed, 15 Jan 2014 02:33:30 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id iu7sm7121558pbc.45.2014.01.15.02.33.27 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Jan 2014 02:33:29 -0800 (PST) From: Sachin Kamat <sachin.kamat@linaro.org> To: linux-mmc@vger.kernel.org Cc: chris@printf.net, tgih.jun@samsung.com, jh80.chung@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] mmc: dw_mmc: Fix NULL pointer dereference Date: Wed, 15 Jan 2014 15:59:13 +0530 Message-Id: <1389781753-28217-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 9ded62c8225e..8b3e58a5f9ed 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1345,7 +1345,7 @@ static void dw_mci_tasklet_func(unsigned long priv) if (!err) { if (!data->stop || mrq->sbc) { - if (mrq->sbc) + if (mrq->sbc && data->stop) data->stop->error = 0; dw_mci_request_end(host, mrq); goto unlock;
If mrq->sbc is not NULL but data->stop happens to be NULL, it will lead to NULL pointer dereferencing. Avoid this by having a NULL check for data->stop. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)