summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorlonglong yan <yanlonglong@kylinos.cn>2026-06-05 05:14:45 +0300
committerMichael S. Tsirkin <mst@redhat.com>2026-06-10 09:16:59 +0300
commitec6177dfe98b9be1c3ede6c0dfe4394ea2a76959 (patch)
tree774aac3654a8cc7c864a2646fd212dfbc5d0af62 /include/linux/stackprotector.h
parent8f6898fe80794f2d7c3d38c1158c806e4074a1c4 (diff)
downloadlinux-ec6177dfe98b9be1c3ede6c0dfe4394ea2a76959.tar.xz
tools/virtio: check mmap return value in vringh_test
In parallel_test(), the return values of mmap() for both host_map and guest_map are not checked against MAP_FAILED. If mmap() fails, the subsequent code will dereference the invalid pointer, leading to a segmentation fault. Add MAP_FAILED checks after both mmap() calls, using err() to report the error and exit, consistent with the existing error handling style in this file (e.g., the open() call on line 149). Fixes: 1515c5ce26ae ("tools/virtio: add vring_test.") Signed-off-by: longlong yan <yanlonglong@kylinos.cn> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260605021446.1611-1-yanlonglong@kylinos.cn>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions