Re: The reason of panic while 'cat /proc/ioports' [Re: SS_CAP_STATIC_MAP and...]
Russell King <[email protected]> Fri, 14 Mar 2003 13:54:14 +0000
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 14, 2003 at 05:06:35PM +0300, Dmitry Antipov wrote:
> Thanks to all for explanations and interesting discussion. Yes, I'm
> working with 2.4,
> and I hope we will have more consistent approach in 2.5 :-).
>
> The reason for kernel panic at 'cat /proc/ioports' looks simple. Each
> resource has a name:
>
> struct resource {
> const char *name;
> ...
> };
>
> This name is not copied in __request_region(), and 'name' points to some
> string
> constant in a module space. This pointer becomes invalid after module
> unloading, so
> dereferencing it in do_resource_list() causes 'Unable to handle....' bug.
Correct. The rule is that resources claimed by a module should be released
before that module is unloaded.
Something isn't doing that, and that's the problem - it isn't that we
aren't copying the string into the resource structure.
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en