Re: calling context of unregister_netdev

Andrew Morton (akpm@digeo.com)
Sat, 19 Apr 2003 14:58:23 -0700


"Prasanta Sadhukhan" <prasanta@tataelxsi.co.in> wrote:
>
> So my question is whether we can call unregister_netdev() function from
> interrupt context(i.e, in ISR process context)

No, you cannot.

This is a bug which occurs in multiple places in the pcmcia code. usually it
is doing illegal things from within timer handlers. In your case, within
hard IRQ context.

Your fix (using schedule_task()) is fine. It is the preferred way to resolve
this bug.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/