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: <20211108101157.15189-13-bp@alien8.de>
Date:   Mon,  8 Nov 2021 11:11:27 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Ayush Sawal <ayush.sawal@...lsio.com>,
        Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
        Rohit Maheshwari <rohitm@...lsio.com>
Subject: [PATCH v0 12/42] ethernet: chelsio: Check notifier registration return value

From: Borislav Petkov <bp@...e.de>

Avoid homegrown notifier registration checks.

No functional changes.

Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Ayush Sawal <ayush.sawal@...lsio.com>
Cc: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
Cc: Rohit Maheshwari <rohitm@...lsio.com>
---
 .../net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c
index 9098b3eed4da..43ee3fb6bc67 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c
@@ -39,7 +39,10 @@ static uint send_page_order = (14 - PAGE_SHIFT < 0) ? 0 : 14 - PAGE_SHIFT;
 static void register_listen_notifier(struct notifier_block *nb)
 {
 	mutex_lock(&notify_mutex);
-	raw_notifier_chain_register(&listen_notify_list, nb);
+
+	if (raw_notifier_chain_register(&listen_notify_list, nb))
+		pr_warn("chtls listen notifier already registered\n");
+
 	mutex_unlock(&notify_mutex);
 }
 
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ