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-next>] [day] [month] [year] [list]
Message-Id: <1636016141-3645490-1-git-send-email-jiasheng@iscas.ac.cn>
Date:   Thu,  4 Nov 2021 08:55:41 +0000
From:   Jiasheng Jiang <jiasheng@...as.ac.cn>
To:     krzysztof.kozlowski@...onical.com, yashsri421@...il.com,
        davem@...emloft.net, rdunlap@...radead.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] NFC: nfcmrvl: add unanchor after anchor

In the error path, the anchored urb is unanchored.
But in the successful path, the anchored urb is not.
Therefore, it might be better to add unanchor().

Fixes: f26e30c ("NFC: nfcmrvl: Initial commit for Marvell NFC driver")
Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
---
 drivers/nfc/nfcmrvl/usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c
index bcd563c..f8ae517 100644
--- a/drivers/nfc/nfcmrvl/usb.c
+++ b/drivers/nfc/nfcmrvl/usb.c
@@ -146,9 +146,9 @@ nfcmrvl_submit_bulk_urb(struct nfcmrvl_usb_drv_data *drv_data, gfp_t mem_flags)
 		if (err != -EPERM && err != -ENODEV)
 			nfc_err(&drv_data->udev->dev,
 				"urb %p submission failed (%d)\n", urb, -err);
-		usb_unanchor_urb(urb);
 	}
 
+	usb_unanchor_urb(urb);
 	usb_free_urb(urb);
 
 	return err;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ