From: Dirk Behme <[email protected]>

In case this BUG() is hit, it helps debugging a lot to get an idea
what tasklet is the root cause. So, be slightly more verbose here.

Signed-off-by: Dirk Behme <[email protected]>
Signed-off-by: Eugeniu Rosca <[email protected]>
---
 kernel/softirq.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 9908ec4a9bfe..a6b602ad48d6 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -550,9 +550,13 @@ static void tasklet_action_common(struct softirq_action *a,
 
                if (tasklet_trylock(t)) {
                        if (!atomic_read(&t->count)) {
-                               if (!test_and_clear_bit(TASKLET_STATE_SCHED,
-                                                       &t->state))
+                               if (!test_and_clear_bit(TASKLET_STATE_SCHED, 
&t->state)) {
+                                       if (t->use_callback)
+                                               pr_emerg("tasklet failed, cb: 
%pS\n", t->callback);
+                                       else
+                                               pr_emerg("tasklet failed, func: 
%pS\n", t->func);
                                        BUG();
+                               }
                                if (t->use_callback)
                                        t->callback(t);
                                else
-- 
2.29.0

Reply via email to