Whamcloud - gitweb
LU-16509 lnet: quash memcpy WARN_ONCE false positive 47/50647/2
authorShaun Tancheff <shaun.tancheff@hpe.com>
Fri, 27 Jan 2023 07:08:23 +0000 (01:08 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 29 Apr 2023 01:29:12 +0000 (01:29 +0000)
commit505532247a7f4adad27458033996a72a0e53269b
treeacbe9605c8685b4e509eda20220b1ff45eccecd4
parent9ab613631b5833ba7e7a578fdb9819ebc593ab3c
LU-16509 lnet: quash memcpy WARN_ONCE false positive

Linux v6.1-rc1-4-g6f7630b1b5bc
  fortify: Capture __bos() results in const temp var

In lnet_peer_push_event() the memcpy triggers a WARN_ONCE
due to the flexible array at the end of
struct lnet_ping_info contained in struct lnet_ping_buffer

Use unsafe_memcpy() to avoid this false positive warning.

Lustre-change: https://review.whamcloud.com/49801
Lustre-commit: a3cf8587b6fafdfed16fe0870efddcf6c0746c88

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I4aa8f38678cd1522004d98b58a3f440d8a38589c
Signed-off-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50647
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs.h
lnet/include/uapi/linux/lnet/lnet-idl.h
lnet/lnet/api-ni.c
lnet/lnet/peer.c
lnet/utils/wirecheck.c
lustre/utils/wirecheck.c