diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7ff5dc7d2ac5..a2ed8d4838d3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1201,12 +1201,14 @@ out_put: * This function is safe to call from any context including IRQ handler. */ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, - unsigned long *flags) + unsigned long *pflags) { struct worker_pool *pool; struct pool_workqueue *pwq; + unsigned long flags; - local_irq_save(*flags); + local_irq_save(flags); + *pflags = flags; /* try to steal the timer if it exists */ if (is_dwork) { @@ -1267,7 +1269,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, } spin_unlock(&pool->lock); fail: - local_irq_restore(*flags); + local_irq_restore(flags); if (work_is_canceling(work)) return -ENOENT; cpu_relax();