Re: calling context of unregister_netdev

From: Andrew Morton (akpm@digeo.com)
Date: Sat Apr 19 2003 - 16:58:23 EST


"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/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:26 EST