From c361937d5196c119f2a4157f08b3201a30bd5e8d Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 13 Apr 2023 11:48:50 +0200 Subject: [PATCH] BUG/MINOR: task: allow to use tasklet_wakeup_after with tid -1 Adjust BUG_ON() statement to allow tasklet_wakeup_after() for tasklets with tid pinned to -1 (the current thread). This is similar to tasklet_wakeup(). This should be backported up to 2.6. --- src/task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index 990ab42813..12b24b460c 100644 --- a/src/task.c +++ b/src/task.c @@ -170,7 +170,7 @@ void __tasklet_wakeup_on(struct tasklet *tl, int thr) */ struct list *__tasklet_wakeup_after(struct list *head, struct tasklet *tl) { - BUG_ON(tid != tl->tid); + BUG_ON(tl->tid >= 0 && tid != tl->tid); /* this tasklet runs on the caller thread */ if (!head) { if (tl->state & TASK_HEAVY) { -- 2.47.3