summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2024-07-30 09:13:51 +0200
committerMaxime Ripard <mripard@kernel.org>2024-07-30 09:14:34 +0200
commit11dcda9b7a3407abe941092c87e7bc7e2da9e97b (patch)
treeff86143a134c56fbae9ba520621833790debc6fa /tools
parentMerge drm/drm-fixes into drm-misc-fixes (diff)
parentkselftests: dmabuf-heaps: Ensure the driver name is null-terminated (diff)
downloadlinux-11dcda9b7a3407abe941092c87e7bc7e2da9e97b.tar.xz
linux-11dcda9b7a3407abe941092c87e7bc7e2da9e97b.zip
Merge drm-misc/drm-misc-next-fixes into drm-misc-fixes
There's a patch left in drm-misc-next-fixes, let's bring it into drm-misc-fixes. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index 5f541522364f..5d0a809dc2df 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -29,9 +29,11 @@ static int check_vgem(int fd)
version.name = name;
ret = ioctl(fd, DRM_IOCTL_VERSION, &version);
- if (ret)
+ if (ret || version.name_len != 4)
return 0;
+ name[4] = '\0';
+
return !strcmp(name, "vgem");
}