On Mon, Mar 28, 2022 at 12:28:31PM +0200, Christian König wrote: > Hi Ville & Daniel, > > Am 25.03.22 um 16:28 schrieb Christian König: > > Am 25.03.22 um 16:25 schrieb Ville Syrjälä: > > > On Fri, Mar 11, 2022 at 12:02:43PM +0100, Christian König wrote: > > > > Add a general purpose helper to deep dive into > > > > dma_fence_chain/dma_fence_array > > > > structures and iterate over all the fences in them. > > > > > > > > This is useful when we need to flatten out all fences in those > > > > structures. > > > > > > > > Signed-off-by: Christian König <christian.koenig@xxxxxxx> > > > One of the dma-buf patches took down Intel CI. Looks like every > > > machine oopses in some sync_file thing now: > > > <1>[ 260.470008] BUG: kernel NULL pointer dereference, address: > > > 0000000000000010 > > > <1>[ 260.470020] #PF: supervisor read access in kernel mode > > > <1>[ 260.470025] #PF: error_code(0x0000) - not-present page > > > <6>[ 260.470030] PGD 0 P4D 0 > > > <4>[ 260.470035] Oops: 0000 [#1] PREEMPT SMP NOPTI > > > <4>[ 260.470040] CPU: 0 PID: 5306 Comm: core_hotunplug Not tainted > > > 5.17.0-CI-CI_DRM_11405+ #1 > > > <4>[ 260.470049] Hardware name: Intel Corporation Jasper Lake > > > Client Platform/Jasperlake DDR4 SODIMM RVP, BIOS > > > JSLSFWI1.R00.2385.D02.2010160831 10/16/2020 > > > <4>[ 260.470058] RIP: 0010:dma_fence_array_first+0x19/0x20 > > I've looked into this and the root cause seems to be that the new code > doesn't handle dma_fence_arrays with zero elements. > > That is rather easy to fix, but a dma_fence_array with zero number of > elements is most likely a bug because under the wrong circumstances it can > create a dma_fence instance which will never signal. > > I've send out a patch on Frinday ([PATCH] dma-buf: WIP dma_fence_array_first > fix) which avoids the crash and prints a warning if anybody tries to create > a dma_fence_array with zero length. > > Can you test this? It's in drm-tip now (in the fixup branch) so drm-tip results should have the result soonish: https://intel-gfx-ci.01.org/tree/drm-tip/index.html? Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch