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  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]
Date:   Tue, 12 Jan 2021 19:13:26 +0000
From:   Cristian Marussi <cristian.marussi@....com>
To:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc:     sudeep.holla@....com, Cristian Marussi <cristian.marussi@....com>
Subject: [PATCH] firmware: arm_scmi: fix call site of notifications exit

Call scmi_notification_exit() only when SCMI platform driver instance has
been really successfully removed.

Signed-off-by: Cristian Marussi <cristian.marussi@....com>
---
A small fix spotted by code inspection, applies on for-next/scmi
n top of:

commit 6054d97ab512 ("MAINTAINERS: Update ARM SCMI entry")
---
 drivers/firmware/arm_scmi/driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 5392e1fc6b4e..dd65fb1c453c 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -848,13 +848,13 @@ static int scmi_remove(struct platform_device *pdev)
 	struct scmi_info *info = platform_get_drvdata(pdev);
 	struct idr *idr = &info->tx_idr;
 
-	scmi_notification_exit(&info->handle);
-
 	mutex_lock(&scmi_list_mutex);
-	if (info->users)
+	if (info->users) {
 		ret = -EBUSY;
-	else
+	} else {
+		scmi_notification_exit(&info->handle);
 		list_del(&info->node);
+	}
 	mutex_unlock(&scmi_list_mutex);
 
 	if (ret)
-- 
2.17.1

Powered by blists - more mailing lists