s390/ap: fixes bug in the AP bus's __verify_queue_reservations function
Subsystems (2)
PATCH 1/1 s390/ap: fixes bug in the AP bus's __verify_queue_reservations function
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.
--- drivers/s390/crypto/ap_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/crypto/ap_bus.c +1 -1
@@ -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 */
Signature · 1 line
2.31.1
Harald Freudenberger
maintainerQuoted 24 lines · Tony Krowiak
The AP bus's
__verify_queue_reservationsfunction 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]>--- drivers/s390/crypto/ap_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/s390/crypto/ap_bus.c +1
-1@@ -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 ; }
Quoted 1 line
/* release the driver's module */
Tony, good catch. Thanks. Please add my Reviewed-by: Harald Freudenberger <[email protected]> and then commit into devel and cc stable.
Quoted 25 lines · Harald Freudenberger
Quoted 24 lines · Tony Krowiak
The AP bus's
__verify_queue_reservationsfunction 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]>---
drivers/s390/crypto/ap_bus.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/s390/crypto/ap_bus.c +1
-1@@ -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; }
Quoted 3 lines
Quoted 1 line
/* release the driver's module */
Tony, good catch. Thanks. Please add my Reviewed-by: Harald Freudenberger <[email protected]> and then commit into devel and cc stable.
It is done.