Re: [PATCH] s390/ap: fixes bug in the AP bus's __verify_queue_reservations function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/7/22 2:47 AM, Harald Freudenberger wrote:
On 2022-07-07 00:26, Tony Krowiak wrote:
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@xxxxxxxxxxxxx>
Reported-by: Tony Krowiak <akrowiak@xxxxxxxxxxxxx>
---
 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 */
Tony, good catch. Thanks. Please add my Reviewed-by: Harald Freudenberger <freude@xxxxxxxxxxxxx>
and then commit into devel and cc stable.


It is done.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux