]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r286785, r291088, r291120
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Dec 2015 15:18:01 +0000 (15:18 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Dec 2015 15:18:01 +0000 (15:18 +0000)
commit641b76094abc33d4361780bcccd8089ff267bfb0
tree3463e15df7b9d7c9b90b5da1e7bc7bd5eb54c2c0
parent756dbb64c58ae8ae8efe9a50b8cda6f5871e2b2b
MFC: r286785, r291088, r291120
- Reformat x86 bounce buffer synchronization code to reduce indentation.
  No functional change.
- Avoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
  map has been created via bounce_bus_dmamem_alloc(). Even for coherent
  DMA - which bus_dmamem_alloc(9) typically is used for -, calling of
  bus_dmamap_sync(9) isn't optional. [1]
- Avoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
  the map has been created via bounce_bus_dmamem_alloc(). In that case
  bus_dmamap_unload(9) typically isn't called during normal operation
  but still should be during detach, cleanup from failed attach etc. [2]

PR: 188899 (non-original problem) [1]
Submitted by: yongari [2]

git-svn-id: svn://svn.freebsd.org/base/stable/10@292775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/x86/x86/busdma_bounce.c