<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/gadget/function/u_serial.c, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-12-11T10:36:50+00:00</updated>
<entry>
<title>usb: gadget: u_serial: Use kfifo instead of homemade circular buffer</title>
<updated>2017-12-11T10:36:50+00:00</updated>
<author>
<name>Lu Baolu</name>
<email>baolu.lu@linux.intel.com</email>
</author>
<published>2017-11-28T04:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a622ee9972aa42d4dbce3c62df8b19b2ba23d5c1'/>
<id>urn:sha1:a622ee9972aa42d4dbce3c62df8b19b2ba23d5c1</id>
<content type='text'>
The kernel FIFO implementation, kfifo, provides interfaces to manipulate
a first-in-first-out circular buffer.  Use kfifo instead of the homemade
one to make the code more concise and readable.

Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>USB: gadget: function: Remove redundant license text</title>
<updated>2017-11-07T14:45:02+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-06T14:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24ceb9c669bc18c7de3ae38863ffed8b68ceae9b'/>
<id>urn:sha1:24ceb9c669bc18c7de3ae38863ffed8b68ceae9b</id>
<content type='text'>
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner.  So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Jerry Zhang &lt;zhangjerry@google.com&gt;
Cc: John Keeping &lt;john@metanate.com&gt;
Cc: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Cc: Abdulhadi Mohamed &lt;abdulahhadi2@gmail.com&gt;
Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Cc: Janusz Dziedzic &lt;januszx.dziedzic@linux.intel.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Vincent Pelletier &lt;plr.vincent@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: add SPDX identifiers to all remaining files in drivers/usb/</title>
<updated>2017-11-04T10:48:02+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-03T10:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460'/>
<id>urn:sha1:5fd54ace4721fc5ce2bb5aef6318fcf17f421460</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: serial: mark expected switch fall-through</title>
<updated>2017-10-24T09:31:24+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2017-10-24T03:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdb5e4fa1aedb91d900cd7719a0bfb92b4122c53'/>
<id>urn:sha1:fdb5e4fa1aedb91d900cd7719a0bfb92b4122c53</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1350962
Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: serial: fix oops when data rx'd after close</title>
<updated>2017-08-18T09:28:50+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2017-08-16T20:30:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=daa35bd95634a2a2d72d1049c93576a02711cb1a'/>
<id>urn:sha1:daa35bd95634a2a2d72d1049c93576a02711cb1a</id>
<content type='text'>
When the gadget serial device has no associated TTY, do not pass any
received data into the TTY layer for processing; simply drop it instead.
This prevents the TTY layer from calling back into the gadget serial
driver, which will then crash in e.g. gs_write_room() due to lack of
gadget serial device to TTY association (i.e. a NULL pointer dereference).

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: gserial: check if console kthread exists</title>
<updated>2017-05-16T11:11:04+00:00</updated>
<author>
<name>Bogdan Mirea</name>
<email>Bogdan-Stefan_mirea@mentor.com</email>
</author>
<published>2017-04-30T10:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=844cf8a9d51f1d1e116d0bb18c353a2a94c70e79'/>
<id>urn:sha1:844cf8a9d51f1d1e116d0bb18c353a2a94c70e79</id>
<content type='text'>
Check for bad pointer that may result because of kthread_create failure.
This check is needed since the gserial setup callback function
(gs_console_setup()) is only freeing the info-&gt;con_buf in case of
kthread_create failure which will result into bad info-&gt;console_thread
pointer.
Without checking info-&gt;console_thread pointer validity in the
gserial_console_exit() function, before calling kthread_stop(), the
rmmod will generate Kernel Oops.

Signed-off-by: Bogdan Mirea &lt;Bogdan-Stefan_mirea@mentor.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: serial: fix possible Oops caused by calling kthread_stop(NULL)</title>
<updated>2016-11-18T11:55:19+00:00</updated>
<author>
<name>Felix Hädicke</name>
<email>felixhaedicke@web.de</email>
</author>
<published>2016-11-17T18:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5c024f3761dbd512329d3b7234a07dcf7580f0a'/>
<id>urn:sha1:d5c024f3761dbd512329d3b7234a07dcf7580f0a</id>
<content type='text'>
Add check for NULL before calling kthread_stop().

There were cases in which gserial_console_exit() was called, but the
console thread was not started. This resulted in an invalid
kthread_stop(NULL) call.

Without this, the following Oops may occur:

    BUG: unable to handle kernel
    NULL pointer dereference at 0000000000000018
    IP: [&lt;ffffffffb3ca1166&gt;] kthread_stop+0x16/0x110
    ...
    CPU: 2 PID: 853 Comm: rmmod Not tainted 4.9.0-rc5 #3
    Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z77 Extreme3, BIOS P1.50 07/11/2013
    task: ffff880419f6a100 task.stack: ffffc90002e8c000
    RIP: 0010:[&lt;ffffffffb3ca1166&gt;]  [&lt;ffffffffb3ca1166&gt;] kthread_stop+0x16/0x110
    RSP: 0018:ffffc90002e8fdb0  EFLAGS: 00010286
    RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000000001 RSI: 0000000000000246 RDI: 0000000000000000
    RBP: ffffc90002e8fdc8 R08: 0000000000000000 R09: 0000000000000001
    R10: 000000000000019d R11: 000000000000001f R12: 0000000000000000
    R13: ffff88041b8d8400 R14: 0000000000000001 R15: 000055fd59f5a1e0
    FS:  00007f82500be700(0000) GS:ffff88042f280000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000018 CR3: 000000041bee2000 CR4: 00000000001406e0
    Stack:
     0000000000000000 ffffffffc0b8e720 ffff88041b8d8400 ffffc90002e8fdf0
     ffffffffc0b8bb52 ffff88041a106300 0000000000000001 ffff880419fc2ea8
     ffffc90002e8fe08 ffffffffc0aed749 ffffffffc0aef600 ffffc90002e8fe20
    Call Trace:
     [&lt;ffffffffc0b8bb52&gt;] gserial_free_line+0x72/0xb0 [u_serial]
     [&lt;ffffffffc0aed749&gt;] acm_free_instance+0x19/0x30 [usb_f_acm]
     [&lt;ffffffffc0b01b40&gt;] usb_put_function_instance+0x20/0x30 [libcomposite]
     [&lt;ffffffffc04a603b&gt;] gs_unbind+0x3b/0x70 [g_serial]
     [&lt;ffffffffc0b018d1&gt;] __composite_unbind+0x61/0xb0 [libcomposite]
     [&lt;ffffffffc0b01933&gt;] composite_unbind+0x13/0x20 [libcomposite]
     [&lt;ffffffffc08ef1ad&gt;] usb_gadget_remove_driver+0x3d/0x90 [udc_core]
     [&lt;ffffffffc08ef26e&gt;] usb_gadget_unregister_driver+0x6e/0xc0 [udc_core]
     [&lt;ffffffffc0aff6d2&gt;] usb_composite_unregister+0x12/0x20 [libcomposite]
     [&lt;ffffffffc04a6268&gt;] cleanup+0x10/0xda8 [g_serial]
     [&lt;ffffffffb3d0c0c2&gt;] SyS_delete_module+0x192/0x270
     [&lt;ffffffffb3c032a0&gt;] ? exit_to_usermode_loop+0x90/0xb0
     [&lt;ffffffffb4228a3b&gt;] entry_SYSCALL_64_fastpath+0x1e/0xad
    Code: 89 c6 e8 6e ff ff ff 48 89 df e8 06 bd fd ff 5b 5d c3 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 49 89 fc 53 0f 1f 44 00 00 &lt;f0&gt; 41 ff 44 24 18 4c 89 e7 e8 bc f1 ff ff 48 85 c0 48 89 c3 74
    RIP  [&lt;ffffffffb3ca1166&gt;] kthread_stop+0x16/0x110
     RSP &lt;ffffc90002e8fdb0&gt;
    CR2: 0000000000000018
    ---[ end trace 5b3336a407e1698c ]---

Signed-off-by: Felix Hädicke &lt;felixhaedicke@web.de&gt;
Tested-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: Convert pr_warning to pr_warn</title>
<updated>2016-11-03T08:38:36+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2016-09-27T16:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f5ad8640cd1b5e95a26d9ec500435bd1ce57d72'/>
<id>urn:sha1:3f5ad8640cd1b5e95a26d9ec500435bd1ce57d72</id>
<content type='text'>
Use the more common logging mechanism.

Miscellanea:

o Realign multiline statements
o Coalesce format

Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Add the gserial port checking in gs_start_tx()</title>
<updated>2016-08-22T07:45:13+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2016-06-30T09:10:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=511a36d2f357724312bb3776d2f6eed3890928b2'/>
<id>urn:sha1:511a36d2f357724312bb3776d2f6eed3890928b2</id>
<content type='text'>
When usb gadget is set gadget serial function, it will be crash in below
situation.

It will clean the 'port-&gt;port_usb' pointer in gserial_disconnect() function
when usb link is inactive, but it will release lock for disabling the endpoints
in this function. Druing the lock release period, it maybe complete one request
to issue gs_write_complete()---&gt;gs_start_tx() function, but the 'port-&gt;port_usb'
pointer had been set NULL, thus it will be crash in gs_start_tx() function.

This patch adds the 'port-&gt;port_usb' pointer checking in gs_start_tx() function
to avoid this situation.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: fix unused-but-set-variale warnings</title>
<updated>2016-06-21T08:04:09+00:00</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2016-05-31T12:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=872ce5119524f33fafacc4d9610a431185ea66a2'/>
<id>urn:sha1:872ce5119524f33fafacc4d9610a431185ea66a2</id>
<content type='text'>
Those are enabled with W=1 make option.

The patch leaves of some type-limits warnings which are caused by
generic macros used in a way where they produce always-false
conditions.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
