linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] dma-mapping: clear dangling pointers consistently
@ 2018-09-13 15:17 Wolfram Sang
  2018-09-13 15:17 ` [RFC PATCH 1/3] ARM: dma-mapping: update comment about handling dma_ops when detaching from IOMMU Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Wolfram Sang @ 2018-09-13 15:17 UTC (permalink / raw)
  To: iommu, Robin Murphy, Christoph Hellwig
  Cc: linux-renesas-soc, Marek Szyprowski, linux-arm-kernel,
	linux-kernel, Wolfram Sang

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://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/set_max_seg

Looking forward to opinions.

Regards,

   Wolfram


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(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-09-14 16:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13 15:17 [RFC PATCH 0/3] dma-mapping: clear dangling pointers consistently Wolfram Sang
2018-09-13 15:17 ` [RFC PATCH 1/3] ARM: dma-mapping: update comment about handling dma_ops when detaching from IOMMU Wolfram Sang
2018-09-14 12:15   ` Geert Uytterhoeven
2018-09-14 16:11     ` Wolfram Sang
2018-09-13 15:17 ` [RFC PATCH 2/3] dma-mapping: clear dma_ops pointer also on ARM Wolfram Sang
2018-09-14 13:12   ` Christoph Hellwig
2018-09-13 15:17 ` [RFC PATCH 3/3] dma-mapping: clear dma_parms on teardown, too Wolfram Sang
2018-09-14 13:12   ` Christoph Hellwig
2018-09-14 13:23   ` Robin Murphy
2018-09-14 15:57     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).