projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cce137
)
dma-buf: add WARN_ON() illegal dma-fence signaling
author
Christian König
<christian.koenig@amd.com>
Thu, 5 Sep 2024 13:51:54 +0000
(15:51 +0200)
committer
Christian König
<christian.koenig@amd.com>
Wed, 9 Oct 2024 12:22:49 +0000
(14:22 +0200)
Calling the signaling a NULL fence is obviously a coding error in a
driver. Those functions unfortunately just returned silently without
raising a warning.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240911085903.1496-2-christian.koenig@amd.com
drivers/dma-buf/dma-fence.c
patch
|
blob
|
history
diff --git
a/drivers/dma-buf/dma-fence.c
b/drivers/dma-buf/dma-fence.c
index
f8303ae
..
f0cdd3e
100644
(file)
--- a/
drivers/dma-buf/dma-fence.c
+++ b/
drivers/dma-buf/dma-fence.c
@@
-412,7
+412,7
@@
int dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)
unsigned long flags;
int ret;
- if (
!fence
)
+ if (
WARN_ON(!fence)
)
return -EINVAL;
spin_lock_irqsave(fence->lock, flags);
@@
-464,7
+464,7
@@
int dma_fence_signal(struct dma_fence *fence)
int ret;
bool tmp;
- if (
!fence
)
+ if (
WARN_ON(!fence)
)
return -EINVAL;
tmp = dma_fence_begin_signalling();