diff options
| author | Dave Airlie <airlied@redhat.com> | 2025-06-20 11:33:41 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2025-06-20 11:34:09 +1000 |
| commit | 9356b50af547e872d9191754c72c83ff6be3b97c (patch) | |
| tree | ae829de25d93912d6a7b9f5798afc65db2500df2 /include/linux | |
| parent | 377b2f15c032e1a015d664955cb05d46f3b3a9b0 (diff) | |
| parent | 1a45ef022f0364186d4fb2f4e5255dcae1ff638a (diff) | |
Merge tag 'drm-misc-next-2025-06-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for 6.17:
UAPI Changes:
- Add Task Information for the wedge API
Cross-subsystem Changes:
Core Changes:
- Fix warnings related to export.h
- fbdev: Make CONFIG_FIRMWARE_EDID available on all architectures
- fence: Fix UAF issues
- format-helper: Improve tests
Driver Changes:
- ivpu: Add turbo flag, Add Wildcat Lake Support
- rz-du: Improve MIPI-DSI Support
- vmwgfx: fence improvement
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250619-perfect-industrious-whippet-8ed3db@houat
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-fence.h | 31 | ||||
| -rw-r--r-- | include/linux/platform_data/video-pxafb.h | 1 |
2 files changed, 22 insertions, 10 deletions
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 10a849cb2d3f..64639e104110 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -378,15 +378,28 @@ bool dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb); void dma_fence_enable_sw_signaling(struct dma_fence *fence); -static inline const char *dma_fence_driver_name(struct dma_fence *fence) -{ - return fence->ops->get_driver_name(fence); -} - -static inline const char *dma_fence_timeline_name(struct dma_fence *fence) -{ - return fence->ops->get_timeline_name(fence); -} +/** + * DOC: Safe external access to driver provided object members + * + * All data not stored directly in the dma-fence object, such as the + * &dma_fence.lock and memory potentially accessed by functions in the + * &dma_fence.ops table, MUST NOT be accessed after the fence has been signalled + * because after that point drivers are allowed to free it. + * + * All code accessing that data via the dma-fence API (or directly, which is + * discouraged), MUST make sure to contain the complete access within a + * &rcu_read_lock and &rcu_read_unlock pair. + * + * Some dma-fence API handles this automatically, while other, as for example + * &dma_fence_driver_name and &dma_fence_timeline_name, leave that + * responsibility to the caller. + * + * To enable this scheme to work drivers MUST ensure a RCU grace period elapses + * between signalling the fence and freeing the said data. + * + */ +const char __rcu *dma_fence_driver_name(struct dma_fence *fence); +const char __rcu *dma_fence_timeline_name(struct dma_fence *fence); /** * dma_fence_is_signaled_locked - Return an indication if the fence diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h index 6333bac166a5..38c24c77ba43 100644 --- a/include/linux/platform_data/video-pxafb.h +++ b/include/linux/platform_data/video-pxafb.h @@ -150,7 +150,6 @@ struct pxafb_mach_info { }; void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); -unsigned long pxafb_get_hsync_time(struct device *dev); /* smartpanel related */ #define SMART_CMD_A0 (0x1 << 8) |
