Skip to content

Commit 4a0924e

Browse files
dumbbellevadot
authored andcommitted
dma-buf: Call rcu_read_unlock() before locking cursor->obj->rw
The function is called in between rcu_read_lock()/rcu_read_unlock(). Dropping this lock to wait for the writer thread to finish on FreeBSD was lost in the code refactoring.
1 parent aacd0e4 commit 4a0924e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/dma-buf/dma-resv.c

+2
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ static void dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
369369
* for write may be blocked. In that case reader thread should
370370
* be blocked too.
371371
*/
372+
rcu_read_unlock();
372373
rw_rlock(&cursor->obj->rw);
373374
rw_runlock(&cursor->obj->rw);
375+
rcu_read_lock();
374376
#endif
375377
}
376378

0 commit comments

Comments
 (0)