Patch "RDMA/mlx4: Fix truncated output warning in alias_GUID.c" has been added to the 4.19-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    RDMA/mlx4: Fix truncated output warning in alias_GUID.c

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-mlx4-fix-truncated-output-warning-in-alias_guid.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 98b6a6c1c804bac5316ecfdc444e72e0d931f4cc
Author: Leon Romanovsky <leon@xxxxxxxxxx>
Date:   Sun Jun 16 19:17:30 2024 +0300

    RDMA/mlx4: Fix truncated output warning in alias_GUID.c
    
    [ Upstream commit 5953e0647cec703ef436ead37fed48943507b433 ]
    
    drivers/infiniband/hw/mlx4/alias_GUID.c: In function ‘mlx4_ib_init_alias_guid_service’:
    drivers/infiniband/hw/mlx4/alias_GUID.c:878:74: error: ‘%d’ directive
    output may be truncated writing between 1 and 11 bytes into a region of
    size 5 [-Werror=format-truncation=]
      878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
          |                                                                          ^~
    drivers/infiniband/hw/mlx4/alias_GUID.c:878:63: note: directive argument in the range [-2147483641, 2147483646]
      878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
          |                                                               ^~~~~~~~~~~~~~
    drivers/infiniband/hw/mlx4/alias_GUID.c:878:17: note: ‘snprintf’ output
    between 12 and 22 bytes into a destination of size 15
      878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    Fixes: a0c64a17aba8 ("mlx4: Add alias_guid mechanism")
    Link: https://lore.kernel.org/r/1951c9500109ca7e36dcd523f8a5f2d0d2a608d1.1718554641.git.leon@xxxxxxxxxx
    Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index baab9afa9174b..f2d975c2659d8 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -832,7 +832,7 @@ void mlx4_ib_destroy_alias_guid_service(struct mlx4_ib_dev *dev)
 
 int mlx4_ib_init_alias_guid_service(struct mlx4_ib_dev *dev)
 {
-	char alias_wq_name[15];
+	char alias_wq_name[22];
 	int ret = 0;
 	int i, j;
 	union ib_gid gid;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux