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
| ||
|
Message-ID: <Pine.LNX.4.44L0.1407171053330.1517-100000@iolanthe.rowland.org> Date: Thu, 17 Jul 2014 10:55:32 -0400 (EDT) From: Alan Stern <stern@...land.harvard.edu> To: Amit Virdi <amit.virdi@...com> cc: linux-usb@...r.kernel.org, <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>, <rdunlap@...radead.org>, <ming.lei@...onical.com>, <hdegoede@...hat.com>, <hsi-ss-sw-devel@...ts.codex.cro.st.com> Subject: Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs On Thu, 17 Jul 2014, Amit Virdi wrote: > Section 4.4.7.2 of the USB3.0 spec says: > A zero-length data payload is a valid transfer and may be useful for > some implementations. > > So, extend the logic of allowing URB_ZERO_PACKET to interrupt urbs too. > Otherwise, the kernel throws error of BOGUS transfer flags. > > Signed-off-by: Amit Virdi <amit.virdi@...com> > --- > drivers/usb/core/urb.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c > index 991386c..a136246 100644 > --- a/drivers/usb/core/urb.c > +++ b/drivers/usb/core/urb.c > @@ -460,6 +460,10 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) > case USB_ENDPOINT_XFER_CONTROL: > allowed |= URB_NO_FSBR; /* only affects UHCI */ > /* FALLTHROUGH */ > + case USB_ENDPOINT_XFER_INT: > + if (is_out) > + allowed |= URB_ZERO_PACKET; > + /* FALLTHROUGH */ > default: /* all non-iso endpoints */ > if (!is_out) > allowed |= URB_SHORT_NOT_OK; I can't say this is actually wrong, but have you ever encountered a situation where this would be needed? How often does anyone need to do a multi-packet transfer over an interrupt endpoint? Alan Stern -- 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