[PATCH] drm/prime: fix a potential double put (release) bug

2021-08-18 Thread Wentao_Liang
In line 317 (#1), drm_gem_prime_import() is called, it will call drm_gem_prime_import_dev(). At the end of the function drm_gem_prime_import_dev() (line 956, #2), "dma_buf_put(dma_buf);" puts dma_buf->file and may cause it to be released. However, after drm_gem_prime_import() returning, the dma_buf

Re: [PATCH] drm/prime: fix a potential double put (release) bug

2021-08-18 Thread Daniel Vetter
On Wed, Aug 18, 2021 at 03:25:59PM +0200, Christian König wrote: > Am 18.08.21 um 15:02 schrieb Wentao_Liang: > > In line 317 (#1), drm_gem_prime_import() is called, it will call > > drm_gem_prime_import_dev(). At the end of the function > > drm_gem_prime_import_dev() (line 956, #2), "dma_buf_put(d

Re: [PATCH] drm/prime: fix a potential double put (release) bug

2021-08-18 Thread Christian König
Am 18.08.21 um 15:02 schrieb Wentao_Liang: In line 317 (#1), drm_gem_prime_import() is called, it will call drm_gem_prime_import_dev(). At the end of the function drm_gem_prime_import_dev() (line 956, #2), "dma_buf_put(dma_buf);" puts dma_buf->file and may cause it to be released. However, after