[lkml]   [2018]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC PATCH 0/3] dma-mapping: clear dangling pointers consistently
When working with dma_set_max_seg_size(), I noticed issues with a
dangling dma_parms pointer. I saw Christoph just worked on handling
something similar for the dma_ops pointer, too. I came up with three
patches on top of Christoph's work which I send out for discussion here:

Patch 1 fixes a meanwhile stale comment.

Patch 2 makes clearing the dma_ops pointer more consistent because it
was missed on the custom ARM implementation to the best of my knowledge.

Patch 3 generalizes teardown_dma_ops to teardown_dma, so that clearing
dma_parms can be added there.

All these patches are based on the dma-mapping for-next branch. They are
build tested and runtime tested on a Renesas Salvator-XS board (R-Car
M3-N, ARM64) and Renesas Lager board (R-Car H2, ARM32).

A branch containing these (and dma_parms additions for the above boards)
can be found here:

git:// renesas/sdhi/set_max_seg

Looking forward to opinions.



Wolfram Sang (3):
ARM: dma-mapping: update comment about handling dma_ops when detaching
from IOMMU
dma-mapping: clear dma_ops pointer also on ARM
dma-mapping: clear dma_parms on teardown, too

arch/arm/mm/dma-mapping.c | 8 ++++----
include/linux/dma-mapping.h | 6 ++++--
2 files changed, 8 insertions(+), 6 deletions(-)


 \ /
  Last update: 2018-09-13 17:18    [W:0.128 / U:4.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site