Skip to content

Commit a4570c8

Browse files
jgunthorpegregkh
authored andcommitted
RDMA/ionic: Fix typo in format string
commit 70f780e upstream. Applying the corrupted patch by hand mangled the format string, put the s in the right place. Cc: stable@vger.kernel.org Fixes: 654a27f ("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>
1 parent a3e9372 commit a4570c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/hw/ionic/ionic_ibdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static ssize_t hca_type_show(struct device *device,
185185
struct ionic_ibdev *dev =
186186
rdma_device_to_drv_device(device, struct ionic_ibdev, ibdev);
187187

188-
return sysfs_emit(buf, "%s.64\n", dev->ibdev.node_desc);
188+
return sysfs_emit(buf, "%.64s\n", dev->ibdev.node_desc);
189189
}
190190
static DEVICE_ATTR_RO(hca_type);
191191

0 commit comments

Comments
 (0)