]> Git Repo - J-linux.git/commitdiff
s390/ap: fix error handling in __verify_queue_reservations()
authorTony Krowiak <[email protected]>
Wed, 6 Jul 2022 21:43:29 +0000 (17:43 -0400)
committerAlexander Gordeev <[email protected]>
Fri, 15 Jul 2022 05:07:36 +0000 (07:07 +0200)
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 <[email protected]>
Reported-by: Tony Krowiak <[email protected]>
Reviewed-by: Harald Freudenberger <[email protected]>
Fixes: 4f8206b88286 ("s390/ap: driver callback to indicate resource in use")
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
[[email protected] fixed description, added Fixes and Link]
Signed-off-by: Alexander Gordeev <[email protected]>
drivers/s390/crypto/ap_bus.c

index 5c13d2079d96f32e8d85f208d09d74c48f94516a..0a9045b49c508192eea8eaf9c66c50a396f20c3f 100644 (file)
@@ -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 */
This page took 0.050347 seconds and 4 git commands to generate.