forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
dma-buf: fix and rework dma_buf_poll
Daniel pointed me towards this function and there are multiple obvious problems in the implementation. First of all the retry loop is not working as intended. In general the retry makes only sense if you grab the reference first and then check the retry. Then we skipped checking the exclusive fence when shared fences were present. And last the whole implementation was unnecessary complex and rather hard to understand which could lead to probably unexpected behavior of the IOCTL. Fix all this by reworking the implementation from scratch. Only mildly tested and needs a thoughtful review of the code. Signed-off-by: Christian König <christian.koenig@amd.com>
- Loading branch information
1 parent
c7d4c1f
commit dfa9f2ec4c082b73e644e2c565e58e2291f94463
Showing
2 changed files
with
54 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -329,7 +329,7 @@ struct dma_buf { | ||
| wait_queue_head_t *poll; | ||
|
|
||
| __poll_t active; | ||
| } cb_excl, cb_shared; | ||
| } cb_in, cb_out; | ||
| }; | ||
|
|
||
| /** | ||