diff --git a/include/linux/sched.h b/include/linux/sched.h index 8744e50cb0835048ba422f5e3210c371c4f363f1..aca0ce675939e03790dc2a863d1231325f7c444f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1682,6 +1682,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * /* * Per process flags */ +#define PF_KSOFTIRQD 0x00000001 /* I am ksoftirqd */ #define PF_STARTING 0x00000002 /* being created */ #define PF_EXITING 0x00000004 /* getting shut down */ #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ diff --git a/kernel/softirq.c b/kernel/softirq.c index 988dfbe6bbe87666ad61ef8efd3b64255609ba6d..267f7b763ebb390defa77a3667d26a8aefc1e095 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -713,6 +713,7 @@ static int run_ksoftirqd(void * __bind_cpu) { set_current_state(TASK_INTERRUPTIBLE); + current->flags |= PF_KSOFTIRQD; while (!kthread_should_stop()) { preempt_disable(); if (!local_softirq_pending()) {