<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/class/usbtmc.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-08-15T11:01:02Z</updated>
<entry>
<title>USB: usbtmc: Fix RCU stall warning</title>
<updated>2021-08-15T11:01:02Z</updated>
<author>
<name>Qiang.zhang</name>
</author>
<published>2021-07-23T00:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adfb8b5476e7c4627e22428be6f8f18f052ace47'/>
<id>urn:sha1:adfb8b5476e7c4627e22428be6f8f18f052ace47</id>
<content type='text'>
commit 30fad76ce4e98263edfa8f885c81d5426c1bf169 upstream.

rcu: INFO: rcu_preempt self-detected stall on CPU
rcu:    1-...!: (2 ticks this GP) idle=d92/1/0x4000000000000000
        softirq=25390/25392 fqs=3
        (t=12164 jiffies g=31645 q=43226)
rcu: rcu_preempt kthread starved for 12162 jiffies! g31645 f0x0
     RCU_GP_WAIT_FQS(5) -&gt;state=0x0 -&gt;cpu=0
rcu:    Unless rcu_preempt kthread gets sufficient CPU time,
        OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt     state:R  running task
...........
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: usb_submit_urb failed: -19

The function usbtmc_interrupt() resubmits urbs when the error status
of an urb is -EPROTO. In systems using the dummy_hcd usb controller
this can result in endless interrupt loops when the usbtmc device is
disconnected from the host system.

Since host controller drivers already try to recover from transmission
errors, there is no need to resubmit the urb or try other solutions
to repair the error situation.

In case of errors the INT pipe just stops to wait for further packets.

Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation")
Cc: stable@vger.kernel.org
Reported-by: syzbot+e2eae5639e7203360018@syzkaller.appspotmail.com
Signed-off-by: Qiang.zhang &lt;qiang.zhang@windriver.com&gt;
Acked-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Link: https://lore.kernel.org/r/20210723004334.458930-1-qiang.zhang@windriver.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usbtmc: fix probe error path</title>
<updated>2017-03-30T07:41:24Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2017-03-14T16:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e50afb2273c6fc8b2f9faa745d738662ce19e6f'/>
<id>urn:sha1:5e50afb2273c6fc8b2f9faa745d738662ce19e6f</id>
<content type='text'>
commit 2e47c53503eb9faff42b3cfa144a833344dd1f89 upstream.

Make sure to initialise the return value to avoid having allocation
failures going unnoticed when allocating interrupt-endpoint resources.

This prevents use-after-free or worse when the device is later unbound.

Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.")
Cc: Dave Penkler &lt;dpenkler@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: usbtmc: add missing endpoint sanity check</title>
<updated>2017-03-30T07:41:24Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2017-03-14T16:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73c4e2ede5a999d8b48c6be8614aeeb7abbba90f'/>
<id>urn:sha1:73c4e2ede5a999d8b48c6be8614aeeb7abbba90f</id>
<content type='text'>
commit 687e0687f71ec00e0132a21fef802dee88c2f1ad upstream.

USBTMC devices are required to have a bulk-in and a bulk-out endpoint,
but the driver failed to verify this, something which could lead to the
endpoint addresses being taken from uninitialised memory.

Make sure to zero all private data as part of allocation, and add the
missing endpoint sanity check.

Note that this also addresses a more recently introduced issue, where
the interrupt-in-presence flag would also be uninitialised whenever the
optional interrupt-in endpoint is not present. This in turn could lead
to an interrupt urb being allocated, initialised and submitted based on
uninitialised values.

Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.")
Fixes: 5b775f672cc9 ("USB: add USB test and measurement class driver")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "usbtmc: convert to devm_kzalloc"</title>
<updated>2016-09-28T09:51:30Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2016-09-28T09:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab21b63e8aedfc73565dd9cdd51eb338341177cb'/>
<id>urn:sha1:ab21b63e8aedfc73565dd9cdd51eb338341177cb</id>
<content type='text'>
This reverts commit e6c7efdcb76f11b04e3d3f71c8d764ab75c9423b.

Turns out it was totally wrong.  The memory is supposed to be bound to
the kref, as the original code was doing correctly, not the
device/driver binding as the devm_kzalloc() would cause.

This fixes an oops when read would be called after the device was
unbound from the driver.

Reported-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;  # 3.12+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: class: usbtmc: don't print on ENOMEM</title>
<updated>2016-08-30T17:17:36Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2016-08-25T17:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6b6f8a09f60e668de013eadc8d2a3d52bf36795'/>
<id>urn:sha1:f6b6f8a09f60e668de013eadc8d2a3d52bf36795</id>
<content type='text'>
All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang &lt;wsa-dev@sang-engineering.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: class: usbtmc: don't print error when allocating urb fails</title>
<updated>2016-08-15T13:54:25Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2016-08-11T21:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3014d33f58651b05cf5d24598ce7048bb202bee'/>
<id>urn:sha1:c3014d33f58651b05cf5d24598ce7048bb202bee</id>
<content type='text'>
kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang &lt;wsa-dev@sang-engineering.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Fix disconnect/poll interaction</title>
<updated>2016-02-21T04:21:53Z</updated>
<author>
<name>Dave Penkler</name>
</author>
<published>2016-02-18T09:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9cfabcecd0c46617d0f56388cb2f4bd90f4d5ca'/>
<id>urn:sha1:f9cfabcecd0c46617d0f56388cb2f4bd90f4d5ca</id>
<content type='text'>
When the device is disconnected poll waiters were not being woken.

Changes for v2:
  - add commit summary
  - add Fixes and Reported-by tags

Fixes: eb6b92ecc0f9 ("Add support for receiving USBTMC USB488 SRQ notifications via poll/select")
Reported-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Add ioctls to enable and disable local controls on an instrument</title>
<updated>2016-02-03T21:54:06Z</updated>
<author>
<name>Dave Penkler</name>
</author>
<published>2016-01-27T18:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=379d3d33c83b667b0edad0110693567306463882'/>
<id>urn:sha1:379d3d33c83b667b0edad0110693567306463882</id>
<content type='text'>
These ioctls provide support for the USBTMC-USB488 control requests
for REN_CONTROL, GO_TO_LOCAL and LOCAL_LOCKOUT

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Add ioctl to retrieve USBTMC-USB488 capabilities</title>
<updated>2016-02-03T21:54:06Z</updated>
<author>
<name>Dave Penkler</name>
</author>
<published>2016-01-27T18:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29779d89fd049bfc6c07f19aaf9b8d19fe2ecc8c'/>
<id>urn:sha1:29779d89fd049bfc6c07f19aaf9b8d19fe2ecc8c</id>
<content type='text'>
This is a convenience function to obtain an instrument's
capabilities from its file descriptor without having to access sysfs
from the user program.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Add support for receiving USBTMC USB488 SRQ notifications via poll/select</title>
<updated>2016-02-03T21:54:06Z</updated>
<author>
<name>Dave Penkler</name>
</author>
<published>2016-01-27T18:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb6b92ecc0f9412623ab1584ddd8389b371638d4'/>
<id>urn:sha1:eb6b92ecc0f9412623ab1584ddd8389b371638d4</id>
<content type='text'>
Background:
In many situations operations on multiple instruments need to be
synchronized. poll/select provide a convenient way of waiting on a
number of different instruments and other peripherals
simultaneously.

Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
