Skip to contentSkip to conversation

workqueue: Annotate alloc_workqueue_va() with __printf(1, 0)

PATCH Applied Tejun Heo 1 participant 2 messages Apr 29 Workqueue

lore
Share & tools
lore

Tejun Heo

author maintainer
#0 lore raw

PATCH 1/1 workqueue: Annotate alloc_workqueue_va() with __printf(1, 0)

alloc_workqueue_va() forwards its va_list to __alloc_workqueue() which ultimately feeds vsnprintf(). __alloc_workqueue() already carries __printf(1, 0); the new wrapper needs the same annotation so format string checking propagates through the forwarding.

Fixes 0de4cb473aed ("workqueue: fix devm_alloc_workqueue() va_list misuse")
---
 kernel/workqueue.c | 1 +
 1 file changed, 1 insertion(+)
kernel/workqueue.c +1 -0
index 24d0265191d4..3d2e3b2ec528 100644
@@ -5906,6 +5906,7 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt,
 	return NULL;
 }
 
+__printf(1, 0)
 static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
 						   unsigned int flags,
 						   int max_active,
author maintainer Applied
#1 lore raw

Hello,

Applied to wq/for-7.1-fixes.

Thanks.

--
tejun