1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

dma-buf/sw-sync: always taint the kernel when sw-sync is used

The SW-sync functionality should only be used for testing and debugging
since it is inherently unsave.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://lore.kernel.org/r/20251120150018.27385-3-christian.koenig@amd.com
This commit is contained in:
Christian König 2025-11-20 15:41:08 +01:00 committed by Christian König
parent 0a8bc1d03e
commit 17331d0f33

View File

@ -8,6 +8,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/panic.h>
#include <linux/slab.h>
#include <linux/sync_file.h>
@ -349,6 +350,9 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
struct sync_file *sync_file;
struct sw_sync_create_fence_data data;
/* SW sync fence are inherently unsafe and can deadlock the kernel */
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
if (fd < 0)
return fd;