summaryrefslogtreecommitdiff
path: root/drivers/dma-buf/st-dma-fence.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-27dma-buf: handle testing kthreads creation failureFedor Pchelkin1-0/+6
kthread creation may possibly fail inside race_signal_callback(). In such a case stop the already started threads, put the already taken references to them and return with error code. Found by Linux Verification Center (linuxtesting.org). Fixes: 2989f6451084 ("dma-buf: Add selftests for dma-fence") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru> Reviewed-by: T.J. Mercier <tjmercier@google.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522181308.841686-1-pchelkin@ispras.ru Signed-off-by: Christian König <christian.koenig@amd.com>
2023-10-04kthread: add kthread_stop_putAndreas Gruenbacher1-3/+1
Add a kthread_stop_put() helper that stops a thread and puts its task struct. Use it to replace the various instances of kthread_stop() followed by put_task_struct(). Remove the kthread_stop_put() macro in usbip that is similar but doesn't return the result of kthread_stop(). [agruenba@redhat.com: fix kerneldoc comment] Link: https://lkml.kernel.org/r/20230911111730.2565537-1-agruenba@redhat.com [akpm@linux-foundation.org: document kthread_stop_put()'s argument] Link: https://lkml.kernel.org/r/20230907234048.2499820-1-agruenba@redhat.com Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-09-16dma-buf: Enable signaling on fence for selftestsArvind Yadav1-0/+16
Here's enabling software signaling on fence for selftest. Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220914164321.2156-4-Arvind.Yadav@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
2021-02-09dma-buf: Avoid comma separated statementsJoe Perches1-2/+5
Use semicolons and braces. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/990bf6f33ccaf73ad56eb4bea8bd2c0db5e90a31.1598331148.git.joe@perches.com Signed-off-by: Christian König <christian.koenig@amd.com> (cherry picked from commit e4abd7ad2b779c6309237a79bdcc5a128fb755ef) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-08-20dmabuf: Mark up onstack timer for selftestsChris Wilson1-1/+2
The dma-fence selftest uses an on-stack timer that requires explicit annotation for debugobjects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111442 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190820122118.13698-1-chris@chris-wilson.co.uk
2019-08-20dma-buf: Use %zu for printing sizeofChris Wilson1-1/+1
Use the %zu format specifier for a size_t returned by sizeof. Reported-by: kbuild-all@01.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190819195740.27608-1-chris@chris-wilson.co.uk
2019-08-19dma-buf: Add selftests for dma-fenceChris Wilson1-0/+573
Exercise the dma-fence API exported to drivers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190819095928.32091-2-chris@chris-wilson.co.uk