The patch titled ipath: strncpy does not null terminate string has been added to the -mm tree. Its filename is ipath-strncpy-does-not-null-terminate-string.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: ipath: strncpy does not null terminate string From: Roel Kluin <roel.kluin@xxxxxxxxx> strlcpy() will always null terminate the string. Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> Acked-by: Ralph Campbell <ralph.campbell@xxxxxxxxxx> Cc: Roland Dreier <rolandd@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/infiniband/hw/ipath/ipath_file_ops.c | 2 +- drivers/infiniband/hw/ipath/ipath_mad.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/infiniband/hw/ipath/ipath_file_ops.c~ipath-strncpy-does-not-null-terminate-string drivers/infiniband/hw/ipath/ipath_file_ops.c --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c~ipath-strncpy-does-not-null-terminate-string +++ a/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -1616,7 +1616,7 @@ static int try_alloc_port(struct ipath_d pd->port_cnt = 1; port_fp(fp) = pd; pd->port_pid = get_pid(task_pid(current)); - strncpy(pd->port_comm, current->comm, sizeof(pd->port_comm)); + strlcpy(pd->port_comm, current->comm, sizeof(pd->port_comm)); ipath_stats.sps_ports++; ret = 0; } else diff -puN drivers/infiniband/hw/ipath/ipath_mad.c~ipath-strncpy-does-not-null-terminate-string drivers/infiniband/hw/ipath/ipath_mad.c --- a/drivers/infiniband/hw/ipath/ipath_mad.c~ipath-strncpy-does-not-null-terminate-string +++ a/drivers/infiniband/hw/ipath/ipath_mad.c @@ -60,7 +60,7 @@ static int recv_subn_get_nodedescription if (smp->attr_mod) smp->status |= IB_SMP_INVALID_FIELD; - strncpy(smp->data, ibdev->node_desc, sizeof(smp->data)); + strlcpy(smp->data, ibdev->node_desc, sizeof(smp->data)); return reply(smp); } _ Patches currently in -mm which might be from roel.kluin@xxxxxxxxx are linux-next.patch s3c-fix-check-of-index-into-s3c_gpios.patch stmp3xxx-deallocation-with-negative-index-of-descriptors.patch powerpc-sky-cpu-redundant-or-incorrect-tests-on-unsigned.patch ipath-strncpy-does-not-null-terminate-string.patch ext4-remove-redundant-test-on-unsigned.patch drivers-scsi-fnic-fnic_scsic-clean-up.patch frv-duplicate-output_buffer-of-e03.patch frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch m32r-remove-redundant-tests-on-unsigned.patch m68k-count-can-reach-51-not-50.patch m68k-cnt-reaches-1-not-0.patch platinumfb-misplaced-parenthesis.patch documentation-strncpy-does-not-null-terminate-string.patch adfs-remove-redundant-test-on-unsigned.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html