summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-09-21 07:36:26 +0000
committerLeon Romanovsky <leon@kernel.org>2023-09-22 13:27:27 +0300
commitf0cc82ca116f5b710bc298ea9bbbdb05bae01f5c (patch)
tree0e8ee3f10062cc34012b0c5777cd55a0f4f591c4 /mm
parent58c49c097fbf5ad77fd367ad500339c36d284c23 (diff)
downloadlinux-stable-f0cc82ca116f5b710bc298ea9bbbdb05bae01f5c.tar.gz
linux-stable-f0cc82ca116f5b710bc298ea9bbbdb05bae01f5c.tar.bz2
linux-stable-f0cc82ca116f5b710bc298ea9bbbdb05bae01f5c.zip
RDMA/irdma: Replace deprecated strncpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy_pad` due to the fact that it guarantees NUL-termination on the destination buffer. It is unclear to me whether `i40iw_client.name` requires NUL-padding but have opted to keep the NUL-padding behavior that strncpy provides to ensure no functional change. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20230921-strncpy-drivers-infiniband-hw-irdma-i40iw_if-c-v1-1-22d87aef7186@google.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions