<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-03-09T23:33:28Z</updated>
<entry>
<title>target: Add TFO-&gt;abort_task for aborted task resources release</title>
<updated>2016-03-09T23:33:28Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2014-03-22T21:55:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17b1c6c856dda6cf21ce8217244623a1bd890d77'/>
<id>urn:sha1:17b1c6c856dda6cf21ce8217244623a1bd890d77</id>
<content type='text'>
commit 131e6abc674edb9f9a59090bb35bf6650569b7e7 upstream.

Now that TASK_ABORTED status is not generated for all cases by
TMR ABORT_TASK + LUN_RESET, a new TFO-&gt;abort_task() caller is
necessary in order to give fabric drivers a chance to unmap
hardware / software resources before the se_cmd descriptor is
released via the normal TFO-&gt;release_cmd() codepath.

This patch adds TFO-&gt;aborted_task() in core_tmr_abort_task()
in place of the original transport_send_task_abort(), and
also updates all fabric drivers to implement this caller.

The fabric drivers that include changes to perform cleanup
via -&gt;aborted_task() are:

  - iscsi-target
  - iser-target
  - srpt
  - tcm_qla2xxx

The fabric drivers that currently set -&gt;aborted_task() to
NOPs are:

  - loopback
  - tcm_fc
  - usb-gadget
  - sbp-target
  - vhost-scsi

For the latter five, there appears to be no additional cleanup
required before invoking TFO-&gt;release_cmd() to release the
se_cmd descriptor.

v2 changes:
  - Move -&gt;aborted_task() call into transport_cmd_finish_abort (Alex)

Cc: Alex Leung &lt;amleung21@yahoo.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Vu Pham &lt;vu@mellanox.com&gt;
Cc: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Giridhar Malavali &lt;giridhar.malavali@qlogic.com&gt;
Cc: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Cc: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: configfs: Fix interfaces array NULL-termination</title>
<updated>2015-06-06T15:19:35Z</updated>
<author>
<name>Krzysztof Opasiak</name>
</author>
<published>2015-03-20T14:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67be82e439923022b91548984c80859b523ae2d8'/>
<id>urn:sha1:67be82e439923022b91548984c80859b523ae2d8</id>
<content type='text'>
commit 903124fe1aa284f61745a9dd4fbfa0184e569fff upstream.

memset() to 0 interfaces array before reusing
usb_configuration structure.

This commit fix bug:

ln -s functions/acm.1 configs/c.1
ln -s functions/acm.2 configs/c.1
ln -s functions/acm.3 configs/c.1
echo "UDC name" &gt; UDC
echo "" &gt; UDC
rm configs/c.1/acm.*
rmdir functions/*
mkdir functions/ecm.usb0
ln -s functions/ecm.usb0 configs/c.1
echo "UDC name" &gt; UDC

[   82.220969] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   82.229009] pgd = c0004000
[   82.231698] [00000000] *pgd=00000000
[   82.235260] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[   82.240638] Modules linked in:
[   82.243681] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-rc2 #39
[   82.249926] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   82.256003] task: c07cd2f0 ti: c07c8000 task.ti: c07c8000
[   82.261393] PC is at composite_setup+0xe3c/0x1674
[   82.266073] LR is at composite_setup+0xf20/0x1674
[   82.270760] pc : [&lt;c03510d4&gt;]    lr : [&lt;c03511b8&gt;]    psr: 600001d3
[   82.270760] sp : c07c9df0  ip : c0806448  fp : ed8c9c9c
[   82.282216] r10: 00000001  r9 : 00000000  r8 : edaae918
[   82.287425] r7 : ed551cc0  r6 : 00007fff  r5 : 00000000  r4 : ed799634
[   82.293934] r3 : 00000003  r2 : 00010002  r1 : edaae918  r0 : 0000002e
[   82.300446] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
[   82.307910] Control: 10c5387d  Table: 6bc1804a  DAC: 00000015
[   82.313638] Process swapper/0 (pid: 0, stack limit = 0xc07c8210)
[   82.319627] Stack: (0xc07c9df0 to 0xc07ca000)
[   82.323969] 9de0:                                     00000000 c06e65f4 00000000 c07c9f68
[   82.332130] 9e00: 00000067 c07c59ac 000003f7 edaae918 ed8c9c98 ed799690 eca2f140 200001d3
[   82.340289] 9e20: ee79a2d8 c07c9e88 c07c5304 ffff55db 00010002 edaae810 edaae860 eda96d50
[   82.348448] 9e40: 00000009 ee264510 00000007 c07ca444 edaae860 c0340890 c0827a40 ffff55e0
[   82.356607] 9e60: c0827a40 eda96e40 ee264510 edaae810 00000000 edaae860 00000007 c07ca444
[   82.364766] 9e80: edaae860 c0354170 c03407dc c033db4c edaae810 00000000 00000000 00000010
[   82.372925] 9ea0: 00000032 c0341670 00000000 00000000 00000001 eda96e00 00000000 00000000
[   82.381084] 9ec0: 00000000 00000032 c0803a23 ee1aa840 00000001 c005d54c 249e2450 00000000
[   82.389244] 9ee0: 200001d3 ee1aa840 ee1aa8a0 ed84f4c0 00000000 c07c9f68 00000067 c07c59ac
[   82.397403] 9f00: 00000000 c005d688 ee1aa840 ee1aa8a0 c07db4b4 c006009c 00000032 00000000
[   82.405562] 9f20: 00000001 c005ce20 c07c59ac c005cf34 f002000c c07ca780 c07c9f68 00000057
[   82.413722] 9f40: f0020000 413fc090 00000001 c00086b4 c000f804 60000053 ffffffff c07c9f9c
[   82.421880] 9f60: c0803a20 c0011fc0 00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
[   82.430040] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
[   82.438199] 9fa0: c000f800 c000f804 60000053 ffffffff 00000000 c0050e70 c0803bc0 c0783bd8
[   82.446358] 9fc0: ffffffff ffffffff c0783664 00000000 00000000 c07b13e8 00000000 c0803e54
[   82.454517] 9fe0: c07ca480 c07b13e4 c07ce40c 4000406a 00000000 40008074 00000000 00000000
[   82.462689] [&lt;c03510d4&gt;] (composite_setup) from [&lt;c0340890&gt;] (s3c_hsotg_complete_setup+0xb4/0x418)
[   82.471626] [&lt;c0340890&gt;] (s3c_hsotg_complete_setup) from [&lt;c0354170&gt;] (usb_gadget_giveback_request+0xc/0x10)
[   82.481429] [&lt;c0354170&gt;] (usb_gadget_giveback_request) from [&lt;c033db4c&gt;] (s3c_hsotg_complete_request+0xcc/0x12c)
[   82.491583] [&lt;c033db4c&gt;] (s3c_hsotg_complete_request) from [&lt;c0341670&gt;] (s3c_hsotg_irq+0x4fc/0x558)
[   82.500614] [&lt;c0341670&gt;] (s3c_hsotg_irq) from [&lt;c005d54c&gt;] (handle_irq_event_percpu+0x50/0x150)
[   82.509291] [&lt;c005d54c&gt;] (handle_irq_event_percpu) from [&lt;c005d688&gt;] (handle_irq_event+0x3c/0x5c)
[   82.518145] [&lt;c005d688&gt;] (handle_irq_event) from [&lt;c006009c&gt;] (handle_fasteoi_irq+0xd4/0x18c)
[   82.526650] [&lt;c006009c&gt;] (handle_fasteoi_irq) from [&lt;c005ce20&gt;] (generic_handle_irq+0x20/0x30)
[   82.535242] [&lt;c005ce20&gt;] (generic_handle_irq) from [&lt;c005cf34&gt;] (__handle_domain_irq+0x6c/0xdc)
[   82.543923] [&lt;c005cf34&gt;] (__handle_domain_irq) from [&lt;c00086b4&gt;] (gic_handle_irq+0x2c/0x6c)
[   82.552256] [&lt;c00086b4&gt;] (gic_handle_irq) from [&lt;c0011fc0&gt;] (__irq_svc+0x40/0x74)
[   82.559716] Exception stack(0xc07c9f68 to 0xc07c9fb0)
[   82.564753] 9f60:                   00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
[   82.572913] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
[   82.581069] 9fa0: c000f800 c000f804 60000053 ffffffff
[   82.586113] [&lt;c0011fc0&gt;] (__irq_svc) from [&lt;c000f804&gt;] (arch_cpu_idle+0x30/0x3c)
[   82.593491] [&lt;c000f804&gt;] (arch_cpu_idle) from [&lt;c0050e70&gt;] (cpu_startup_entry+0x128/0x1a4)
[   82.601740] [&lt;c0050e70&gt;] (cpu_startup_entry) from [&lt;c0783bd8&gt;] (start_kernel+0x350/0x3bc)
[   82.609890] Code: 0a000002 e3530005 05975010 15975008 (e5953000)
[   82.615965] ---[ end trace f57d5f599a5f1bfa ]---

Most of kernel code assume that interface array in
struct usb_configuration is NULL terminated.

When gadget is composed with configfs configuration
structure may be reused for different functions set.

This bug happens because purge_configs_funcs() sets
only next_interface_id to 0. Interface array still
contains pointers to already freed interfaces. If in
second try we add less interfaces than earlier we
may access unallocated memory when trying to get
interface descriptors.

Signed-off-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: printer: enqueue printer's response for setup request</title>
<updated>2015-05-13T12:16:59Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
</author>
<published>2015-03-03T09:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2595c59def5254ac7092dacb24988d4515f4596b'/>
<id>urn:sha1:2595c59def5254ac7092dacb24988d4515f4596b</id>
<content type='text'>
commit eb132ccbdec5df46e29c9814adf76075ce83576b upstream.

Function-specific setup requests should be handled in such a way, that
apart from filling in the data buffer, the requests are also actually
enqueued: if function-specific setup is called from composte_setup(),
the "usb_ep_queue()" block of code in composite_setup() is skipped.

The printer function lacks this part and it results in e.g. get device id
requests failing: the host expects some response, the device prepares it
but does not equeue it for sending to the host, so the host finally asserts
timeout.

This patch adds enqueueing the prepared responses.

Fixes: 2e87edf49227: "usb: gadget: make g_printer use composite"
Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
[ported to stable 3.10 and 3.14]
Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: composite: enable BESL support</title>
<updated>2015-05-06T19:59:08Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-30T21:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bd13670f4a6a0f71079cde5e827c0db646d9074'/>
<id>urn:sha1:8bd13670f4a6a0f71079cde5e827c0db646d9074</id>
<content type='text'>
commit a6615937bcd9234e6d6bb817c3701fce44d0a84d upstream.

According to USB 2.0 ECN Errata for Link Power
Management (USB2-LPM-Errata-final.pdf), BESL
must be enabled if LPM is enabled.

This helps with USB30CV TD 9.21 LPM L1
Suspend Resume Test.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Du, Changbin &lt;changbin.du@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: f_fs: remove redundant ffs_data_get()</title>
<updated>2014-11-14T17:00:11Z</updated>
<author>
<name>Robert Baldyga</name>
</author>
<published>2014-11-10T15:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ee437c556e18984624a018915ec34defa259423'/>
<id>urn:sha1:3ee437c556e18984624a018915ec34defa259423</id>
<content type='text'>
[ Upstream commit a3058a5d82e296daaca07411c3738a9ddd79f302 ]

During FunctionFS bind, ffs_data_get() function was called twice
(in functionfs_bind() and in ffs_do_functionfs_bind()), while on unbind
ffs_data_put() was called once (in functionfs_unbind() function).
In result refcount never reached value 0, and ffs memory resources has
been never released.

Since ffs_data_get() call in ffs_do_functionfs_bind() is redundant
and not neccessary, we remove it to have equal number of gets ans puts,
and free allocated memory after refcount reach 0.

Fixes: 5920cda (usb: gadget: FunctionFS: convert to new function
	interface with backward compatibility)
Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: core: fix kernel oops with soft-connect</title>
<updated>2014-11-14T17:00:11Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-11-10T15:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b699efa9426d3bc72123a713cd53ffb8e97c5f85'/>
<id>urn:sha1:b699efa9426d3bc72123a713cd53ffb8e97c5f85</id>
<content type='text'>
[ Upstream commit bfa6b18c680450c17512c741ed1d818695747621 ]

Currently, there's no guarantee that udc-&gt;driver
will be valid when using soft_connect sysfs
interface. In fact, we can very easily trigger
a NULL pointer dereference by trying to disconnect
when a gadget driver isn't loaded.

Fix this bug:

~# echo disconnect &gt; soft_connect
[   33.685743] Unable to handle kernel NULL pointer dereference at virtual address 00000014
[   33.694221] pgd = ed0cc000
[   33.697174] [00000014] *pgd=ae351831, *pte=00000000, *ppte=00000000
[   33.703766] Internal error: Oops: 17 [#1] SMP ARM
[   33.708697] Modules linked in: xhci_plat_hcd xhci_hcd snd_soc_davinci_mcasp snd_soc_tlv320aic3x snd_soc_edma snd_soc_omap snd_soc_evm snd_soc_core dwc3 snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd lis3lv02d_i2c matrix_keypad lis3lv02d dwc3_omap input_polldev soundcore
[   33.734372] CPU: 0 PID: 1457 Comm: bash Not tainted 3.17.0-09740-ga93416e-dirty #345
[   33.742457] task: ee71ce00 ti: ee68a000 task.ti: ee68a000
[   33.748116] PC is at usb_udc_softconn_store+0xa4/0xec
[   33.753416] LR is at mark_held_locks+0x78/0x90
[   33.758057] pc : [&lt;c04df128&gt;]    lr : [&lt;c00896a4&gt;]    psr: 20000013
[   33.758057] sp : ee68bec8  ip : c0c00008  fp : ee68bee4
[   33.770050] r10: ee6b394c  r9 : ee68bf80  r8 : ee6062c0
[   33.775508] r7 : 00000000  r6 : ee6062c0  r5 : 0000000b  r4 : ee739408
[   33.782346] r3 : 00000000  r2 : 00000000  r1 : ee71d390  r0 : ee664170
[   33.789168] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   33.796636] Control: 10c5387d  Table: ad0cc059  DAC: 00000015
[   33.802638] Process bash (pid: 1457, stack limit = 0xee68a248)
[   33.808740] Stack: (0xee68bec8 to 0xee68c000)
[   33.813299] bec0:                   0000000b c0411284 ee6062c0 00000000 ee68bef4 ee68bee8
[   33.821862] bee0: c04112ac c04df090 ee68bf14 ee68bef8 c01c2868 c0411290 0000000b ee6b3940
[   33.830419] bf00: 00000000 00000000 ee68bf4c ee68bf18 c01c1a24 c01c2818 00000000 00000000
[   33.838990] bf20: ee61b940 ee2f47c0 0000000b 000ce408 ee68bf80 c000f304 ee68a000 00000000
[   33.847544] bf40: ee68bf7c ee68bf50 c0152dd8 c01c1960 ee68bf7c c0170af8 ee68bf7c ee2f47c0
[   33.856099] bf60: ee2f47c0 000ce408 0000000b c000f304 ee68bfa4 ee68bf80 c0153330 c0152d34
[   33.864653] bf80: 00000000 00000000 0000000b 000ce408 b6e7fb50 00000004 00000000 ee68bfa8
[   33.873204] bfa0: c000f080 c01532e8 0000000b 000ce408 00000001 000ce408 0000000b 00000000
[   33.881763] bfc0: 0000000b 000ce408 b6e7fb50 00000004 0000000b 00000000 000c5758 00000000
[   33.890319] bfe0: 00000000 bec2c924 b6de422d b6e1d226 40000030 00000001 75716d2f 00657565
[   33.898890] [&lt;c04df128&gt;] (usb_udc_softconn_store) from [&lt;c04112ac&gt;] (dev_attr_store+0x28/0x34)
[   33.907920] [&lt;c04112ac&gt;] (dev_attr_store) from [&lt;c01c2868&gt;] (sysfs_kf_write+0x5c/0x60)
[   33.916200] [&lt;c01c2868&gt;] (sysfs_kf_write) from [&lt;c01c1a24&gt;] (kernfs_fop_write+0xd0/0x194)
[   33.924773] [&lt;c01c1a24&gt;] (kernfs_fop_write) from [&lt;c0152dd8&gt;] (vfs_write+0xb0/0x1bc)
[   33.932874] [&lt;c0152dd8&gt;] (vfs_write) from [&lt;c0153330&gt;] (SyS_write+0x54/0xb0)
[   33.940247] [&lt;c0153330&gt;] (SyS_write) from [&lt;c000f080&gt;] (ret_fast_syscall+0x0/0x48)
[   33.948160] Code: e1a01007 e12fff33 e5140004 e5143008 (e5933014)
[   33.954625] ---[ end trace f849bead94eab7ea ]---

Fixes: 2ccea03 (usb: gadget: introduce UDC Class)
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: function: acm: make f_acm pass USB20CV Chapter9</title>
<updated>2014-11-14T17:00:11Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-11-10T14:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e269a499134d115468db1eb870d053123e1af2e7'/>
<id>urn:sha1:e269a499134d115468db1eb870d053123e1af2e7</id>
<content type='text'>
[ Upstream commit 52ec49a5e56a27c5b6f8217708783eff39f24c16 ]

During Halt Endpoint Test, our interrupt endpoint
will be disabled, which will clear out ep-&gt;desc
to NULL. Unless we call config_ep_by_speed() again,
we will not be able to enable this endpoint which
will make us fail that test.

Fixes: f9c56cd (usb: gadget: Clear usb_endpoint_descriptor
	inside the struct usb_ep on disable)
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: pch_udc: usb gadget device support for Intel Quark X1000</title>
<updated>2014-10-30T16:38:19Z</updated>
<author>
<name>Bryan O'Donoghue</name>
</author>
<published>2014-08-04T17:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00ada3c3176a741d55b3be800e8d0cdb4f388826'/>
<id>urn:sha1:00ada3c3176a741d55b3be800e8d0cdb4f388826</id>
<content type='text'>
commit a68df7066a6f974db6069e0b93c498775660a114 upstream.

This patch is to enable the USB gadget device for Intel Quark X1000

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@intel.com&gt;
Signed-off-by: Bing Niu &lt;bing.niu@intel.com&gt;
Signed-off-by: Alvin (Weike) Chen &lt;alvin.chen@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: f_fs: fix NULL pointer dereference when there are no strings</title>
<updated>2014-07-09T18:18:24Z</updated>
<author>
<name>Michal Nazarewicz</name>
</author>
<published>2014-06-17T15:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4d3b27333ded534e1cab26a33b7e4f1163e8ff9'/>
<id>urn:sha1:d4d3b27333ded534e1cab26a33b7e4f1163e8ff9</id>
<content type='text'>
commit f0688c8b81d2ea239c3fb0b848f623b579238d99 upstream.

If the descriptors do not need any strings and user space sends empty
set of strings, the ffs-&gt;stringtabs field remains NULL.  Thus
*ffs-&gt;stringtabs in functionfs_bind leads to a NULL pointer
dereferenece.

The bug was introduced by commit [fd7c9a007f: “use usb_string_ids_n()”].

While at it, remove double initialisation of lang local variable in
that function.

ffs-&gt;strings_count does not need to be checked in any way since in
the above scenario it will remain zero and usb_string_ids_n() is
a no-operation when colled with 0 argument.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: rename CONFIG_USB_GADGET_PXA25X</title>
<updated>2014-07-01T03:11:52Z</updated>
<author>
<name>Paul Bolle</name>
</author>
<published>2014-05-26T21:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e739000204f883d8708d2855d57a051c9da66db'/>
<id>urn:sha1:2e739000204f883d8708d2855d57a051c9da66db</id>
<content type='text'>
commit d30f2065d6da377cc76771aca5a9850cfca8723b upstream.

Commit 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built")
basically renamed the Kconfig symbol USB_GADGET_PXA25X to USB_PXA25X. It
did not rename the related macros in use at that time. Commit
c0a39151a405 ("ARM: pxa: fix inconsistent CONFIG_USB_PXA27X") did so for
all but one macro. Rename that last macro too now.

Fixes: 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built")
Signed-off-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
