From: ebiederm@xmission.com (Eric W. Biederman)
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Johan Hovold <jhovold@gmail.com>,
Michael Trimarchi <trimarchi@gandalf.sssup.it>,
Oliver Neukum <oliver@neukum.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, Alan Cox <alan@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency.
Date: Thu, 01 Oct 2009 19:52:21 -0700 [thread overview]
Message-ID: <m163ayzevu.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20090929235232.1ae6c63b@lxorguk.ukuu.org.uk> (Alan Cox's message of "Tue\, 29 Sep 2009 23\:52\:32 +0100")
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from
>> interrupt context with low_latency set and that is obviously incorrect,
>> right?
>
> It seems to do it from a work queue - or did I miss a case ?
ftdi_sio crash quite regularly for me with 2.6.31.
With a bunch of nasties like:
BUG: scheduling while atomic: swapper/0/0x00010000
bad: scheduling from the idle thread!
I don't know if I have a good backtrace as things
scrolled away faster than they were captured
but the code below looks like it may be.
Eric
BUG: scheduling while atomic: swapper/0/0x00010000
Modules linked in: nfsd lockd nfs_acl auth_rpcgss exportfs sco bridge stp bnep l2cap bluetooth sunrpc ipv6 cpufreq_ondemand powernow_k8 freq_table dm_mirror dm_region_hash dm_log dm_multipath dm_mod uinput kvm_amd kvm fuse xt_multiport iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 tun 8021q snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd amd64_edac_mod firewire_ohci firewire_core soundcore i2c_nforce2 k8temp sg edac_core hwmon pcspkr sata_sil24 pata_amd snd_page_alloc e1000e forcedeth crc_itu_t i2c_core ftdi_sio usbserial ata_generic pata_acpi sata_nv libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
CPU 0:
Modules linked in: nfsd lockd nfs_acl auth_rpcgss exportfs sco bridge stp bnep l2cap bluetooth sunrpc ipv6 cpufreq_ondemand powernow_k8 freq_table dm_mirror dm_region_hash dm_log dm_multipath dm_mod uinput kvm_amd kvm fuse xt_multiport iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 tun 8021q snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd amd64_edac_mod firewire_ohci firewire_core soundcore i2c_nforce2 k8temp sg edac_core hwmon pcspkr sata_sil24 pata_amd snd_page_alloc e1000e forcedeth crc_itu_t i2c_core ftdi_sio usbserial ata_generic pata_acpi sata_nv libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
Pid: 0, comm: swapper Not tainted 2.6.31-185494.2008.AroraEbiederm.fc11.x86_64 #1
RIP: 0010:[<ffffffff8102c86c>] [<ffffffff8102c86c>] native_safe_halt+0x6/0x8
RSP: 0018:ffffffff81541e48 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff81541e48 RCX: 0000000003000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff81541e58
RBP: ffffffff8100c7ce R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: ffff880038d0fef8 R12: ffffffff81073a1f
R13: ffffffff81541dd8 R14: ffffffff8105c8d7 R15: ffffffff81541e38
FS: 00007fe289d71910(0000) GS:ffff8800017ba000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000404070 CR3: 000000003b87d000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
[<ffffffff81014126>] ? default_idle+0x51/0x8b
[<ffffffff81014265>] ? c1e_idle+0x105/0x120
[<ffffffff8100ae15>] ? cpu_idle+0xb0/0xf3
[<ffffffff81392135>] ? rest_init+0x79/0x8f
[<ffffffff815c8fae>] ? start_kernel+0x3dc/0x3fd
[<ffffffff815c82d4>] ? x86_64_start_reservations+0xbb/0xd6
[<ffffffff815c83f4>] ? x86_64_start_kernel+0x105/0x128
bad: scheduling from the idle thread!
Pid: 0, comm: swapper Not tainted 2.6.31-185494.2008.AroraEbiederm.fc11.x86_64 #1
Call Trace:
<IRQ> [<ffffffff81041261>] dequeue_task_idle+0x37/0x5a
[<ffffffff81040a23>] dequeue_task+0xce/0xf0
[<ffffffff81040a7c>] deactivate_task+0x37/0x56
[<ffffffff813a4fb7>] schedule+0x13d/0x6f3
[<ffffffff81042b82>] ? enqueue_task_fair+0xdf/0x13c
[<ffffffff810404df>] ? enqueue_task+0x6f/0x91
[<ffffffff813a5e87>] __mutex_lock_common+0x12f/0x1aa
[<ffffffff813a5f29>] __mutex_lock_slowpath+0x27/0x3d
[<ffffffff813a5c3d>] mutex_lock+0x25/0x53
[<ffffffff81253ff9>] tty_unthrottle+0x29/0x6d
[<ffffffff8125298a>] reset_buffer_flags+0xe8/0x105
[<ffffffff812529cb>] n_tty_flush_buffer+0x24/0x97
[<ffffffff8125367b>] n_tty_receive_buf+0xc3d/0xe72
[<ffffffff8129b0fd>] ? usb_hcd_submit_urb+0x888/0x943
[<ffffffff81254e83>] ? tty_ldisc_try+0x53/0x71
[<ffffffff81255f85>] flush_to_ldisc+0x116/0x1bd
[<ffffffff8125608a>] tty_flip_buffer_push+0x5e/0x85
[<ffffffffa010a0ab>] ftdi_process_read+0x481/0x627 [ftdi_sio]
[<ffffffffa0001aea>] ? timer_action+0x63/0x79 [ehci_hcd]
[<ffffffffa010a480>] ftdi_read_bulk_callback+0x22f/0x25a [ftdi_sio]
[<ffffffff81040e89>] ? complete+0x54/0x73
[<ffffffffa000597f>] ? ehci_irq+0x351/0x391 [ehci_hcd]
[<ffffffff81299a32>] usb_hcd_giveback_urb+0x9b/0xe5
[<ffffffffa00010f9>] ehci_urb_done+0x91/0xbc [ehci_hcd]
[<ffffffffa00027f3>] qh_completions+0x42a/0x4ca [ehci_hcd]
[<ffffffffa0002938>] ehci_work+0xa5/0x7ab [ehci_hcd]
[<ffffffffa00db90f>] ? nv_swncq_interrupt+0x6a3/0x6d1 [sata_nv]
[<ffffffffa000597f>] ehci_irq+0x351/0x391 [ehci_hcd]
[<ffffffff81073641>] ? clocksource_read+0x1d/0x33
[<ffffffff81073a1f>] ? getnstimeofday+0x69/0xd3
[<ffffffff8129933c>] usb_hcd_irq+0x4d/0xa1
[<ffffffff810a2553>] handle_IRQ_event+0x6a/0x13f
[<ffffffff810a4613>] handle_fasteoi_irq+0x90/0xe1
[<ffffffff8100eb5a>] handle_irq+0x95/0xb7
[<ffffffff8100df49>] do_IRQ+0x6a/0xe0
[<ffffffff8100c7d3>] ret_from_intr+0x0/0x11
<EOI> [<ffffffff8102c86c>] ? native_safe_halt+0x6/0x8
[<ffffffff81014126>] ? default_idle+0x51/0x8b
[<ffffffff81014265>] ? c1e_idle+0x105/0x120
[<ffffffff8100ae15>] ? cpu_idle+0xb0/0xf3
[<ffffffff81392135>] ? rest_init+0x79/0x8f
[<ffffffff815c8fae>] ? start_kernel+0x3dc/0x3fd
[<ffffffff815c82d4>] ? x86_64_start_reservations+0xbb/0xd6
[<ffffffff815c83f4>] ? x86_64_start_kernel+0x105/0x128
BUG: scheduling while atomic: swapper/0/0x00010000
next prev parent reply other threads:[~2009-10-02 2:52 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 15:40 [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold
2009-09-24 19:03 ` Oliver Neukum
2009-09-24 19:21 ` Alan Cox
2009-09-24 21:15 ` Johan Hovold
2009-09-25 17:46 ` Michael Trimarchi
2009-09-29 14:55 ` Johan Hovold
2009-09-29 22:52 ` Alan Cox
2009-09-30 6:33 ` Michael Trimarchi
2009-09-30 9:05 ` Johan Hovold
2009-10-02 2:52 ` Eric W. Biederman [this message]
2009-10-02 8:47 ` Johan Hovold
2009-10-02 16:33 ` Alan Cox
2009-10-02 22:29 ` Eric W. Biederman
2009-10-03 10:21 ` Johan Hovold
2009-10-02 23:00 ` Eric W. Biederman
2009-10-03 13:09 ` Alan Cox
2009-10-03 23:51 ` Eric W. Biederman
2009-11-17 18:35 ` Eric W. Biederman
2009-11-17 18:41 ` Oliver Neukum
2009-11-17 18:56 ` Eric W. Biederman
2009-11-17 20:05 ` Eric W. Biederman
2009-11-18 1:08 ` Eric W. Biederman
2009-11-18 3:10 ` [PATCH] ftdi_sio: Keep going when write errors are encountered Eric W. Biederman
2009-11-18 3:44 ` Greg KH
2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold
2009-10-03 12:11 ` Oliver Neukum
2009-10-03 12:28 ` Johan Hovold
2009-10-03 13:31 ` Oliver Neukum
2009-10-03 14:41 ` Johan Hovold
2009-10-03 13:18 ` Alan Cox
2009-10-03 13:27 ` Oliver Neukum
2009-10-03 14:05 ` Johan Hovold
2009-10-03 16:33 ` Alan Cox
2009-10-03 16:46 ` Johan Hovold
2009-10-04 19:48 ` Johan Hovold
2009-10-04 23:39 ` Eric W. Biederman
2009-10-05 7:01 ` Johan Hovold
2009-10-02 16:59 ` Greg KH
2009-10-02 9:04 ` Alan Cox
2009-10-02 9:53 ` Alan Cox
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=m163ayzevu.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alan@redhat.com \
--cc=gregkh@suse.de \
--cc=jhovold@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=trimarchi@gandalf.sssup.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.