diff options
author | Arnd Bergmann <arnd@arndb.de> | 2024-10-28 14:21:46 +0000 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-10-31 13:43:09 +0100 |
commit | a22c9dc26d6fc522357b73858b13e29c58f49d64 (patch) | |
tree | 8f6c9b6ad1c330efdb2fc3081473e8bc9d9f26ab /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 4f61d7fdcbc422f82acddf33cc966a13de577ce1 (diff) | |
download | linux-a22c9dc26d6fc522357b73858b13e29c58f49d64.tar.gz linux-a22c9dc26d6fc522357b73858b13e29c58f49d64.tar.bz2 linux-a22c9dc26d6fc522357b73858b13e29c58f49d64.zip |
gpiolib: avoid format string weakness in workqueue interface
Using a string literal as a format string is a possible bug when the
string contains '%' characters:
drivers/gpio/gpiolib-cdev.c:2813:48: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
2813 | gdev->line_state_wq = alloc_ordered_workqueue(dev_name(&gdev->dev),
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c:2813:48: note: treat the string as an argument to avoid this
2813 | gdev->line_state_wq = alloc_ordered_workqueue(dev_name(&gdev->dev),
| ^
| "%s",
Do as clang suggests and use a trivial "%s" format string.
Fixes: 7b9b77a8bba9 ("gpiolib: add a per-gpio_device line state notification workqueue")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241028142152.750650-1-arnd@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions