mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Young <hidave.darkstar@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: wgreathouse@smva.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] usb-serial : fix the nousb oops
Date: Mon, 2 Feb 2009 18:11:36 +0800	[thread overview]
Message-ID: <a8e1da0902020211p56ab93fnf459c591eec54b41@mail.gmail.com> (raw)
In-Reply-To: <a8e1da0902011743o47764edfjf53a397b5a4aeeef@mail.gmail.com>

On Mon, Feb 2, 2009 at 9:43 AM, Dave Young <hidave.darkstar@gmail.com> wrote:
> On Sun, Feb 1, 2009 at 11:51 PM, Greg KH <greg@kroah.com> wrote:
>> On Sun, Feb 01, 2009 at 06:53:23PM +0800, Dave Young wrote:
>>>
>>> In case with "nousb" booting, serial drivers will trigger kernel oops.
>>
>> They will?  What is the oops message?
>
> Yes, they will, at lease I saw usb_serial/aircable/ftdi_sio oops. I
> will manage to copy the oops message later.

I can not copy the oops message, so I just hand copy something here:

BUG: unable to handle kernel NULL pointer dereference at 00000001
IP: [<c0527636>] kset_find_obj+0x3b/0x5c
*pde = 00000000
Oops: 0000 [#1] SMP

[snip...]

EIP is at kset_find_obj+0x3b/0x5c
EAX:00000001

[snip...]

Call Trace:
driver_register
destruct_tty_driver
usb_serial_bus_register
usb_serial_register
aircable_init
_stext
aircable_init
restore_nocheck_notrace
pci_arch_init

[snip...]

Actually, after the usb_serial_init failed, the usb_serial_bus_type
will be unregistered.

So when  serial dirvers call usb_serial_register (then
usb_serial_bus_register, and then driver_register),  due to the bus
kset already unregistered kernel will oops.

>
>>
>>> Here add usb_disabled() check in usb_serial_init and usb_serial_register
>>
>> This is odd, is it something new?  Why is usb-serial the only driver
>> that needs such a thing?
>
> No, it is not new thing.  usb serial drivers normally call
> usb_serial_register first, then usb_register, usb_register will fail
> due to "nousb" checking, but usb_serial_register no.
>
>>
>> confused,
>>
>> greg k-h
>>
>
>
>
> --
> Regards
> dave
>



-- 
Regards
dave

  reply	other threads:[~2009-02-02 10:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01 10:53 Dave Young
2009-02-01 15:51 ` Greg KH
2009-02-02  1:43   ` Dave Young
2009-02-02 10:11     ` Dave Young [this message]
2009-02-03 23:58     ` Greg KH
2009-02-04  1:10       ` Dave Young
2009-02-04 23:59         ` Greg KH
2009-02-05  9:33           ` Dave Young
2009-02-06  2:16           ` Dave Young
2009-02-04  8:12       ` Oliver Neukum

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=a8e1da0902020211p56ab93fnf459c591eec54b41@mail.gmail.com \
    --to=hidave.darkstar@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=wgreathouse@smva.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

all inboxes | Powered by JetHome®