Re: [PATCH 1/3] usb console: fix mutex lock regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 23, 2009 at 08:41:14AM -0500, Jason Wessel wrote:
> Alan Stern wrote:
> > At this point I don't know...  Just post whatever you've got when it's 
> > ready.
> >
> >   
> 
> So there are two separate issues from the original patch series.
> 
> 1) The crash on console hand over (this thread)
> 2) The baud init problem (another thread)
> 
> Let us solve one at a time.  I pulled the latest Linus tree, and we
> still have the usb serial console crash regression.  Here is the patch
> to fix the problem which we picked up in 2.6.31.
> 
> Can we close this one out or should I start a new lkml thread with this
> patch?

Is the patch below still needed?

Sorry, this is a mess...

greg k-h

> >From b5da000db43b7429d267e1e4c4f4c5db967d5f76 Mon Sep 17 00:00:00 2001
> From: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
> Date: Wed, 23 Sep 2009 08:26:56 -0500
> Subject: [PATCH 1/1] usb console: Fix lockdep crash
> 
> Booting the kernel with kernel args containing
> "console=ttyUSB0,115200" causes a crash with the FTDI
> usb-serial device.
> 
> Ultimately further use of the device results in a hard
> hang on the device.
> 
> WARNING: at kernel/lockdep.c:2813 __lock_acquire+0x4d9/0xa50()
> Hardware name:
> Modules linked in:
> Pid: 958, comm: init Not tainted 2.6.31-06535-g7bd032d #773
> Call Trace:
>  [<c024c749>] ? __lock_acquire+0x4d9/0xa50
>  [<c022ac2c>] warn_slowpath_common+0x7c/0xa0
>  [<c024c749>] ? __lock_acquire+0x4d9/0xa50
>  [<c022ac65>] warn_slowpath_null+0x15/0x20
>  [<c024c749>] __lock_acquire+0x4d9/0xa50
>  [<c024dff8>] lock_acquire+0x68/0x90
>  [<c03acccb>] ? tty_open+0x29b/0x490
>  [<c03acccb>] ? tty_open+0x29b/0x490
>  [<c05749da>] mutex_lock_nested+0x4a/0x2c0
>  [<c03acccb>] ? tty_open+0x29b/0x490
>  [<c03acccb>] tty_open+0x29b/0x490
>  [<c028b40f>] chrdev_open+0xdf/0x1b0
>  [<c0286b9d>] __dentry_open+0x10d/0x2a0
>  [<c029039c>] ? inode_permission+0x5c/0xa0
>  [<c0287e82>] nameidata_to_filp+0x52/0x60
>  [<c028b330>] ? chrdev_open+0x0/0x1b0
>  [<c0293ab8>] do_filp_open+0x218/0x7f0
>  [<c0576377>] ? _spin_unlock+0x27/0x50
>  [<c0286923>] do_sys_open+0x53/0x110
>  [<c0286a49>] sys_open+0x29/0x40
>  [<c0202df1>] syscall_call+0x7/0xb
> 
> After the usb serial code was updated to work with the tty code in
> 2.6.32, the console check needs to be removed from serial_release() to
> keep the tty reference counting correct when using a usb serial
> console.
> 
> Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
> ---
>  drivers/usb/serial/usb-serial.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
> index 9d7ca48..7aad761 100644
> --- a/drivers/usb/serial/usb-serial.c
> +++ b/drivers/usb/serial/usb-serial.c
> @@ -358,12 +358,6 @@ static void serial_release(struct tty_struct *tty)
>  	struct usb_serial *serial;
>  	struct module *owner;
>  
> -	/* The console is magical.  Do not hang up the console hardware
> -	 * or there will be tears.
> -	 */
> -	if (port->console)
> -		return;
> -
>  	dbg("%s - port %d", __func__, port->number);
>  
>  	/* Standard shutdown processing */
> -- 
> 1.6.3.1.9.g95405b
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux