<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/gadget/function, branch v5.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>usb: gadget: uvc: fix changing interface name via configfs</title>
<updated>2022-07-08T12:58:25+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-07-07T11:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3d0dc539029b09fbd125444c16b11a8ed10b9d0f'/>
<id>3d0dc539029b09fbd125444c16b11a8ed10b9d0f</id>
<content type='text'>
When setting the function name, it is always truncated by one char since
snprintf is always including the null-termination in the len parameter.
We use strscpy and fix the size setting to use len + 1 instead.

Fixes: 324e4f85070f ("usb: gadget: uvc: allow changing interface name via configfs")
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20220707115612.2760569-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting the function name, it is always truncated by one char since
snprintf is always including the null-termination in the len parameter.
We use strscpy and fix the size setting to use len + 1 instead.

Fixes: 324e4f85070f ("usb: gadget: uvc: allow changing interface name via configfs")
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20220707115612.2760569-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: fix list double add in uvcg_video_pump</title>
<updated>2022-06-21T14:27:26+00:00</updated>
<author>
<name>Dan Vacura</name>
<email>w36195@motorola.com</email>
</author>
<published>2022-06-17T16:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=96163f835e65f8c9897487fac965819f0651d671'/>
<id>96163f835e65f8c9897487fac965819f0651d671</id>
<content type='text'>
A panic can occur if the endpoint becomes disabled and the
uvcg_video_pump adds the request back to the req_free list after it has
already been queued to the endpoint. The endpoint complete will add the
request back to the req_free list. Invalidate the local request handle
once it's been queued.

&lt;6&gt;[  246.796704][T13726] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
&lt;3&gt;[  246.797078][   T26] list_add double add: new=ffffff878bee5c40, prev=ffffff878bee5c40, next=ffffff878b0f0a90.
&lt;6&gt;[  246.797213][   T26] ------------[ cut here ]------------
&lt;2&gt;[  246.797224][   T26] kernel BUG at lib/list_debug.c:31!
&lt;6&gt;[  246.807073][   T26] Call trace:
&lt;6&gt;[  246.807180][   T26]  uvcg_video_pump+0x364/0x38c
&lt;6&gt;[  246.807366][   T26]  process_one_work+0x2a4/0x544
&lt;6&gt;[  246.807394][   T26]  worker_thread+0x350/0x784
&lt;6&gt;[  246.807442][   T26]  kthread+0x2ac/0x320

Fixes: f9897ec0f6d3 ("usb: gadget: uvc: only pump video data if necessary")
Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Dan Vacura &lt;w36195@motorola.com&gt;
Link: https://lore.kernel.org/r/20220617163154.16621-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A panic can occur if the endpoint becomes disabled and the
uvcg_video_pump adds the request back to the req_free list after it has
already been queued to the endpoint. The endpoint complete will add the
request back to the req_free list. Invalidate the local request handle
once it's been queued.

&lt;6&gt;[  246.796704][T13726] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
&lt;3&gt;[  246.797078][   T26] list_add double add: new=ffffff878bee5c40, prev=ffffff878bee5c40, next=ffffff878b0f0a90.
&lt;6&gt;[  246.797213][   T26] ------------[ cut here ]------------
&lt;2&gt;[  246.797224][   T26] kernel BUG at lib/list_debug.c:31!
&lt;6&gt;[  246.807073][   T26] Call trace:
&lt;6&gt;[  246.807180][   T26]  uvcg_video_pump+0x364/0x38c
&lt;6&gt;[  246.807366][   T26]  process_one_work+0x2a4/0x544
&lt;6&gt;[  246.807394][   T26]  worker_thread+0x350/0x784
&lt;6&gt;[  246.807442][   T26]  kthread+0x2ac/0x320

Fixes: f9897ec0f6d3 ("usb: gadget: uvc: only pump video data if necessary")
Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Dan Vacura &lt;w36195@motorola.com&gt;
Link: https://lore.kernel.org/r/20220617163154.16621-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: f_fs: change ep-&gt;ep safe in ffs_epfile_io()</title>
<updated>2022-06-10T12:45:38+00:00</updated>
<author>
<name>Linyu Yuan</name>
<email>quic_linyyuan@quicinc.com</email>
</author>
<published>2022-06-10T12:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0698f0209d8032e8869525aeb68f65ee7fde12ad'/>
<id>0698f0209d8032e8869525aeb68f65ee7fde12ad</id>
<content type='text'>
In ffs_epfile_io(), when read/write data in blocking mode, it will wait
the completion in interruptible mode, if task receive a signal, it will
terminate the wait, at same time, if function unbind occurs,
ffs_func_unbind() will kfree all eps, ffs_epfile_io() still try to
dequeue request by dereferencing ep which may become invalid.

Fix it by add ep spinlock and will not dereference ep if it is not valid.

Cc: &lt;stable@vger.kernel.org&gt; # 5.15
Reported-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Tested-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Reviewed-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Linyu Yuan &lt;quic_linyyuan@quicinc.com&gt;
Link: https://lore.kernel.org/r/1654863478-26228-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In ffs_epfile_io(), when read/write data in blocking mode, it will wait
the completion in interruptible mode, if task receive a signal, it will
terminate the wait, at same time, if function unbind occurs,
ffs_func_unbind() will kfree all eps, ffs_epfile_io() still try to
dequeue request by dereferencing ep which may become invalid.

Fix it by add ep spinlock and will not dereference ep if it is not valid.

Cc: &lt;stable@vger.kernel.org&gt; # 5.15
Reported-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Tested-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Reviewed-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Linyu Yuan &lt;quic_linyyuan@quicinc.com&gt;
Link: https://lore.kernel.org/r/1654863478-26228-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: f_fs: change ep-&gt;status safe in ffs_epfile_io()</title>
<updated>2022-06-10T12:45:38+00:00</updated>
<author>
<name>Linyu Yuan</name>
<email>quic_linyyuan@quicinc.com</email>
</author>
<published>2022-06-10T12:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fb1f16d74e263baa4ad11e31e28b68f144aa55ed'/>
<id>fb1f16d74e263baa4ad11e31e28b68f144aa55ed</id>
<content type='text'>
If a task read/write data in blocking mode, it will wait the completion
in ffs_epfile_io(), if function unbind occurs, ffs_func_unbind() will
kfree ffs ep, once the task wake up, it still dereference the ffs ep to
obtain the request status.

Fix it by moving the request status to io_data which is stack-safe.

Cc: &lt;stable@vger.kernel.org&gt; # 5.15
Reported-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Tested-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Reviewed-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Linyu Yuan &lt;quic_linyyuan@quicinc.com&gt;
Link: https://lore.kernel.org/r/1654863478-26228-2-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a task read/write data in blocking mode, it will wait the completion
in ffs_epfile_io(), if function unbind occurs, ffs_func_unbind() will
kfree ffs ep, once the task wake up, it still dereference the ffs ep to
obtain the request status.

Fix it by moving the request status to io_data which is stack-safe.

Cc: &lt;stable@vger.kernel.org&gt; # 5.15
Reported-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Tested-by: Michael Wu &lt;michael@allwinnertech.com&gt;
Reviewed-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Linyu Yuan &lt;quic_linyyuan@quicinc.com&gt;
Link: https://lore.kernel.org/r/1654863478-26228-2-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: u_ether: fix regression in setting fixed MAC address</title>
<updated>2022-06-10T09:12:53+00:00</updated>
<author>
<name>Marian Postevca</name>
<email>posteuca@mutex.one</email>
</author>
<published>2022-06-03T15:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b337af3a4d6147000b7ca6b3438bf5c820849b37'/>
<id>b337af3a4d6147000b7ca6b3438bf5c820849b37</id>
<content type='text'>
In systemd systems setting a fixed MAC address through
the "dev_addr" module argument fails systematically.
When checking the MAC address after the interface is created
it always has the same but different MAC address to the one
supplied as argument.

This is partially caused by systemd which by default will
set an internally generated permanent MAC address for interfaces
that are marked as having a randomly generated address.

Commit 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in
setting MAC address in setup phase") didn't take into account
the fact that the interface must be marked as having a set
MAC address when it's set as module argument.

Fixed by marking the interface with NET_ADDR_SET when
the "dev_addr" module argument is supplied.

Fixes: 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in setting MAC address in setup phase")
Cc: stable@vger.kernel.org
Signed-off-by: Marian Postevca &lt;posteuca@mutex.one&gt;
Link: https://lore.kernel.org/r/20220603153459.32722-1-posteuca@mutex.one
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In systemd systems setting a fixed MAC address through
the "dev_addr" module argument fails systematically.
When checking the MAC address after the interface is created
it always has the same but different MAC address to the one
supplied as argument.

This is partially caused by systemd which by default will
set an internally generated permanent MAC address for interfaces
that are marked as having a randomly generated address.

Commit 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in
setting MAC address in setup phase") didn't take into account
the fact that the interface must be marked as having a set
MAC address when it's set as module argument.

Fixed by marking the interface with NET_ADDR_SET when
the "dev_addr" module argument is supplied.

Fixes: 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in setting MAC address in setup phase")
Cc: stable@vger.kernel.org
Signed-off-by: Marian Postevca &lt;posteuca@mutex.one&gt;
Link: https://lore.kernel.org/r/20220603153459.32722-1-posteuca@mutex.one
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2022-06-03T18:17:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-06-03T18:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=54c2cc79194c961a213c1d375fe3aa4165664cc4'/>
<id>54c2cc79194c961a213c1d375fe3aa4165664cc4</id>
<content type='text'>
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the "big" set of USB and Thunderbolt driver changes for
  5.18-rc1. For the most part it's been a quiet development cycle for
  the USB core, but there are the usual "hot spots" of development
  activity.

  Included in here are:

   - Thunderbolt driver updates:
       - fixes for devices without displayport adapters
       - lane bonding support and improvements
       - other minor changes based on device testing

   - dwc3 gadget driver changes.

     It seems this driver will never be finished given that the IP core
     is showing up in zillions of new devices and each implementation
     decides to do something different with it...

   - uvc gadget driver updates as more devices start to use and rely on
     this hardware as well

   - usb_maxpacket() api changes to remove an unneeded and unused
     parameter.

   - usb-serial driver device id updates and small cleanups

   - typec cleanups and fixes based on device testing

   - device tree updates for usb properties

   - lots of other small fixes and driver updates.

  All of these have been in linux-next for weeks with no reported
  problems"

* tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
  USB: new quirk for Dell Gen 2 devices
  usb: dwc3: core: Add error log when core soft reset failed
  usb: dwc3: gadget: Move null pinter check to proper place
  usb: hub: Simplify error and success path in port_over_current_notify
  usb: cdns3: allocate TX FIFO size according to composite EP number
  usb: dwc3: Fix ep0 handling when getting reset while doing control transfer
  usb: Probe EHCI, OHCI controllers asynchronously
  usb: isp1760: Fix out-of-bounds array access
  xhci: Don't defer primary roothub registration if there is only one roothub
  USB: serial: option: add Quectel BG95 modem
  USB: serial: pl2303: fix type detection for odd device
  xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
  xhci: Remove quirk for over 10 year old evaluation hardware
  xhci: prevent U2 link power state if Intel tier policy prevented U1
  xhci: use generic command timer for stop endpoint commands.
  usb: host: xhci-plat: omit shared hcd if either root hub has no ports
  usb: host: xhci-plat: prepare operation w/o shared hcd
  usb: host: xhci-plat: create shared hcd after having added main hcd
  xhci: prepare for operation w/o shared hcd
  xhci: factor out parts of xhci_gen_setup()
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the "big" set of USB and Thunderbolt driver changes for
  5.18-rc1. For the most part it's been a quiet development cycle for
  the USB core, but there are the usual "hot spots" of development
  activity.

  Included in here are:

   - Thunderbolt driver updates:
       - fixes for devices without displayport adapters
       - lane bonding support and improvements
       - other minor changes based on device testing

   - dwc3 gadget driver changes.

     It seems this driver will never be finished given that the IP core
     is showing up in zillions of new devices and each implementation
     decides to do something different with it...

   - uvc gadget driver updates as more devices start to use and rely on
     this hardware as well

   - usb_maxpacket() api changes to remove an unneeded and unused
     parameter.

   - usb-serial driver device id updates and small cleanups

   - typec cleanups and fixes based on device testing

   - device tree updates for usb properties

   - lots of other small fixes and driver updates.

  All of these have been in linux-next for weeks with no reported
  problems"

* tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
  USB: new quirk for Dell Gen 2 devices
  usb: dwc3: core: Add error log when core soft reset failed
  usb: dwc3: gadget: Move null pinter check to proper place
  usb: hub: Simplify error and success path in port_over_current_notify
  usb: cdns3: allocate TX FIFO size according to composite EP number
  usb: dwc3: Fix ep0 handling when getting reset while doing control transfer
  usb: Probe EHCI, OHCI controllers asynchronously
  usb: isp1760: Fix out-of-bounds array access
  xhci: Don't defer primary roothub registration if there is only one roothub
  USB: serial: option: add Quectel BG95 modem
  USB: serial: pl2303: fix type detection for odd device
  xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
  xhci: Remove quirk for over 10 year old evaluation hardware
  xhci: prevent U2 link power state if Intel tier policy prevented U1
  xhci: use generic command timer for stop endpoint commands.
  usb: host: xhci-plat: omit shared hcd if either root hub has no ports
  usb: host: xhci-plat: prepare operation w/o shared hcd
  usb: host: xhci-plat: create shared hcd after having added main hcd
  xhci: prepare for operation w/o shared hcd
  xhci: factor out parts of xhci_gen_setup()
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: allow for application to cleanly shutdown</title>
<updated>2022-05-05T20:17:43+00:00</updated>
<author>
<name>Dan Vacura</name>
<email>w36195@motorola.com</email>
</author>
<published>2022-05-03T20:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b81ac4395bbeaf36e078dea1a48c02dd97b76235'/>
<id>b81ac4395bbeaf36e078dea1a48c02dd97b76235</id>
<content type='text'>
Several types of kernel panics can occur due to timing during the uvc
gadget removal. This appears to be a problem with gadget resources being
managed by both the client application's v4l2 open/close and the UDC
gadget bind/unbind. Since the concept of USB_GADGET_DELAYED_STATUS
doesn't exist for unbind, add a wait to allow for the application to
close out.

Some examples of the panics that can occur are:

&lt;1&gt;[ 1147.652313] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000028
&lt;4&gt;[ 1147.652510] Call trace:
&lt;4&gt;[ 1147.652514]  usb_gadget_disconnect+0x74/0x1f0
&lt;4&gt;[ 1147.652516]  usb_gadget_deactivate+0x38/0x168
&lt;4&gt;[ 1147.652520]  usb_function_deactivate+0x54/0x90
&lt;4&gt;[ 1147.652524]  uvc_function_disconnect+0x14/0x38
&lt;4&gt;[ 1147.652527]  uvc_v4l2_release+0x34/0xa0
&lt;4&gt;[ 1147.652537]  __fput+0xdc/0x2c0
&lt;4&gt;[ 1147.652540]  ____fput+0x10/0x1c
&lt;4&gt;[ 1147.652545]  task_work_run+0xe4/0x12c
&lt;4&gt;[ 1147.652549]  do_notify_resume+0x108/0x168

&lt;1&gt;[  282.950561][ T1472] Unable to handle kernel NULL pointer
dereference at virtual address 00000000000005b8
&lt;6&gt;[  282.953111][ T1472] Call trace:
&lt;6&gt;[  282.953121][ T1472]  usb_function_deactivate+0x54/0xd4
&lt;6&gt;[  282.953134][ T1472]  uvc_v4l2_release+0xac/0x1e4
&lt;6&gt;[  282.953145][ T1472]  v4l2_release+0x134/0x1f0
&lt;6&gt;[  282.953167][ T1472]  __fput+0xf4/0x428
&lt;6&gt;[  282.953178][ T1472]  ____fput+0x14/0x24
&lt;6&gt;[  282.953193][ T1472]  task_work_run+0xac/0x130

&lt;3&gt;[  213.410077][   T29] configfs-gadget gadget: uvc: Failed to queue
request (-108).
&lt;1&gt;[  213.410116][   T29] Unable to handle kernel NULL pointer
dereference at virtual address 0000000000000003
&lt;6&gt;[  213.413460][   T29] Call trace:
&lt;6&gt;[  213.413474][   T29]  uvcg_video_pump+0x1f0/0x384
&lt;6&gt;[  213.413489][   T29]  process_one_work+0x2a4/0x544
&lt;6&gt;[  213.413502][   T29]  worker_thread+0x350/0x784
&lt;6&gt;[  213.413515][   T29]  kthread+0x2ac/0x320
&lt;6&gt;[  213.413528][   T29]  ret_from_fork+0x10/0x30

Signed-off-by: Dan Vacura &lt;w36195@motorola.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220503201039.71720-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several types of kernel panics can occur due to timing during the uvc
gadget removal. This appears to be a problem with gadget resources being
managed by both the client application's v4l2 open/close and the UDC
gadget bind/unbind. Since the concept of USB_GADGET_DELAYED_STATUS
doesn't exist for unbind, add a wait to allow for the application to
close out.

Some examples of the panics that can occur are:

&lt;1&gt;[ 1147.652313] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000028
&lt;4&gt;[ 1147.652510] Call trace:
&lt;4&gt;[ 1147.652514]  usb_gadget_disconnect+0x74/0x1f0
&lt;4&gt;[ 1147.652516]  usb_gadget_deactivate+0x38/0x168
&lt;4&gt;[ 1147.652520]  usb_function_deactivate+0x54/0x90
&lt;4&gt;[ 1147.652524]  uvc_function_disconnect+0x14/0x38
&lt;4&gt;[ 1147.652527]  uvc_v4l2_release+0x34/0xa0
&lt;4&gt;[ 1147.652537]  __fput+0xdc/0x2c0
&lt;4&gt;[ 1147.652540]  ____fput+0x10/0x1c
&lt;4&gt;[ 1147.652545]  task_work_run+0xe4/0x12c
&lt;4&gt;[ 1147.652549]  do_notify_resume+0x108/0x168

&lt;1&gt;[  282.950561][ T1472] Unable to handle kernel NULL pointer
dereference at virtual address 00000000000005b8
&lt;6&gt;[  282.953111][ T1472] Call trace:
&lt;6&gt;[  282.953121][ T1472]  usb_function_deactivate+0x54/0xd4
&lt;6&gt;[  282.953134][ T1472]  uvc_v4l2_release+0xac/0x1e4
&lt;6&gt;[  282.953145][ T1472]  v4l2_release+0x134/0x1f0
&lt;6&gt;[  282.953167][ T1472]  __fput+0xf4/0x428
&lt;6&gt;[  282.953178][ T1472]  ____fput+0x14/0x24
&lt;6&gt;[  282.953193][ T1472]  task_work_run+0xac/0x130

&lt;3&gt;[  213.410077][   T29] configfs-gadget gadget: uvc: Failed to queue
request (-108).
&lt;1&gt;[  213.410116][   T29] Unable to handle kernel NULL pointer
dereference at virtual address 0000000000000003
&lt;6&gt;[  213.413460][   T29] Call trace:
&lt;6&gt;[  213.413474][   T29]  uvcg_video_pump+0x1f0/0x384
&lt;6&gt;[  213.413489][   T29]  process_one_work+0x2a4/0x544
&lt;6&gt;[  213.413502][   T29]  worker_thread+0x350/0x784
&lt;6&gt;[  213.413515][   T29]  kthread+0x2ac/0x320
&lt;6&gt;[  213.413528][   T29]  ret_from_fork+0x10/0x30

Signed-off-by: Dan Vacura &lt;w36195@motorola.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220503201039.71720-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: track frames in format entries</title>
<updated>2022-05-05T20:10:36+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-04-21T21:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a2673d570bd648851e00ac531bdf695f4ebb4f78'/>
<id>a2673d570bd648851e00ac531bdf695f4ebb4f78</id>
<content type='text'>
Just like the header is tracking the formats in a linked list, in this
patch we track the frames in a linked list of the formats. It
simplifies the parsing of the configfs structure.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-6-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just like the header is tracking the formats in a linked list, in this
patch we track the frames in a linked list of the formats. It
simplifies the parsing of the configfs structure.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-6-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: move structs to common header</title>
<updated>2022-05-05T20:09:30+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-04-21T21:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e2fa7b36de90de26da11b7f37fe0ce16935ab8a8'/>
<id>e2fa7b36de90de26da11b7f37fe0ce16935ab8a8</id>
<content type='text'>
The functions and structs of the configfs interface should also be used
by the uvc gadget driver. This patch prepares the stack by moving the
common structs and functions to the common header file.

Reviewed-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-5-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions and structs of the configfs interface should also be used
by the uvc gadget driver. This patch prepares the stack by moving the
common structs and functions to the common header file.

Reviewed-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-5-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: prevent index variables to start from 0</title>
<updated>2022-05-05T20:08:09+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-04-21T21:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a350cfb6537f94be8a6423bc68a7a7883263c306'/>
<id>a350cfb6537f94be8a6423bc68a7a7883263c306</id>
<content type='text'>
Some configfs variables like bDefaultFrameIndex are always starting by
1. This patch adds a check to prevent setting those variables to 0.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some configfs variables like bDefaultFrameIndex are always starting by
1. This patch adds a check to prevent setting those variables to 0.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

Link: https://lore.kernel.org/r/20220421211427.3400834-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
