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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180802084245.239689-4-toddpoynor@gmail.com>
Date:   Thu,  2 Aug 2018 01:42:40 -0700
From:   Todd Poynor <toddpoynor@...il.com>
To:     Rob Springer <rspringer@...gle.com>,
        John Joseph <jnjoseph@...gle.com>,
        Ben Chan <benchan@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Dmitry Torokhov <dtor@...omium.org>, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, Todd Poynor <toddpoynor@...gle.com>
Subject: [PATCH 3/8] staging: gasket: core: move driver loaded log after error cases

From: Todd Poynor <toddpoynor@...gle.com>

Gasket could claim to have loaded a driver and then print an error
indicating it actually did not.  Move the driver registration message
after the last error check.  Replace the existing "loaded successfully"
message with this instead.

Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
 drivers/staging/gasket/gasket_core.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index e550c9060dcd2..2160c2de78e77 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -1759,10 +1759,6 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
 	}
 	mutex_unlock(&g_mutex);
 
-	pr_info("gasket: Loaded %s driver version %s, framework version %s\n",
-		driver_desc->name, driver_desc->driver_version,
-		GASKET_FRAMEWORK_VERSION);
-
 	if (desc_idx == -1) {
 		pr_err("Too many Gasket drivers loaded: %d\n",
 		       GASKET_FRAMEWORK_DESC_MAX);
@@ -1810,7 +1806,10 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
 		goto fail2;
 	}
 
-	pr_info("Driver registered successfully.\n");
+	pr_info("gasket: Loaded %s driver version %s, framework version %s\n",
+		driver_desc->name, driver_desc->driver_version,
+		GASKET_FRAMEWORK_VERSION);
+
 	return 0;
 
 fail2:
-- 
2.18.0.597.ga71716f1ad-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ