2010-07-28 06:50:59

by Ming Lei

[permalink] [raw]
Subject: BUG: 'Unknown symbol in module' happens after reloading ehci-hcd module

Hi,

'Unknown symbol in module' happens after the actions below:

rmmod ehci-hcd
modprobe ehci-hcd

kernel version: 2.6.35-rc6+gregkh tree+wireless tree

dmsg info:
[ 689.025428] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 689.025431] Warning! ehci_hcd should always be loaded before
uhci_hcd and ohci_hcd, not after
[ 689.025434] ehci_hcd: block sizes: qh 104 qtd 96 itd 192 sitd 96

>From source code of ehci-hcd, seems debugfs_create_dir or usb_debug_root
in ehci_hcd_init is thought as unknown symbol mistakenly by kernel.

--
Lei Ming


2010-07-28 07:33:32

by Ming Lei

[permalink] [raw]
Subject: Re: BUG: 'Unknown symbol in module' happens after reloading ehci-hcd module

2010/7/28 Ming Lei <[email protected]>:
> Hi,
>
> 'Unknown symbol in module' ?happens after the actions below:
>
> ? ? ? ? rmmod ehci-hcd
> ? ? ? ? modprobe ehci-hcd
>

The issue is caused by returning failure of debugfs_create_dir, and
which may be fixed by replacing debugfs_remove with
debugfs_remove_recursive in ehci_hcd_cleanup.

Why does insmod show 'Unknown symbol in module' when module .init
return -ENOENT? The message does make us confused.

--
Lei Ming

2010-07-28 13:56:27

by Greg KH

[permalink] [raw]
Subject: Re: BUG: 'Unknown symbol in module' happens after reloading ehci-hcd module

On Wed, Jul 28, 2010 at 03:33:30PM +0800, Ming Lei wrote:
> 2010/7/28 Ming Lei <[email protected]>:
> > Hi,
> >
> > 'Unknown symbol in module' ?happens after the actions below:
> >
> > ? ? ? ? rmmod ehci-hcd
> > ? ? ? ? modprobe ehci-hcd
> >
>
> The issue is caused by returning failure of debugfs_create_dir, and
> which may be fixed by replacing debugfs_remove with
> debugfs_remove_recursive in ehci_hcd_cleanup.

Or we can properly clean up all of the files, right?

Care to send a patch to resolve this?

thanks,

greg k-h

2010-07-28 14:36:14

by Ming Lei

[permalink] [raw]
Subject: Re: BUG: 'Unknown symbol in module' happens after reloading ehci-hcd module

2010/7/28 Greg KH <[email protected]>:
> On Wed, Jul 28, 2010 at 03:33:30PM +0800, Ming Lei wrote:
>> 2010/7/28 Ming Lei <[email protected]>:
>> > Hi,
>> >
>> > 'Unknown symbol in module' ?happens after the actions below:
>> >
>> > ? ? ? ? rmmod ehci-hcd
>> > ? ? ? ? modprobe ehci-hcd
>> >
>>
>> The issue is caused by returning failure of debugfs_create_dir, and
>> which may be fixed by replacing debugfs_remove with
>> debugfs_remove_recursive in ehci_hcd_cleanup.
>
> Or we can properly clean up all of the files, right?
>
> Care to send a patch to resolve this?

Sent, follows the patch's title:

USB: ehci: fix remove of ehci debugfs dir

thanks,

--
Lei Ming