Well userspace is allowed to send any number of IBs down to this if I remember correctly. So we clearly need something depending on the number of IBs or reject submissions with to many IBs earlier in the CS. Otherwise we clearly open up a possible problem where userspace can trigger a ring overrun. Regards, Christian. Am 25.08.2016 um 07:58 schrieb Monk Liu: > Change-Id: I1ee3258276868a753e536ae2d9ae1b12e7eaf791 > Signed-off-by: Monk Liu <Monk.Liu at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c > index 4e5b2f3..b82904c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c > @@ -151,7 +151,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, > return -EINVAL; > } > > - r = amdgpu_ring_alloc(ring, 256 * num_ibs); > + r = amdgpu_ring_alloc(ring, 256); > if (r) { > dev_err(adev->dev, "scheduling IB failed (%d).\n", r); > return r;