lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240327024545.138351-1-ricky_wu@realtek.com>
Date: Wed, 27 Mar 2024 10:45:45 +0800
From: Ricky Wu <ricky_wu@...ltek.com>
To: <ulf.hansson@...aro.org>, <ricky_wu@...ltek.com>,
        <wenchao.chen@...soc.com>, <ricardo@...liere.net>, <marex@...x.de>,
        <linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] mmc: core: resume not check card exist before powerup

_mmc_sd_resume
add get_cd before call powerup, make sure the card exist

Signed-off-by: Ricky Wu <ricky_wu@...ltek.com>
---
 drivers/mmc/core/sd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 1c8148cdda50..35e036672cfb 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1750,6 +1750,9 @@ static int _mmc_sd_resume(struct mmc_host *host)
 	if (!mmc_card_suspended(host->card))
 		goto out;
 
+	if (host->ops->get_cd && !host->ops->get_cd(host))
+		goto out;
+
 	mmc_power_up(host, host->card->ocr);
 	err = mmc_sd_init_card(host, host->card->ocr, host->card);
 	mmc_card_clr_suspended(host->card);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ