linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: m00150988@huawei.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Franko Fang <huananhu@huawei.com>
Subject: Re: [PATCH] fix oops in usbserial_cleanup function;
Date: Thu, 14 Oct 2010 21:25:41 -0700	[thread overview]
Message-ID: <20101015042541.GA16134@kroah.com> (raw)
In-Reply-To: <faf7c73f11ba6.11ba6faf7c73f@huawei.com>

On Fri, Oct 15, 2010 at 12:14:37PM +0800, m00150988@huawei.com wrote:
> From: marui <m00150988@huawei.com>
> 
> 1. I find this bug on OpenSUSE 11.3 which kernel vesion is 2.6.34, but the latest kernel vesion 2.6.36-rc7 aslo have this bug. This patch is based on the kernel of 2.6.36-rc7.
> 2. Bug report:
>    a. Install huawei datacard dashboard on OpenSUSE 11.3
>    b. Plug in huawei datacard into OpenSUSE 11.3 which kernel verison is 2.6.36-rc7
>    c. After the dashboard has detected the device, I  pull out the usb datacard
>    d. close datashboard,then kernel panic will happen in usbserial_cleanup function. 
>  
>  
> 3. fix the bug:
>    I find usbserial_cleanup should judge the usb device wheher has been disconnected firtly.
> 
> Signed-off-by: marui<m00150988@huawei.com>

I need a full name here please.

> --- linux-2.6.36-rc7_orig/drivers/usb/serial/usb-serial.c	2010-10-06 16:39:52.000000000 -0400
> +++ linux-2.6.36-rc7/drivers/usb/serial/usb-serial.c	2010-10-14 20:59:47.000000000 -0400
> @@ -328,6 +328,20 @@ static void serial_cleanup(struct tty_st
>  	/* The console is magical.  Do not hang up the console hardware
>  	 * or there will be tears.
>  	 */
> +        dbg("%s start\n",__func__);
> +        if(NULL == port)
> +        {
> +            dbg("%s NULL == port\n",__func__);
> +            return;
> +        }
> +	mutex_lock(&port->serial->disc_mutex);

Please read Documentation/CodingStyle for the tabs and brace placements
you need to resolve.

thanks,

greg k-h

  reply	other threads:[~2010-10-15  4:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  4:14 [PATCH] fix oops in usbserial_cleanup function; m00150988
2010-10-15  4:25 ` Greg KH [this message]
     [not found] <00c601cb6c1c$2c768500$ba260b0a@china.huawei.com>
2010-10-15  4:20 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2010-10-15  8:30 m00150988
2010-10-15 14:15 ` Alan Stern
2010-10-15 19:09   ` Greg KH

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=20101015042541.GA16134@kroah.com \
    --to=greg@kroah.com \
    --cc=huananhu@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m00150988@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).