]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
workqueue: Annotate alloc_workqueue_va() with __printf(1, 0)
authorTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 19:44:16 +0000 (09:44 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 19:44:16 +0000 (09:44 -1000)
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")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604300347.2LgXyteh-lkp@intel.com/
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c

index 24d0265191d464ea1434dff36bc9962e2be093db..3d2e3b2ec5283f267ecb8d978137580fbd4793dd 100644 (file)
@@ -5906,6 +5906,7 @@ err_destroy:
        return NULL;
 }
 
+__printf(1, 0)
 static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
                                                   unsigned int flags,
                                                   int max_active,