<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/misc, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-10T09:19:08Z</updated>
<entry>
<title>Merge 4.20-rc6 into usb-next</title>
<updated>2018-12-10T09:19:08Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-12-10T09:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b53bde6686fb6952f560e82c5b6c529966d205a4'/>
<id>urn:sha1:b53bde6686fb6952f560e82c5b6c529966d205a4</id>
<content type='text'>
We want the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: appledisplay: Remove unnecessary spinlock</title>
<updated>2018-12-05T09:42:25Z</updated>
<author>
<name>Alexander Theissen</name>
<email>alex.theissen@me.com</email>
</author>
<published>2018-12-04T22:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ea5eb139f43360ae2d471e975b82d3fa38929c8'/>
<id>urn:sha1:3ea5eb139f43360ae2d471e975b82d3fa38929c8</id>
<content type='text'>
The spinlock was inside the urb completion function which is only
called once per display and is then resubmitted from this function.
There was no other place where this lock was used.

Signed-off-by: Alexander Theissen &lt;alex.theissen@me.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: appledisplay: Set urb transfer_flags to URB_NO_TRANSFER_DMA_MAP</title>
<updated>2018-12-05T09:42:24Z</updated>
<author>
<name>Alexander Theissen</name>
<email>alex.theissen@me.com</email>
</author>
<published>2018-12-04T22:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67f3a0d0ad7220b9c37b5e6722a821cd7f389b39'/>
<id>urn:sha1:67f3a0d0ad7220b9c37b5e6722a821cd7f389b39</id>
<content type='text'>
The driver does allocate a DMA address with usb_alloc_coherent but did
not set the appropriate flag to signal that transfer_dma is set to a
valid value.

Signed-off-by: Alexander Theissen &lt;alex.theissen@me.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: appledisplay: Add 27" Apple Cinema Display</title>
<updated>2018-12-05T09:37:29Z</updated>
<author>
<name>Alexander Theissen</name>
<email>alex.theissen@me.com</email>
</author>
<published>2018-12-04T22:43:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7859905301880ad3e16272399d26900af3ac496'/>
<id>urn:sha1:d7859905301880ad3e16272399d26900af3ac496</id>
<content type='text'>
Add another Apple Cinema Display to the list of supported displays.

Signed-off-by: Alexander Theissen &lt;alex.theissen@me.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: misc: appledisplay: add 20" Apple Cinema Display</title>
<updated>2018-11-07T12:23:18Z</updated>
<author>
<name>Mattias Jacobsson</name>
<email>2pi@mok.nu</email>
</author>
<published>2018-10-21T09:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6501f49199097b99e4e263644d88c90d1ec1060'/>
<id>urn:sha1:f6501f49199097b99e4e263644d88c90d1ec1060</id>
<content type='text'>
Add another Apple Cinema Display to the list of supported displays

Signed-off-by: Mattias Jacobsson &lt;2pi@mok.nu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: misc: appledisplay: fix backlight update_status return code</title>
<updated>2018-10-18T17:44:39Z</updated>
<author>
<name>Mattias Jacobsson</name>
<email>2pi@mok.nu</email>
</author>
<published>2018-10-16T12:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=090158555ff8d194a98616034100b16697dd80d0'/>
<id>urn:sha1:090158555ff8d194a98616034100b16697dd80d0</id>
<content type='text'>
Upon success the update_status handler returns a positive number
corresponding to the number of bytes transferred by usb_control_msg.
However the return code of the update_status handler should indicate if
an error occurred(negative) or how many bytes of the user's input to sysfs
that was consumed. Return code zero indicates all bytes were consumed.

The bug can for example result in the update_status handler being called
twice, the second time with only the "unconsumed" part of the user's input
to sysfs. Effectively setting an incorrect brightness.

Change the update_status handler to return zero for all successful
transactions and forward usb_control_msg's error code upon failure.

Signed-off-by: Mattias Jacobsson &lt;2pi@mok.nu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.19-rc4 into usb-next</title>
<updated>2018-09-16T20:44:14Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-09-16T20:44:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1652a83fa494b12e20fc02a2cc3ddbcd75d53170'/>
<id>urn:sha1:1652a83fa494b12e20fc02a2cc3ddbcd75d53170</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: misc: fix obsolete function</title>
<updated>2018-09-10T18:06:48Z</updated>
<author>
<name>Ding Xiang</name>
<email>dingxiang@cmss.chinamobile.com</email>
</author>
<published>2018-08-30T09:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d20bca54b6a92dff75e85dce29b202847b48232'/>
<id>urn:sha1:9d20bca54b6a92dff75e85dce29b202847b48232</id>
<content type='text'>
simple_strtoul is obsolete, and use kstrtoint instead

Signed-off-by: Ding Xiang &lt;dingxiang@cmss.chinamobile.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: iowarrior: replace kmalloc with kmalloc_array</title>
<updated>2018-09-10T18:05:28Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-23T17:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23feefda22392d44ee4101dfcf946bc87a6c74b3'/>
<id>urn:sha1:23feefda22392d44ee4101dfcf946bc87a6c74b3</id>
<content type='text'>
A common flaw in the kernel is integer overflow during memory allocation
size calculations. In an effort to reduce the frequency of these bugs,
kmalloc_array was implemented, which allocates memory for an array,
while at the same time detects integer overflow.

This patch replaces cases of:

	kmalloc(a * b, gfp)

with:
	kmalloc_array(a, b, gfp)

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: misc: uss720: Fix two sleep-in-atomic-context bugs</title>
<updated>2018-09-05T12:36:53Z</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2018-09-01T08:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc8acc214d3f1cafebcbcd101a695bbac716595d'/>
<id>urn:sha1:bc8acc214d3f1cafebcbcd101a695bbac716595d</id>
<content type='text'>
async_complete() in uss720.c is a completion handler function for the
USB driver. So it should not sleep, but it is can sleep according to the
function call paths (from bottom to top) in Linux-4.16.

[FUNC] set_1284_register(GFP_KERNEL)
drivers/usb/misc/uss720.c, 372:
  set_1284_register in parport_uss720_frob_control
drivers/parport/ieee1284.c, 560:
  [FUNC_PTR]parport_uss720_frob_control in parport_ieee1284_ack_data_avail
drivers/parport/ieee1284.c, 577:
  parport_ieee1284_ack_data_avail in parport_ieee1284_interrupt
./include/linux/parport.h, 474:
  parport_ieee1284_interrupt in parport_generic_irq
drivers/usb/misc/uss720.c, 116:
  parport_generic_irq in async_complete

[FUNC] get_1284_register(GFP_KERNEL)
drivers/usb/misc/uss720.c, 382:
  get_1284_register in parport_uss720_read_status
drivers/parport/ieee1284.c, 555:
  [FUNC_PTR]parport_uss720_read_status in parport_ieee1284_ack_data_avail
drivers/parport/ieee1284.c, 577:
  parport_ieee1284_ack_data_avail in parport_ieee1284_interrupt
./include/linux/parport.h, 474:
  parport_ieee1284_interrupt in parport_generic_irq
drivers/usb/misc/uss720.c, 116:
  parport_generic_irq in async_complete

Note that [FUNC_PTR] means a function pointer call is used.

To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC.

These bugs are found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
