From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Wolfgang Frisch <wfpub@roembden.net>,
Johan Hovold <jhovold@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Subject: [PATCH 70/74] USB: io_ti: Fix NULL dereference in chase_port()
Date: Thu, 24 Jan 2013 01:27:22 -0200 [thread overview]
Message-ID: <1358998046-613-71-git-send-email-herton.krzesinski@canonical.com> (raw)
In-Reply-To: <1358998046-613-1-git-send-email-herton.krzesinski@canonical.com>
3.5.7.4 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfgang Frisch <wfpub@roembden.net>
commit 1ee0a224bc9aad1de496c795f96bc6ba2c394811 upstream.
The tty is NULL when the port is hanging up.
chase_port() needs to check for this.
This patch is intended for stable series.
The behavior was observed and tested in Linux 3.2 and 3.7.1.
Johan Hovold submitted a more elaborate patch for the mainline kernel.
[ 56.277883] usb 1-1: edge_bulk_in_callback - nonzero read bulk status received: -84
[ 56.278811] usb 1-1: USB disconnect, device number 3
[ 56.278856] usb 1-1: edge_bulk_in_callback - stopping read!
[ 56.279562] BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8
[ 56.280536] IP: [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.281212] PGD 1dc1b067 PUD 1e0f7067 PMD 0
[ 56.282085] Oops: 0002 [#1] SMP
[ 56.282744] Modules linked in:
[ 56.283512] CPU 1
[ 56.283512] Pid: 25, comm: khubd Not tainted 3.7.1 #1 innotek GmbH VirtualBox/VirtualBox
[ 56.283512] RIP: 0010:[<ffffffff8144e62a>] [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.283512] RSP: 0018:ffff88001fa99ab0 EFLAGS: 00010046
[ 56.283512] RAX: 0000000000000046 RBX: 00000000000001c8 RCX: 0000000000640064
[ 56.283512] RDX: 0000000000010000 RSI: ffff88001fa99b20 RDI: 00000000000001c8
[ 56.283512] RBP: ffff88001fa99b20 R08: 0000000000000000 R09: 0000000000000000
[ 56.283512] R10: 0000000000000000 R11: ffffffff812fcb4c R12: ffff88001ddf53c0
[ 56.283512] R13: 0000000000000000 R14: 00000000000001c8 R15: ffff88001e19b9f4
[ 56.283512] FS: 0000000000000000(0000) GS:ffff88001fd00000(0000) knlGS:0000000000000000
[ 56.283512] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 56.283512] CR2: 00000000000001c8 CR3: 000000001dc51000 CR4: 00000000000006e0
[ 56.283512] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 56.283512] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 56.283512] Process khubd (pid: 25, threadinfo ffff88001fa98000, task ffff88001fa94f80)
[ 56.283512] Stack:
[ 56.283512] 0000000000000046 00000000000001c8 ffffffff810578ec ffffffff812fcb4c
[ 56.283512] ffff88001e19b980 0000000000002710 ffffffff812ffe81 0000000000000001
[ 56.283512] ffff88001fa94f80 0000000000000202 ffffffff00000001 0000000000000296
[ 56.283512] Call Trace:
[ 56.283512] [<ffffffff810578ec>] ? add_wait_queue+0x12/0x3c
[ 56.283512] [<ffffffff812fcb4c>] ? usb_serial_port_work+0x28/0x28
[ 56.283512] [<ffffffff812ffe81>] ? chase_port+0x84/0x2d6
[ 56.283512] [<ffffffff81063f27>] ? try_to_wake_up+0x199/0x199
[ 56.283512] [<ffffffff81263a5c>] ? tty_ldisc_hangup+0x222/0x298
[ 56.283512] [<ffffffff81300171>] ? edge_close+0x64/0x129
[ 56.283512] [<ffffffff810612f7>] ? __wake_up+0x35/0x46
[ 56.283512] [<ffffffff8106135b>] ? should_resched+0x5/0x23
[ 56.283512] [<ffffffff81264916>] ? tty_port_shutdown+0x39/0x44
[ 56.283512] [<ffffffff812fcb4c>] ? usb_serial_port_work+0x28/0x28
[ 56.283512] [<ffffffff8125d38c>] ? __tty_hangup+0x307/0x351
[ 56.283512] [<ffffffff812e6ddc>] ? usb_hcd_flush_endpoint+0xde/0xed
[ 56.283512] [<ffffffff8144e625>] ? _raw_spin_lock_irqsave+0x14/0x35
[ 56.283512] [<ffffffff812fd361>] ? usb_serial_disconnect+0x57/0xc2
[ 56.283512] [<ffffffff812ea99b>] ? usb_unbind_interface+0x5c/0x131
[ 56.283512] [<ffffffff8128d738>] ? __device_release_driver+0x7f/0xd5
[ 56.283512] [<ffffffff8128d9cd>] ? device_release_driver+0x1a/0x25
[ 56.283512] [<ffffffff8128d393>] ? bus_remove_device+0xd2/0xe7
[ 56.283512] [<ffffffff8128b7a3>] ? device_del+0x119/0x167
[ 56.283512] [<ffffffff812e8d9d>] ? usb_disable_device+0x6a/0x180
[ 56.283512] [<ffffffff812e2ae0>] ? usb_disconnect+0x81/0xe6
[ 56.283512] [<ffffffff812e4435>] ? hub_thread+0x577/0xe82
[ 56.283512] [<ffffffff8144daa7>] ? __schedule+0x490/0x4be
[ 56.283512] [<ffffffff8105798f>] ? abort_exclusive_wait+0x79/0x79
[ 56.283512] [<ffffffff812e3ebe>] ? usb_remote_wakeup+0x2f/0x2f
[ 56.283512] [<ffffffff812e3ebe>] ? usb_remote_wakeup+0x2f/0x2f
[ 56.283512] [<ffffffff810570b4>] ? kthread+0x81/0x89
[ 56.283512] [<ffffffff81057033>] ? __kthread_parkme+0x5c/0x5c
[ 56.283512] [<ffffffff8145387c>] ? ret_from_fork+0x7c/0xb0
[ 56.283512] [<ffffffff81057033>] ? __kthread_parkme+0x5c/0x5c
[ 56.283512] Code: 8b 7c 24 08 e8 17 0b c3 ff 48 8b 04 24 48 83 c4 10 c3 53 48 89 fb 41 50 e8 e0 0a c3 ff 48 89 04 24 e8 e7 0a c3 ff ba 00 00 01 00
<f0> 0f c1 13 48 8b 04 24 89 d1 c1 ea 10 66 39 d1 74 07 f3 90 66
[ 56.283512] RIP [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.283512] RSP <ffff88001fa99ab0>
[ 56.283512] CR2: 00000000000001c8
[ 56.283512] ---[ end trace 49714df27e1679ce ]---
Signed-off-by: Wolfgang Frisch <wfpub@roembden.net>
Cc: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
drivers/usb/serial/io_ti.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 3936904..ab49912 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -543,6 +543,9 @@ static void chase_port(struct edgeport_port *port, unsigned long timeout,
wait_queue_t wait;
unsigned long flags;
+ if (!tty)
+ return;
+
if (!timeout)
timeout = (HZ * EDGE_CLOSING_WAIT)/100;
--
1.7.9.5
next prev parent reply other threads:[~2013-01-24 3:34 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 3:26 [ 3.5.y.z extended stable ] Linux 3.5.7.4 stable review Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 01/74] usb: gadget: dummy: fix enumeration with g_multi Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 02/74] usb: musb: core: print new line in the driver banner again Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 03/74] ASoC: pcm: allow backend hardware to be freed in pause state Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 04/74] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 05/74] mac80211: fix ibss scanning Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 06/74] mac80211: use del_timer_sync for final sta cleanup timer deletion Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 07/74] mac80211: fix dtim_period in hidden SSID AP association Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 08/74] xhci: Handle HS bulk/ctrl endpoints that don't NAK Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 09/74] USB: Handle auto-transition from hot to warm reset Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 10/74] USB: Ignore xHCI Reset Device status Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 11/74] USB: Allow USB 3.0 ports to be disabled Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 12/74] USB: Increase reset timeout Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 13/74] USB: Ignore port state until reset completes Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 14/74] USB: Handle warm reset failure on empty port Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 15/74] xhci: Avoid "dead ports", add roothub port polling Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 16/74] ASoC: wm2200: Remove DSP B and left justified AIF modes Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 17/74] ASoC: wm5100: Remove DSP B and left justified formats Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 18/74] mwifiex: check wait_event_interruptible return value Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 19/74] ASoC: wm2000: Fix sense of speech clarity enable Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 20/74] drm/i915; Only increment the user-pin-count after successfully pinning the bo Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 21/74] samsung-laptop: Add quirk for broken acpi_video backlight on N250P Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 22/74] sony-laptop: fix SNC buffer calls when SN06 returns Integers Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 23/74] staging: r8712u: Add new device ID Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 24/74] b43: Fix firmware loading when driver is built into the kernel Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 25/74] staging: speakup: avoid out-of-range access in synth_init() Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 26/74] staging: speakup: avoid out-of-range access in synth_add() Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 27/74] staging: comedi: fix minimum AO period for NI 625x and NI 628x Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 28/74] staging: comedi: prevent auto-unconfig of manually configured devices Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 29/74] staging: comedi: comedi_test: fix race when cancelling command Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 30/74] regulator: max8997: Use uV in voltage_map_desc Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 31/74] regulator: max8998: Convert to regulator_list_voltage_linear() Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 32/74] regulator: max8998: Convert to set_voltage_sel and regulator_map_voltage_linear Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 33/74] regulator: max8998: Use uV in voltage_map_desc Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 34/74] ALSA: pxa27x: fix ac97 cold reset Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 35/74] ALSA: pxa27x: fix ac97 warm reset Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 36/74] SUNRPC: Ensure we release the socket write lock if the rpc_task exits early Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 37/74] target: use correct sense code for LUN communication failure Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 38/74] Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs" Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 39/74] regulator: max8998: Ensure enough delay time for max8998_set_voltage_buck_time_sel Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 40/74] radeon/kms: force rn50 chip to always report connected on analog output Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 41/74] tcm_fc: Do not indicate retry capability to initiators Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 42/74] tcm_fc: Do not report target role when target is not defined Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 43/74] target: Fix use-after-free in LUN RESET handling Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 44/74] target: Release se_cmd when LUN lookup fails for TMR Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 45/74] sh: Fix FDPIC binary loader Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 46/74] USB: option: Add new MEDIATEK PID support Herton Ronaldo Krzesinski
2013-01-24 3:26 ` [PATCH 47/74] USB: option: blacklist network interface on ZTE MF880 Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 48/74] USB: option: add Telekom Speedstick LTE II Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 49/74] USB: option: add Nexpring NP10T terminal id Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 50/74] Add CDC-ACM support for the CX93010-2x UCMxx USB Modem Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 51/74] USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i" Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 52/74] USB: hub: handle claim of enabled remote wakeup after reset Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 53/74] mm: compaction: fix echo 1 > compact_memory return error issue Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 54/74] mm: use aligned zone start for pfn_to_bitidx calculation Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 55/74] mm: bootmem: fix free_all_bootmem_core() with odd bitmap alignment Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 56/74] audit: create explicit AUDIT_SECCOMP event type Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 57/74] USB: Add device quirk for Microsoft VX700 webcam Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 58/74] drm/nouveau: fix blank LVDS screen regression on pre-nv50 cards Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 59/74] drm/nv17-50: restore fence buffer on resume Herton Ronaldo Krzesinski
2013-01-24 17:36 ` Marcin Slusarz
2013-01-24 17:52 ` Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 60/74] usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 61/74] udldrmfb: Fix EDID not working with monitors with EDID extension blocks Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 62/74] udldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 63/74] udldrmfb: udl_get_edid: drop unneeded i-- Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 64/74] s390/time: fix sched_clock() overflow Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 65/74] rt2800usb: Add support for 2001:3c1e (D-Link DWA-125 rev B1) USB Wi-Fi adapter Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 66/74] drm/radeon: fix NULL pointer dereference in UMS mode Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 67/74] drm/radeon: fix a bogus kfree Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 68/74] ALSA: usb - fix race in creation of M-Audio Fast track pro driver Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 69/74] x86/Sandy Bridge: reserve pages when integrated graphics is present Herton Ronaldo Krzesinski
2013-01-24 3:27 ` Herton Ronaldo Krzesinski [this message]
2013-01-24 3:27 ` [PATCH 71/74] intel-iommu: Prevent devices with RMRRs from being placed into SI Domain Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 72/74] igb: release already assigned MSI-X interrupts if setup fails Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 73/74] usb: chipidea: Allow disabling streaming not only in udc mode Herton Ronaldo Krzesinski
2013-01-24 3:27 ` [PATCH 74/74] [SCSI] sd: Reshuffle init_sd to avoid crash Herton Ronaldo Krzesinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358998046-613-71-git-send-email-herton.krzesinski@canonical.com \
--to=herton.krzesinski@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=jhovold@gmail.com \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=wfpub@roembden.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®