Message ID | 1349273727-14362-1-git-send-email-mika.kuoppala@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 3 Oct 2012 17:15:26 +0300, mika.kuoppala@intel.com wrote: > From: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> > > Subsequent threads returning EBUSY from vm_insert_pfn() was not handled > correctly. As a result concurrent access from new threads to > mmapped data caused SIGBUS. > > Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> > Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Fixes? Reported-by? I would order the case slightly different so that the comment block comes after EIO. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
On Wed, Oct 03, 2012 at 03:27:36PM +0100, Chris Wilson wrote: > On Wed, 3 Oct 2012 17:15:26 +0300, mika.kuoppala@intel.com wrote: > > From: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> > > > > Subsequent threads returning EBUSY from vm_insert_pfn() was not handled > > correctly. As a result concurrent access from new threads to > > mmapped data caused SIGBUS. > > > > Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> > > Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> > > Fixes? Reported-by? > > I would order the case slightly different so that the comment block > comes after EIO. > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> I've added the fixes note and applied both patches to -fixes. Thanks for the patch & review. -Daniel
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 274d25d..2b14716 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1158,6 +1158,11 @@ out: case 0: case -ERESTARTSYS: case -EINTR: + case -EBUSY: + /* + * EBUSY is ok: this just means that another thread + * already did the job. + */ return VM_FAULT_NOPAGE; case -ENOMEM: return VM_FAULT_OOM;