On Fri, Dec 20, 2013 at 04:37:34PM +0200, Jani Nikula wrote:
> On Fri, 20 Dec 2013, Daniel Vetter wrote:
> > On Thu, Dec 19, 2013 at 10:55:56PM -0800, Ben Widawsky wrote:
> >> On Fri, Dec 20, 2013 at 07:05:10AM +0100, Daniel Vetter wrote:
> >> > On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
> >>
On Fri, Dec 20, 2013 at 03:11:09PM +0100, Daniel Vetter wrote:
> On Thu, Dec 19, 2013 at 10:55:56PM -0800, Ben Widawsky wrote:
> > On Fri, Dec 20, 2013 at 07:05:10AM +0100, Daniel Vetter wrote:
> > > On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
> > > wrote:
> > > > ctx = i915_gem_context
On Fri, 20 Dec 2013, Daniel Vetter wrote:
> On Thu, Dec 19, 2013 at 10:55:56PM -0800, Ben Widawsky wrote:
>> On Fri, Dec 20, 2013 at 07:05:10AM +0100, Daniel Vetter wrote:
>> > On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
>> > wrote:
>> > > ctx = i915_gem_context_get(file->driver_priv,
On Thu, Dec 19, 2013 at 10:55:56PM -0800, Ben Widawsky wrote:
> On Fri, Dec 20, 2013 at 07:05:10AM +0100, Daniel Vetter wrote:
> > On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
> > wrote:
> > > ctx = i915_gem_context_get(file->driver_priv, args->ctx_id);
> > > - if (IS_ERR(ctx)) {
>
On Fri, Dec 20, 2013 at 07:05:10AM +0100, Daniel Vetter wrote:
> On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
> wrote:
> > ctx = i915_gem_context_get(file->driver_priv, args->ctx_id);
> > - if (IS_ERR(ctx)) {
> > + if (IS_ERR_OR_NULL(ctx)) {
>
> We now have half the callers
On Fri, Dec 20, 2013 at 12:22 AM, Ben Widawsky
wrote:
> ctx = i915_gem_context_get(file->driver_priv, args->ctx_id);
> - if (IS_ERR(ctx)) {
> + if (IS_ERR_OR_NULL(ctx)) {
We now have half the callers check for IS_ERR and the others not.
Afaics i915_gem_context_get can only ret
If we look up an invalid context ID, the idr will return NULL. The ptr
is unconditionally dereferenced afterwards causing a problem.
Note that if the context does not exist, we still return success. This
appears to be the behavior desired by gem_reset_stats --subtest ban
Introduced in v3 of
commi