<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/usbip, branch master</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=master</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2016-12-06T07:37:41+00:00</updated>
<entry>
<title>usbip: fix warning in vhci_hcd_probe/lockdep_init_map</title>
<updated>2016-12-06T07:37:41+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2016-12-05T19:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=918b8ac55b6c809b70aa05c279087109584e393e'/>
<id>urn:sha1:918b8ac55b6c809b70aa05c279087109584e393e</id>
<content type='text'>
vhci_hcd calls sysfs_create_group() with dynamically allocated sysfs
attributes triggering the lock-class key not persistent warning. Call
sysfs_attr_init() for dynamically allocated sysfs attributes to fix it.

vhci_hcd vhci_hcd: USB/IP Virtual Host Controller
vhci_hcd vhci_hcd: new USB bus registered, assigned bus number 2
BUG: key ffff88006a7e8d18 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:3131
lockdep_init_map+0x60c/0x770
DEBUG_LOCKS_WARN_ON(1)[    1.567044] Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-rc7+ #58
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
 ffff88006bce6eb8 ffffffff81f96c8a ffffffff00000a02 1ffff1000d79cd6a
 ffffed000d79cd62 000000046bce6ed8 0000000041b58ab3 ffffffff8598af40
 ffffffff81f969f8 0000000000000000 0000000041b58ab3 0000000000000200
Call Trace:
 [&lt;     inline     &gt;] __dump_stack lib/dump_stack.c:15
 [&lt;ffffffff81f96c8a&gt;] dump_stack+0x292/0x398 lib/dump_stack.c:51
 [&lt;ffffffff812b808f&gt;] __warn+0x19f/0x1e0 kernel/panic.c:550
 [&lt;ffffffff812b8195&gt;] warn_slowpath_fmt+0xc5/0x110 kernel/panic.c:565
 [&lt;ffffffff813f3efc&gt;] lockdep_init_map+0x60c/0x770 kernel/locking/lockdep.c:3131
 [&lt;ffffffff819e43d4&gt;] __kernfs_create_file+0x114/0x2a0 fs/kernfs/file.c:954
 [&lt;ffffffff819e68f5&gt;] sysfs_add_file_mode_ns+0x225/0x520 fs/sysfs/file.c:305
 [&lt;     inline     &gt;] create_files fs/sysfs/group.c:64
 [&lt;ffffffff819e8a89&gt;] internal_create_group+0x239/0x8f0 fs/sysfs/group.c:134
 [&lt;ffffffff819e915f&gt;] sysfs_create_group+0x1f/0x30 fs/sysfs/group.c:156
 [&lt;ffffffff8323de24&gt;] vhci_start+0x5b4/0x7a0 drivers/usb/usbip/vhci_hcd.c:978
 [&lt;ffffffff82c907ca&gt;] usb_add_hcd+0x8da/0x1c60 drivers/usb/core/hcd.c:2867
 [&lt;ffffffff8323bc57&gt;] vhci_hcd_probe+0x97/0x130
drivers/usb/usbip/vhci_hcd.c:1103
 ---
 ---
---[ end trace c33c7b202cf3aac8 ]---

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: vudc: Refactor init_vudc_hw() to be more obvious</title>
<updated>2016-12-05T14:08:45+00:00</updated>
<author>
<name>Krzysztof Opasiak</name>
<email>k.opasiak@samsung.com</email>
</author>
<published>2016-12-02T17:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=b282a118eb4ecb5d32eb022f4bed929531d9925b'/>
<id>urn:sha1:b282a118eb4ecb5d32eb022f4bed929531d9925b</id>
<content type='text'>
Current implementation of init_vudc_hw() adds ep0 to ep_list
and then after looping through all endpoints removes it from
that list.

As this may be misleading let's refactor this function
and avoid adding and removing ep0 to eplist and place it
immediately in correct place.

In addition let's remove redundant 0 assignments as ep
array is zeroed during allocation.

Signed-off-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: vudc: fix: Clear already_seen flag also for ep0</title>
<updated>2016-12-05T14:08:45+00:00</updated>
<author>
<name>Krzysztof Opasiak</name>
<email>k.opasiak@samsung.com</email>
</author>
<published>2016-12-01T18:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=3e448e13a662fb20145916636127995cbf37eb83'/>
<id>urn:sha1:3e448e13a662fb20145916636127995cbf37eb83</id>
<content type='text'>
ep_list inside gadget structure doesn't contain ep0.
It is stored separately in ep0 field.

This causes an urb hang if gadget driver decides to
delay setup handling. On host side this is visible as
timeout error when setting configuration.

This bug can be reproduced using for example any gadget
with mass storage function.

Fixes: abdb29574322 ("usbip: vudc: Add vudc_transfer")
Signed-off-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2016-11-18T15:02:15+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-11-18T15:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=ae4d814bf1f2b0b7a37b3c30970d6974911f1377'/>
<id>urn:sha1:ae4d814bf1f2b0b7a37b3c30970d6974911f1377</id>
<content type='text'>
Felipe writes:

usb: patches for v4.10 merge window

One big merge this time with a total of 166 non-merge commits.

Most of the work, by far, is on dwc2 this time (68.2%) with dwc3 a far
second (22.5%). The remaining 9.3% are scattered on gadget drivers.

The most important changes for dwc2 are the peripheral side DMA support
implemented by Synopsys folks and support for the new IOT dwc2
compatible core from Synopsys.

In dwc3 land we have support for high-bandwidth, high-speed isochronous
endpoints and some non-critical fixes for large scatter lists.

Apart from these, we have our usual set of cleanups, non-critical fixes,
etc.
</content>
</entry>
<entry>
<title>usbip: fix possibility of dereference by NULLL pointer in vhci_hcd.c</title>
<updated>2016-11-07T09:19:49+00:00</updated>
<author>
<name>Nobuo Iwata</name>
<email>nobuo.iwata@fujixerox.co.jp</email>
</author>
<published>2016-10-13T03:49:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=d79cda045e3bacb7e754a5324cd3d4ce80708eb1'/>
<id>urn:sha1:d79cda045e3bacb7e754a5324cd3d4ce80708eb1</id>
<content type='text'>
This patch fixes possibility of dereference by NULLL pointer in "[PATCH
v5 1/3] usbip: vhci extension: modifications to vhci driver" which has
been merged to 4.9-rc1. It occurs when a URB with pointer to invalid
USB/IP device is enqueued in race condition against detach operation.

A pointer was passed to vdev_to_vhci() before NULL check.
In vdev_to_vhci(), there's a dereference by the pointer.

This patch moves vdev_to_vhci() after NULL check of the pointer.

Signed-off-by: Nobuo Iwata &lt;nobuo.iwata@fujixerox.co.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: ip: remove unnecessary &amp; operation</title>
<updated>2016-11-03T08:38:27+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2016-09-28T11:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=14f91dd524c42cdf137bda01c44e5e2f69a4c25e'/>
<id>urn:sha1:14f91dd524c42cdf137bda01c44e5e2f69a4c25e</id>
<content type='text'>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &amp;
operation from this driver.

Cc: Valentina Manea &lt;valentina.manea.m@gmail.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: &lt;linux-usb@vger.kernel.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: usbip:checkpatch; fix bare use of unsigned</title>
<updated>2016-10-27T14:59:59+00:00</updated>
<author>
<name>Jai Krishna</name>
<email>rjk1024@gmail.com</email>
</author>
<published>2016-10-25T09:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=1f0c41dd0c216401e88a2665dc6a07ce24d6079d'/>
<id>urn:sha1:1f0c41dd0c216401e88a2665dc6a07ce24d6079d</id>
<content type='text'>
This patch fixes the following checkpatch warning for usbip files
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Jai Krishna &lt;rjk1024@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Kconfig: using select for USB_COMMON dependency</title>
<updated>2016-09-27T10:20:17+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-09-14T01:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=cb9c1cfc86926d0e86d19c8e34f6c23458cd3478'/>
<id>urn:sha1:cb9c1cfc86926d0e86d19c8e34f6c23458cd3478</id>
<content type='text'>
According to (badf6d47f8a9 "usb: common: rework CONFIG_USB_COMMON logic")
we should select USB_COMMON at Kconfig when usb common stuffs are needed,
but some of Kconfig enties have not followed it, update them.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbip: vudc: fix left shift overflow</title>
<updated>2016-08-30T20:28:52+00:00</updated>
<author>
<name>Nicolas Iooss</name>
<email>nicolas.iooss_linux@m4x.org</email>
</author>
<published>2016-08-23T15:13:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=238b7bd91b16d5a08326f858db42229b212e53d8'/>
<id>urn:sha1:238b7bd91b16d5a08326f858db42229b212e53d8</id>
<content type='text'>
In v_recv_cmd_submit(), urb_p-&gt;urb-&gt;pipe has the type unsigned int
(which is 32-bit long on x86_64) but 11&lt;&lt;30 results in a 34-bit integer.
Therefore the 2 leading bits are truncated and

    urb_p-&gt;urb-&gt;pipe &amp;= ~(11 &lt;&lt; 30);

has the same meaning as

    urb_p-&gt;urb-&gt;pipe &amp;= ~(3 &lt;&lt; 30);

This second statement seems to be how the code was intended to be
written, as PIPE_ constants have values between 0 and 3.

The overflow has been detected with a clang warning:

    drivers/usb/usbip/vudc_rx.c:145:27: warning: signed shift result
    (0x2C0000000) requires 35 bits to represent, but 'int' only has 32
    bits [-Wshift-overflow]
            urb_p-&gt;urb-&gt;pipe &amp;= ~(11 &lt;&lt; 30);
                                  ~~ ^  ~~

Fixes: 79c02cb1fd5c ("usbip: vudc: Add vudc_rx")
Signed-off-by: Nicolas Iooss &lt;nicolas.iooss_linux@m4x.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: vudc: Fix apparent cut-n-paste error</title>
<updated>2016-08-30T17:06:43+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@codemonkey.org.uk</email>
</author>
<published>2016-05-31T15:25:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=1328f7b928e3fc41e019903a56d7253b04d7e4de'/>
<id>urn:sha1:1328f7b928e3fc41e019903a56d7253b04d7e4de</id>
<content type='text'>
Coverity picked up that this looks like a cut-n-paste from an almost
identical sequence below that didn't get its variable renamed.

Signed-off-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Reviewed-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
