<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/serial/ipw.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-26T13:28:25+00:00</updated>
<entry>
<title>USB: serial: drop driver owner initialization</title>
<updated>2024-08-26T13:28:25+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-05-03T10:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d243588e95ec221e533cc749106aaefaea27486'/>
<id>urn:sha1:6d243588e95ec221e533cc749106aaefaea27486</id>
<content type='text'>
Core in usb_serial_register_drivers() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: Remove redundant license text</title>
<updated>2017-11-04T10:55:38+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-03T11:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ca98bc2843e0bc4c2745ff6be7d46694c1398d1'/>
<id>urn:sha1:6ca98bc2843e0bc4c2745ff6be7d46694c1398d1</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.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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: 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: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-08T23:01:39+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-08T16:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=803a536243b3a1ed2289f41897b11b72bd083309'/>
<id>urn:sha1:803a536243b3a1ed2289f41897b11b72bd083309</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: remove driver version information</title>
<updated>2012-10-31T19:48:06+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-10-31T10:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcbec053d2197031d04b8e040c61695b5d7a949d'/>
<id>urn:sha1:bcbec053d2197031d04b8e040c61695b5d7a949d</id>
<content type='text'>
Remove all MODULE_VERSION macros and driver-version information (except
for garmin_gps which uses it in a status reply).

It is the kernel version that matters and not some private version
scheme which rarely even gets updated.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: ipw: fix interface-data memory leak in error path</title>
<updated>2012-10-25T16:39:37+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-10-25T13:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a997448c89905b80aa4022f734f03685e733d711'/>
<id>urn:sha1:a997448c89905b80aa4022f734f03685e733d711</id>
<content type='text'>
Move interface data allocation to attach so that it is deallocated
should usb-serial probe fail.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usb-wwan: fix multiple memory leaks in error paths</title>
<updated>2012-10-25T16:37:13+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-10-25T08:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8f0e82044c9ba40e92340c8a6d47d6bd6d819bc'/>
<id>urn:sha1:b8f0e82044c9ba40e92340c8a6d47d6bd6d819bc</id>
<content type='text'>
Fix port-data memory leak in usb-serial probe error path by moving port
data allocation to port_probe.

Since commit a1028f0abf ("usb: usb_wwan: replace release and disconnect
with a port_remove hook") port data is deallocated in port_remove. This
leaves a possibility for memory leaks if usb-serial probe fails after
attach but before the port in question has been successfully registered.

Note that this patch also fixes two additional memory leaks in the error
path of attach should port initialisation fail for any port as the urbs
were never freed and neither was the data of any of the successfully
initialised ports.

Compile-only tested.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ipw.c: remove debug module parameter</title>
<updated>2012-09-14T19:31:32+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-09-14T19:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3004d54027d1c440f1e45ec3aa7caba6cca6f1a'/>
<id>urn:sha1:f3004d54027d1c440f1e45ec3aa7caba6cca6f1a</id>
<content type='text'>
Now that the dbg() macro is no longer being used in the driver,
the debug module parameter doesn't do anything at all.  So remove
it so as to not confuse people.

CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
CC: "Bjørn Mork" &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ipw.c: remove dbg() usage</title>
<updated>2012-09-14T00:18:16+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-09-14T00:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=592ba39fab1072d6d37f4118f4b0efa15377ced5'/>
<id>urn:sha1:592ba39fab1072d6d37f4118f4b0efa15377ced5</id>
<content type='text'>
dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
CC: "Bjørn Mork" &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usb_wwan: replace release and disconnect with a port_remove hook</title>
<updated>2012-08-10T18:51:43+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-26T23:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1028f0abfb321e0f87c10ac0cce8508097c2b42'/>
<id>urn:sha1:a1028f0abfb321e0f87c10ac0cce8508097c2b42</id>
<content type='text'>
Doing port specific cleanup in the .port_remove hook is a
lot simpler and safer than doing it in the USB driver
.release or .disconnect methods. The removal of the port
from the usb-serial bus will happen before the USB driver
cleanup, so we must be careful about accessing port specific
driver data from any USB driver functions.

This problem surfaced after the commit

 0998d0631 device-core: Ensure drvdata = NULL when no driver is bound

which turned the previous unsafe access into a reliable NULL
pointer dereference.

Fixes the following Oops:

[  243.148471] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  243.148508] IP: [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.148556] PGD 79d60067 PUD 79d61067 PMD 0
[  243.148590] Oops: 0000 [#1] SMP
[  243.148617] Modules linked in: sr_mod cdrom qmi_wwan usbnet option cdc_wdm usb_wwan usbserial usb_storage uas fuse af_packet ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun edd
cpufreq_conservative cpufreq_userspace cpufreq_powersave snd_pcm_oss snd_mixer_oss acpi_cpufreq snd_seq mperf snd_seq_device coretemp arc4 sg hp_wmi sparse_keymap uvcvideo videobuf2_core
videodev videobuf2_vmalloc videobuf2_memops rtl8192ce rtl8192c_common rtlwifi joydev pcspkr microcode mac80211 i2c_i801 lpc_ich r8169 snd_hda_codec_idt cfg80211 snd_hda_intel snd_hda_codec rfkill
snd_hwdep snd_pcm wmi snd_timer ac snd soundcore snd_page_alloc battery uhci_hcd i915 drm_kms_helper drm i2c_algo_bit ehci_hcd thermal usbcore video usb_common button processor thermal_sys
[  243.149007] CPU 1
[  243.149027] Pid: 135, comm: khubd Not tainted 3.5.0-rc7-next-20120720-1-vanilla #1 Hewlett-Packard HP Mini 110-3700                /1584
[  243.149072] RIP: 0010:[&lt;ffffffffa0468527&gt;]  [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.149118] RSP: 0018:ffff880037e75b30  EFLAGS: 00010286
[  243.149133] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88005912aa28
[  243.149150] RDX: ffff88005e95f028 RSI: 0000000000000000 RDI: ffff88005f7c1a10
[  243.149166] RBP: ffff880037e75b60 R08: 0000000000000000 R09: ffffffff812cea90
[  243.149182] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88006539b440
[  243.149198] R13: ffff88006539b440 R14: 0000000000000000 R15: 0000000000000000
[  243.149216] FS:  0000000000000000(0000) GS:ffff88007ee80000(0000) knlGS:0000000000000000
[  243.149233] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  243.149248] CR2: 0000000000000000 CR3: 0000000079fe0000 CR4: 00000000000007e0
[  243.149264] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  243.149280] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  243.149298] Process khubd (pid: 135, threadinfo ffff880037e74000, task ffff880037d40600)
[  243.149313] Stack:
[  243.149323]  ffff880037e75b40 ffff88006539b440 ffff8800799bc830 ffff88005f7c1800
[  243.149348]  0000000000000001 ffff88006539b448 ffff880037e75b70 ffffffffa04685e9
[  243.149371]  ffff880037e75bc0 ffffffffa0473765 ffff880037354988 ffff88007b594800
[  243.149395] Call Trace:
[  243.149419]  [&lt;ffffffffa04685e9&gt;] usb_wwan_disconnect+0x9/0x10 [usb_wwan]
[  243.149447]  [&lt;ffffffffa0473765&gt;] usb_serial_disconnect+0xd5/0x120 [usbserial]
[  243.149511]  [&lt;ffffffffa0046b48&gt;] usb_unbind_interface+0x58/0x1a0 [usbcore]
[  243.149545]  [&lt;ffffffff8139ebd7&gt;] __device_release_driver+0x77/0xe0
[  243.149567]  [&lt;ffffffff8139ec67&gt;] device_release_driver+0x27/0x40
[  243.149587]  [&lt;ffffffff8139e5cf&gt;] bus_remove_device+0xdf/0x150
[  243.149608]  [&lt;ffffffff8139bc78&gt;] device_del+0x118/0x1a0
[  243.149661]  [&lt;ffffffffa0044590&gt;] usb_disable_device+0xb0/0x280 [usbcore]
[  243.149718]  [&lt;ffffffffa003c6fd&gt;] usb_disconnect+0x9d/0x140 [usbcore]
[  243.149770]  [&lt;ffffffffa003da7d&gt;] hub_port_connect_change+0xad/0x8a0 [usbcore]
[  243.149825]  [&lt;ffffffffa0043bf5&gt;] ? usb_control_msg+0xe5/0x110 [usbcore]
[  243.149878]  [&lt;ffffffffa003e6e3&gt;] hub_events+0x473/0x760 [usbcore]
[  243.149931]  [&lt;ffffffffa003ea05&gt;] hub_thread+0x35/0x1d0 [usbcore]
[  243.149955]  [&lt;ffffffff81061960&gt;] ? add_wait_queue+0x60/0x60
[  243.150004]  [&lt;ffffffffa003e9d0&gt;] ? hub_events+0x760/0x760 [usbcore]
[  243.150026]  [&lt;ffffffff8106133e&gt;] kthread+0x8e/0xa0
[  243.150047]  [&lt;ffffffff8157ec04&gt;] kernel_thread_helper+0x4/0x10
[  243.150068]  [&lt;ffffffff810612b0&gt;] ? flush_kthread_work+0x120/0x120
[  243.150088]  [&lt;ffffffff8157ec00&gt;] ? gs_change+0xb/0xb
[  243.150101] Code: fd 41 54 53 48 83 ec 08 80 7f 1a 00 74 57 49 89 fc 31 db 90 49 8b 7c 24 20 45 31 f6 48 81 c7 10 02 00 00 e8 bc 64 f3 e0 49 89 c7 &lt;4b&gt; 8b 3c 37 49 83 c6 08 e8 4c a5 bd ff 49 83 fe 20
75 ed 45 30
[  243.150257] RIP  [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.150282]  RSP &lt;ffff880037e75b30&gt;
[  243.150294] CR2: 0000000000000000
[  243.177170] ---[ end trace fba433d9015ffb8c ]---

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
