[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070801092023.10655b4c@oldman.hamilton.local>
Date: Wed, 1 Aug 2007 09:20:23 +0100
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: linux-kernel@...r.kernel.org
Subject: Re: Fwd: request_module() fails
On Wed, 1 Aug 2007 13:29:18 +0530
"Gireesh Kumar M" <gireesh.mnair@...il.com> wrote:
> Hi,
>
> I'm trying to load some modules upon occurance of a GPIO interrupt.
> The ISR checks some register and then schedules a tasklet to act
> further on the interrupt.
> Inside the tasklet, I call request_module to load a driver. But, here
> it's failing. Please see the error log pasted below.
> When I tried to load the same module using modprobe and it works fine. I
> have edited modules.dep with an entry for my module.
You can't sucessfully load a module from tasklet because tasklet's run
in softirq. You need to use a work queue (or other mechanism) that runs
in process context. Loading a module will require accessing disk, and that
can only be done from process context.
Your whole scheme is pretty daft, because it will be slow and you might
as well have the module already loaded.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists