Re: [PATCH] drm/xe: Declare __xe_lrc_*_ggtt_addr with __maybe__unused

2024-03-04 Thread Dawei Li
Hi, On Sun, Feb 04, 2024 at 02:23:24PM +0800, Dawei Li wrote: > Kernel test robot reports building error: > > drivers/gpu/drm/xe/xe_lrc.c:544:1: error: unused function > '__xe_lrc_regs_ggtt_addr' [-Werror,-Wunused-function] > 544 | D

[PATCH] drm/xe: Declare __xe_lrc_*_ggtt_addr with __maybe__unused

2024-02-05 Thread Dawei Li
with __maybe_unused to address it. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402010928.g3j2asbl-...@intel.com/ Signed-off-by: Dawei Li --- drivers/gpu/drm/xe/xe_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe

Re: [PATCH v3] drm/vmwgfx: Fix race issue calling pin_user_pages

2022-11-28 Thread Dawei Li
On Wed, Nov 09, 2022 at 11:37:34PM +0800, Dawei Li wrote: > pin_user_pages() is unsafe without protection of mmap_lock, > fix it by calling pin_user_pages_fast(). > > Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats") > Signed-off-by: Dawe

Re: [PATCH v4] dma-buf: fix racing conflict of dma_heap_add()

2022-11-21 Thread Dawei Li
On Sat, Nov 05, 2022 at 12:05:36AM +0800, Dawei Li wrote: Hi Christian, May I have your opinion on this change? Thanks, Dawei > Racing conflict could be: > task A task B > list_for_each_entry > strcmp(h->name)) >l

[PATCH] drm/radeon: fix potential racing issue due to mmap_lock

2022-11-13 Thread Dawei Li
Both find_vma() and get_user_pages() need explicit protection of mmap lock, fix them by mmap_lock and get_user_pages_fast(). Fixes: ddd00e33e17a ("drm/radeon: add userptr flag to limit it to anonymous memory v2") Fixes: f72a113a71ab ("drm/radeon: add userptr support v8") Sig

[PATCH v3] drm/vmwgfx: Fix race issue calling pin_user_pages

2022-11-09 Thread Dawei Li
pin_user_pages() is unsafe without protection of mmap_lock, fix it by calling pin_user_pages_fast(). Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats") Signed-off-by: Dawei Li --- v1: https://lore.kernel.org/all/tycp286mb23235c9a9fcf85c045f95ea7ca...@tycp286mb23

[PATCH v2] drm/vmwgfx: Protect pin_user_pages with mmap_lock

2022-11-06 Thread Dawei Li
fx: Introduce VMware mks-guest-stats") Signed-off-by: Dawei Li --- v1: https://lore.kernel.org/all/tycp286mb23235c9a9fcf85c045f95ea7ca...@tycp286mb2323.jpnp286.prod.outlook.com/ v1->v2: Rebased to latest vmwgfx/drm-misc-fixes --- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 23 ++

[PATCH v4] dma-buf: fix racing conflict of dma_heap_add()

2022-11-04 Thread Dawei Li
st_add list_add The root cause is that task B has no idea about the fact someone else(A) has inserted heap with same name when it calls list_add, so a potential collision occurs. Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework") Signed-off-by: Dawei Li --- v1: https:/

[PATCH v3] dma-buf: fix racing conflict of dma_heap_add()

2022-11-02 Thread Dawei Li
v1->v2: Narrow down locking scope, check the existence of heap before insertion, as suggested by Andrew Davis. v2->v3: Remove double checking. Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework") base-commit: 447fb14bf07905b880c9ed1ea92c53d6dd0649d7 Signed-off-by: Dawei Li

[PATCH v2] dma-buf: fix racing conflict of dma_heap_add()

2022-10-31 Thread Dawei Li
v1->v2: Narrow down locking scope, check the existence of heap before insertion, as suggested by Andrew Davis. Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework") base-commit: 447fb14bf07905b880c9ed1ea92c53d6dd0649d7 Signed-off-by: Dawei Li --- drivers/dma-

[PATCH] dma-buf: fix racing conflict of dma_heap_add()

2022-10-30 Thread Dawei Li
a92c53d6dd0649d7 Signed-off-by: Dawei Li --- drivers/dma-buf/dma-heap.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c index 8f5848aa144f..ff44c2777b04 100644 --- a/drivers/dma-buf/dma-heap.c +++ b/drivers/dm

[PATCH] drm/vmwgfx: Protect pin_user_pages with mmap_lock

2022-09-21 Thread Dawei Li
es based commit: d8a79c03054911c375a2252627a429c9bc4615b6 Signed-off-by: Dawei Li --- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg