[PATCH 2/2] dm vdo: Increase MAX_VDO_WORK_QUEUE_NAME_LEN size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For compiling with W=1 and allmodconfig, the following warning can be seen:

drivers/md/dm-vdo/vdo.c: In function ‘vdo_make’:
drivers/md/dm-vdo/vdo.c:562:19: error: ‘%s’ directive output may be truncated writing up to 55 bytes into a region of size 16 [-Werror=format-truncation=]
  562 |                  "%s%u", MODULE_NAME, instance);
      |                   ^~
drivers/md/dm-vdo/vdo.c:561:9: note: ‘snprintf’ output between 2 and 66 bytes into a destination of size 16
  561 |         snprintf(vdo->thread_name_prefix, sizeof(vdo->thread_name_prefix),
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  562 |                  "%s%u", MODULE_NAME, instance);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Increase MAX_VDO_WORK_QUEUE_NAME_LEN in size to deal with this.

Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>
---
 drivers/md/dm-vdo/funnel-workqueue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-vdo/funnel-workqueue.h b/drivers/md/dm-vdo/funnel-workqueue.h
index b5be6e9e83bc..6307fe811ca0 100644
--- a/drivers/md/dm-vdo/funnel-workqueue.h
+++ b/drivers/md/dm-vdo/funnel-workqueue.h
@@ -11,7 +11,7 @@
 #include "types.h"
 
 enum {
-	MAX_VDO_WORK_QUEUE_NAME_LEN = TASK_COMM_LEN,
+	MAX_VDO_WORK_QUEUE_NAME_LEN = TASK_COMM_LEN + 41,
 };
 
 struct vdo_work_queue_type {
-- 
2.31.1





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux