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>] [day] [month] [year] [list]
Message-ID: <20220805110742.7a6d55c1@gandalf.local.home>
Date:   Fri, 5 Aug 2022 11:07:42 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Daniel Bristot de Oliveira <bristot@...nel.org>
Subject: [for-linus][PATCH] rv: Unlock on error path in
 rv_unregister_reactor()



Dan Carpenter (1):
      rv: Unlock on error path in rv_unregister_reactor()

----
 kernel/trace/rv/rv_reactors.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---------------------------
commit f1a15b977ff864513133ecb611eb28603d32c1b4
Author: Dan Carpenter <dan.carpenter@...cle.com>
Date:   Thu Aug 4 17:33:48 2022 +0300

    rv: Unlock on error path in rv_unregister_reactor()
    
    Unlock the "rv_interface_lock" mutex before returning.
    
    Link: https://lkml.kernel.org/r/YuvYzNfGMgV+PIhd@kili
    
    Fixes: 04acadcb4453 ("rv: Add runtime reactors interface")
    Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>

diff --git a/kernel/trace/rv/rv_reactors.c b/kernel/trace/rv/rv_reactors.c
index a6522c196382..6aae106695b6 100644
--- a/kernel/trace/rv/rv_reactors.c
+++ b/kernel/trace/rv/rv_reactors.c
@@ -329,6 +329,7 @@ int rv_register_reactor(struct rv_reactor *reactor)
 int rv_unregister_reactor(struct rv_reactor *reactor)
 {
 	struct rv_reactor_def *ptr, *next;
+	int ret = 0;
 
 	mutex_lock(&rv_interface_lock);
 
@@ -343,13 +344,14 @@ int rv_unregister_reactor(struct rv_reactor *reactor)
 				       ptr->reactor->name, ptr->counter);
 				printk(KERN_WARNING "rv: the rv_reactor %s cannot be removed\n",
 				       ptr->reactor->name);
-				return -EBUSY;
+				ret = -EBUSY;
+				break;
 			}
 		}
 	}
 
 	mutex_unlock(&rv_interface_lock);
-	return 0;
+	return ret;
 }
 
 /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ