aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/sa_query.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-11-01 07:10:30 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-11-01 07:10:30 -0300
commit875eaa399042064c4ba08a56919f12ade8ea6cb9 (patch)
tree34c754e6174795aee4830e9363af47217ebbd475 /drivers/infiniband/core/sa_query.c
parentperf test sample-parsing: Add endian test for struct branch_flags (diff)
parentLinux 5.15 (diff)
downloadlinux-875eaa399042064c4ba08a56919f12ade8ea6cb9.tar.gz
linux-875eaa399042064c4ba08a56919f12ade8ea6cb9.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/sa_query.c')
-rw-r--r--drivers/infiniband/core/sa_query.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index a20b8108e160..c00f8e28aab7 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -706,8 +706,9 @@ static void ib_nl_set_path_rec_attrs(struct sk_buff *skb,
/* Construct the family header first */
header = skb_put(skb, NLMSG_ALIGN(sizeof(*header)));
- memcpy(header->device_name, dev_name(&query->port->agent->device->dev),
- LS_DEVICE_NAME_MAX);
+ strscpy_pad(header->device_name,
+ dev_name(&query->port->agent->device->dev),
+ LS_DEVICE_NAME_MAX);
header->port_num = query->port->port_num;
if ((comp_mask & IB_SA_PATH_REC_REVERSIBLE) &&