dma-buf: handle testing kthreads creation failure
authorFedor Pchelkin <pchelkin@ispras.ru>
Wed, 22 May 2024 18:13:08 +0000 (21:13 +0300)
committerChristian König <christian.koenig@amd.com>
Mon, 27 May 2024 14:09:22 +0000 (16:09 +0200)
commit6cb05d89fd62a76a9b74bd16211fb0930e89fea8
treeb75bce7a956d01221d7555d33afd97963aa4a4f5
parent779aa4d74785078575ee20d05d49e6942d1f2844
dma-buf: handle testing kthreads creation failure

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>
drivers/dma-buf/st-dma-fence.c