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-prev] [day] [month] [year] [list]
Message-Id: <20211209062441.9856-1-guozhengkui@vivo.com>
Date:   Thu,  9 Dec 2021 14:23:05 +0800
From:   Guo Zhengkui <guozhengkui@...o.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Kishon Vijay Abraham I <kishon@...com>,
        Li Jun <jun.li@....com>, Sasha Levin <sashal@...nel.org>,
        Guo Zhengkui <guozhengkui@...o.com>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Peter Chen <peter.chen@....com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        linux-usb@...r.kernel.org (open list:USB SUBSYSTEM),
        linux-kernel@...r.kernel.org (open list)
Cc:     kernel@...o.com
Subject: [PATCH] usb: core: hcd: change sizeof(vaddr) to sizeof(unsigned long)

`vaddr` is a pointer to unsigned char. sizeof(vaddr) here intends
to get the size of a pointer. But readers may get confused. Change
sizeof(vaddr) to sizeof(unsigned long) makes more sense.

Suggested-by: Alan Stern <stern@...land.harvard.edu>
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
 drivers/usb/core/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 4d326ee12c36..9ffc63ae65ac 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1281,7 +1281,7 @@ static int hcd_alloc_coherent(struct usb_bus *bus,
 		return -EFAULT;
 	}
 
-	vaddr = hcd_buffer_alloc(bus, size + sizeof(vaddr),
+	vaddr = hcd_buffer_alloc(bus, size + sizeof(unsigned long),
 				 mem_flags, dma_handle);
 	if (!vaddr)
 		return -ENOMEM;
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ