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: <48D44B35.10105@gmail.com>
Date:	Fri, 19 Sep 2008 21:00:37 -0400
From:	sangsu <sangsu@...il.com>
To:	stern@...land.harvard.edu
CC:	david-b@...bell.net, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] USB: g_printer: fix handling zero-length packet

g_printer doesn't have to check whether the data size is a multiple of
MaxPacketSize, because device controller driver already make that check.

Signed-off-by: SangSu Park<sangsu@...il.com>
---
drivers/usb/gadget/printer.c | 3++-
1 files changed, 2 insertion(+), 1 deletions(-)


--- a/drivers/usb/gadget/printer.c	2008-08-12 21:55:39.000000000 -0400
+++ b/drivers/usb/gadget/printer.c	2008-09-19 20:39:44.000000000 -0400
@@ -1264,8 +1264,7 @@
	/* respond with data transfer before status phase? */
	if (value >= 0) {
		req->length = value;
-		req->zero = value < wLength
-				&& (value % gadget->ep0->maxpacket) == 0;
+		req->zero = value < wLength;
		value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
		if (value < 0) {
			DBG(dev, "ep_queue --> %d\n", value);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ