From: Larry Finger <larry.finger@lwfinger.net>
To: Jiri Kosina <jikos@jikos.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb-devel@lists.sourceforge.net
Subject: Re: Locking problem in usbserial with 2.6.23-git 5a34417f
Date: Fri, 19 Oct 2007 16:36:30 -0500 [thread overview]
Message-ID: <4719235E.9030507@lwfinger.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710192304590.18815@twin.jikos.cz>
Jiri Kosina wrote:
> On Fri, 19 Oct 2007, Larry Finger wrote:
>
>> While attempting to configure a new USB modem, the following locking
>> problem occurred. In addition, shortly after this problem occurred, the
>> computer froze. The log data starts at the point that usbserial was
>> loaded and contains everything that was written to disk before the
>> machine locked up. Some info may be missing from the end of the stack
>> dump.
>
> I guess this one is needed.
>
>
> From: Jiri Kosina <jkosina@suse.cz>
>
> USB: usbserial - fix potential deadlock between write() and irq
>
> usb_serial_generic_write() doesn't disable interrupts when taking port->lock,
> and could therefore deadlock with usb_serial_generic_read_bulk_callback()
> being called from interrupt, taking the same lock. Fix it.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
>
As I said earlier, the lock problem went away; however, I get the following two kernel warnings:
WARNING: at kernel/sched.c:3475 sub_preempt_count()
Call Trace:
[<ffffffff8022df50>] sub_preempt_count+0x7e/0x91
[<ffffffff80237eb9>] local_bh_enable_ip+0x91/0xf5
[<ffffffff803eaaa8>] _spin_unlock_bh+0x39/0x3e
[<ffffffff88405409>] :ppp_generic:ppp_channel_push+0x72/0xad
[<ffffffff88406528>] :ppp_generic:ppp_write+0x10f/0x121
[<ffffffff8028f75d>] vfs_write+0xae/0x137
[<ffffffff8028fcc6>] sys_write+0x47/0x70
[<ffffffff8020c2fa>] tracesys+0xdc/0xe1
PPP BSD Compression module registered
PPP Deflate Compression module registered
WARNING: at kernel/softirq.c:139 local_bh_enable()
Call Trace:
[<ffffffff80237d82>] local_bh_enable+0x8f/0x135
[<ffffffff8038f9ec>] dev_queue_xmit+0x2a6/0x2d2
[<ffffffff803ab2be>] ip_finish_output+0x221/0x24f
[<ffffffff803ab5d0>] ip_output+0x53/0x55
[<ffffffff803a9df5>] ip_push_pending_frames+0x309/0x3ed
[<ffffffff803c5f88>] udp_push_pending_frames+0x2d7/0x33f
[<ffffffff803c70e9>] udp_sendmsg+0x4d5/0x61d
[<ffffffff80248c99>] lock_hrtimer_base+0x25/0x4a
[<ffffffff803cccce>] inet_sendmsg+0x46/0x53
[<ffffffff80381ca3>] sock_sendmsg+0xdf/0xf8
[<ffffffff80248e8f>] hrtimer_start+0x102/0x114
[<ffffffff8024653c>] autoremove_wake_function+0x0/0x38
[<ffffffff8020bb85>] do_notify_resume+0x68e/0x7ac
[<ffffffff803ea5cb>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff803826b4>] move_addr_to_kernel+0x40/0x49
[<ffffffff803827db>] sys_sendto+0x11e/0x143
[<ffffffff8020bf5d>] sys_rt_sigreturn+0x2a6/0x389
[<ffffffff80265072>] audit_syscall_entry+0x148/0x17e
[<ffffffff8020c2fa>] tracesys+0xdc/0xe1
The second is complaining that interrupts are disabled, and may be related.
Larry
next prev parent reply other threads:[~2007-10-19 21:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 15:59 Locking problem in usbserial with 2.6.23-git 5a34417f Larry Finger
2007-10-19 21:06 ` Jiri Kosina
2007-10-19 21:29 ` Larry Finger
2007-10-19 21:36 ` Larry Finger [this message]
2007-10-19 22:05 ` Jiri Kosina
2007-10-19 22:19 ` Larry Finger
2007-10-20 5:59 ` [linux-usb-devel] " Greg KH
2007-10-24 21:37 ` patch usb-usbserial-fix-potential-deadlock-between-write-and-irq.patch added to gregkh-2.6 tree gregkh
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=4719235E.9030507@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=gregkh@suse.de \
--cc=jikos@jikos.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.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