public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390/ap: fixes bug in the AP bus's __verify_queue_reservations function
@ 2022-07-06 22:26 Tony Krowiak
  2022-07-07  6:47 ` Harald Freudenberger
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Krowiak @ 2022-07-06 22:26 UTC (permalink / raw)
  To: linux-s390; +Cc: jjherne, freude, borntraeger

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@linux.ibm.com>
Reported-by: Tony Krowiak <akrowiak@linux.ibm.com>
---
 drivers/s390/crypto/ap_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 5c13d2079d96..0a9045b49c50 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1435,7 +1435,7 @@ static int __verify_queue_reservations(struct device_driver *drv, void *data)
 	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 */
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-11 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06 22:26 [PATCH] s390/ap: fixes bug in the AP bus's __verify_queue_reservations function Tony Krowiak
2022-07-07  6:47 ` Harald Freudenberger
2022-07-11 17:31   ` Anthony Krowiak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox