linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] genirq: Bump the size of the local variable for sprintf()
@ 2025-05-15  8:55 Andy Shevchenko
  2025-05-15 14:33 ` [tip: irq/core] " tip-bot2 for Andy Shevchenko
  2025-05-16  4:45 ` [PATCH v1 1/1] " Jiri Slaby
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2025-05-15  8:55 UTC (permalink / raw)
  To: Thomas Gleixner, linux-kernel; +Cc: Andy Shevchenko, kernel test robot

GCC is not happy about sprintf() call on a buffer that might be too small for
the given formatting string.

kernel/irq/debugfs.c:233:26: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]

Fix this by bumping the size of the local variable for sprintf().

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505151057.xbyXAbEn-lkp@intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 kernel/irq/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index 3d6a5b3cfaf3..3527defd2890 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -225,7 +225,7 @@ void irq_debugfs_copy_devname(int irq, struct device *dev)
 
 void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc)
 {
-	char name [10];
+	char name [12];
 
 	if (!irq_dir || !desc || desc->debugfs_file)
 		return;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-17 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15  8:55 [PATCH v1 1/1] genirq: Bump the size of the local variable for sprintf() Andy Shevchenko
2025-05-15 14:33 ` [tip: irq/core] " tip-bot2 for Andy Shevchenko
2025-05-16  4:45 ` [PATCH v1 1/1] " Jiri Slaby
2025-05-16  9:07   ` Andy Shevchenko
2025-05-16 10:23     ` Jiri Slaby
2025-05-17 16:35       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).