From: Felix Fietkau Date: Fri, 3 Nov 2006 11:56:38 +0000 (+0000) Subject: make sure that diag doesn't call hotplug from interrupt context X-Git-Tag: whiterussian_rc6~19 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f7da2b118a3552830174fc2133b51d73ea9fe183;p=openwrt%2Fsvn-archive%2Fopenwrt.git make sure that diag doesn't call hotplug from interrupt context SVN-Revision: 5417 --- diff --git a/openwrt/target/linux/package/diag/src/diag.c b/openwrt/target/linux/package/diag/src/diag.c index fdbd3ca762..bb5828bdae 100644 --- a/openwrt/target/linux/package/diag/src/diag.c +++ b/openwrt/target/linux/package/diag/src/diag.c @@ -666,6 +666,11 @@ struct event_t { static void hotplug_button(struct event_t *event) { + /* can't do it from interrupt context, reschedule */ + if (in_interrupt()) { + schedule_task(&event->tq); + return; + } call_usermodehelper (event->argv[0], event->argv, event->envp); kfree(event); }