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: <20220719114732.468219291@linuxfoundation.org>
Date:   Tue, 19 Jul 2022 13:55:08 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Tony Krowiak <akrowiak@...ux.ibm.com>,
        Harald Freudenberger <freude@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>
Subject: [PATCH 5.18 223/231] s390/ap: fix error handling in __verify_queue_reservations()

From: Tony Krowiak <akrowiak@...ux.ibm.com>

commit 2f23256c0ea20627c91ea2d468cda945f68c3395 upstream.

The AP bus's __verify_queue_reservations function increments the ref count
for the device driver passed in as a parameter, but fails to decrement it
before returning control to the caller. This will prevents any subsequent
removal of the module.

Signed-off-by: Tony Krowiak <akrowiak@...ux.ibm.com>
Reported-by: Tony Krowiak <akrowiak@...ux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@...ux.ibm.com>
Fixes: 4f8206b88286 ("s390/ap: driver callback to indicate resource in use")
Link: https://lore.kernel.org/r/20220706222619.602094-1-akrowiak@linux.ibm.com
Cc: stable@...r.kernel.org
[agordeev@...ux.ibm.com fixed description, added Fixes and Link]
Signed-off-by: Alexander Gordeev <agordeev@...ux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/s390/crypto/ap_bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1410,7 +1410,7 @@ static int __verify_queue_reservations(s
 	if (ap_drv->in_use) {
 		rc = ap_drv->in_use(ap_perms.apm, newaqm);
 		if (rc)
-			return -EBUSY;
+			rc = -EBUSY;
 	}
 
 	/* release the driver's module */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ