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

Cc: [email protected]
Fixes: 654a27f25530 ("RDMA/ionic: bound node_desc sysfs read with %.64s")
Reported-by: Brad Spengler <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/hw/ionic/ionic_ibdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ionic/ionic_ibdev.c 
b/drivers/infiniband/hw/ionic/ionic_ibdev.c
index 0382a64839d26a..73a616ae350236 100644
--- a/drivers/infiniband/hw/ionic/ionic_ibdev.c
+++ b/drivers/infiniband/hw/ionic/ionic_ibdev.c
@@ -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);
 
-- 
2.43.0


Reply via email to