]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/ionic: Fix typo in format string
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 28 Apr 2026 16:17:34 +0000 (13:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2026 13:31:15 +0000 (15:31 +0200)
commit 70f780edcd1e86350202d8a409de026b2d2e2067 upstream.

Applying the corrupted patch by hand mangled the format string, put the s
in the right place.

Cc: stable@vger.kernel.org
Fixes: 654a27f25530 ("RDMA/ionic: bound node_desc sysfs read with %.64s")
Link: https://patch.msgid.link/r/1-v1-41f3135e5565+9d2-rdma_ai_fixes1_jgg@nvidia.com
Reported-by: Brad Spengler <brad.spengler@opensrcsec.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/ionic/ionic_ibdev.c

index 0382a64839d26ad3eda4ca50853943871f143daa..73a616ae35023630a9b38f17af410c3c283655c5 100644 (file)
@@ -185,7 +185,7 @@ static ssize_t hca_type_show(struct device *device,
        struct ionic_ibdev *dev =
                rdma_device_to_drv_device(device, struct ionic_ibdev, ibdev);
 
-       return sysfs_emit(buf, "%s.64\n", dev->ibdev.node_desc);
+       return sysfs_emit(buf, "%.64s\n", dev->ibdev.node_desc);
 }
 static DEVICE_ATTR_RO(hca_type);