diff options
| -rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 2 | ||||
| -rw-r--r-- | drivers/infiniband/hw/ipath/ipath_mad.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 23173982b32c..38a287006612 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
| @@ -1616,7 +1616,7 @@ static int try_alloc_port(struct ipath_devdata *dd, int port, | |||
| 1616 | pd->port_cnt = 1; | 1616 | pd->port_cnt = 1; |
| 1617 | port_fp(fp) = pd; | 1617 | port_fp(fp) = pd; |
| 1618 | pd->port_pid = get_pid(task_pid(current)); | 1618 | pd->port_pid = get_pid(task_pid(current)); |
| 1619 | strncpy(pd->port_comm, current->comm, sizeof(pd->port_comm)); | 1619 | strlcpy(pd->port_comm, current->comm, sizeof(pd->port_comm)); |
| 1620 | ipath_stats.sps_ports++; | 1620 | ipath_stats.sps_ports++; |
| 1621 | ret = 0; | 1621 | ret = 0; |
| 1622 | } else | 1622 | } else |
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index 16a702d46018..ceb98ee78666 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
| @@ -60,7 +60,7 @@ static int recv_subn_get_nodedescription(struct ib_smp *smp, | |||
| 60 | if (smp->attr_mod) | 60 | if (smp->attr_mod) |
| 61 | smp->status |= IB_SMP_INVALID_FIELD; | 61 | smp->status |= IB_SMP_INVALID_FIELD; |
| 62 | 62 | ||
| 63 | strncpy(smp->data, ibdev->node_desc, sizeof(smp->data)); | 63 | memcpy(smp->data, ibdev->node_desc, sizeof(smp->data)); |
| 64 | 64 | ||
| 65 | return reply(smp); | 65 | return reply(smp); |
| 66 | } | 66 | } |
