summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-06-15 13:12:33 +0200
committerChristian König <christian.koenig@amd.com>2021-10-01 09:30:02 +0200
commit6b51b02a3a0ac49dfe302818d0746a799545e4e9 (patch)
tree926ea26282f316544a40a8e1cb6f7d9a4d7aa9fb /crypto
parent241ffeb028e4b1181c0e51e00e553390b42fb1e8 (diff)
downloadlinux-6b51b02a3a0ac49dfe302818d0746a799545e4e9.tar.bz2
dma-buf: fix and rework dma_buf_poll v7
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 sequence values. Then we should always also wait for the exclusive fence. It's also good practice to keep the reference around when installing callbacks to fences you don't own. 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. Dropping the whole RCU approach and taking the lock instead. Only mildly tested and needs a thoughtful review of the code. Pushing through drm-misc-next to avoid merge conflicts and give the code another round of testing. v2: fix the reference counting as well v3: keep the excl fence handling as is for stable v4: back to testing all fences, drop RCU v5: handle in and out separately v6: add missing clear of events v7: change coding style as suggested by Michel, drop unused variables Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: Michel Dänzer <mdaenzer@redhat.com> CC: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210720131110.88512-1-christian.koenig@amd.com
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions