linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bad karma with re-entrant hotplug scripts - please advise.
@ 2004-02-05 22:19 Simon Kelley
  2004-02-06  0:09 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Kelley @ 2004-02-05 22:19 UTC (permalink / raw)
  To: linux-hotplug

When using the hotplug system to configure a network interface which 
uses the Atmel wireless driver, the following sequence occurs.

1) Interface comes up: /sbin/hotplug is run which eventually runs  	 
/etc/hotplug/net.agent

2) net.agent brings up interface which eventually calls open() routine 
   in driver.

3) open routine in driver calls request_firmware() which causes a second 
invocation of /sbin/hotplug which then invokes /etc/hotplug/firmware.agent

4) Depending on the exact context, either this all works, or the 
following oops happens:

Unable to handle kernel NULL pointer dereference at virtual address 00000020
printing eip:
c0162ec2
*pde = 00000000
Oops: 0000 [#1]
CPU:    0
0060:[<c0162ec2>]    Not tainted
EFLAGS: 00010246
EIP is at dnotify_flush+0x12/0xa0
eax: c1ec3840   ebx: c1f0b0c0   ecx: c1f0b0c0   edx: 00000000
esi: c1e6f240   edi: c1f0b0c0   ebp: c1f6ff78   esp: c1f6ff6c
ds: 007b   es: 007b   ss: 0068
Process firmware.agent (pid: 500, threadinfo¡f6e000 task¡f246c0)
Stack: c1f0b0c0 00000000 c1e6f240 c1f6ff94 c0148a16 c1f0b0c0 c1e6f240 
0000001
c1f6e000 c1f0bca0 c1f6ffbc c01599cb c1f0b0c0 c1e6f240 c1e6f240 c1f0b0c0
fffffff0 0000000a 0000000a 00000007 c1f6e000 c0108f97 0000000a 00000001
Call Trace:
[<c0148a16>] filp_close+0x36/0x70
[<c01599cb>] sys_dup2+0xcb/0x130
[<c0108f97>] syscall_call+0x7/0xb

Code: 66 8b 42 20 25 00 f0 00 00 3d 00 40 00 00 74 0e 8d 65 f4 5b

or all hell breaks loose and the kernel oopes over and over again before 
  finally dying in an interrupt handler.


Can anybody who is familiar with the code tell me is the above should 
work, what the likeley problem might be, and how to try and fix it?

If I can't solve this I'll be forced to get the firmware image when the 
interface is created and keep it around for the life of the interface, 
rather then calling request_firmware whenever the firmware is needed, 
but that kind of defeats the purpose of the firmware request interface.

Cheers,

Simon.



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bad karma with re-entrant hotplug scripts - please advise.
  2004-02-05 22:19 Bad karma with re-entrant hotplug scripts - please advise Simon Kelley
@ 2004-02-06  0:09 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2004-02-06  0:09 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Feb 05, 2004 at 10:19:21PM +0000, Simon Kelley wrote:
> 
> 4) Depending on the exact context, either this all works, or the 
> following oops happens:

That should work.  Looks like a bug in the firmware kernel code.  I
think there were some patches floating around on lkml and possibly in
the -mm tree to fix this code up a bunch.  You might want to try them
out.

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-06  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05 22:19 Bad karma with re-entrant hotplug scripts - please advise Simon Kelley
2004-02-06  0:09 ` Greg KH

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).