Unlock missing on failure of the new call to idr_remove.

julia

---------- Forwarded message ----------
Date: Wed, 27 Sep 2017 15:14:54 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: Re: [PATCH] drm/gem: use new idr deletion interface to cleanup
    drm_gem_handle_delete()

CC: [email protected]
In-Reply-To: <20170925184728.GA8861@aishwarya>
TO: Aishwarya Pant <[email protected]>
CC: Daniel Vetter <[email protected]>, Jani Nikula 
<[email protected]>, Sean Paul <[email protected]>, David Airlie 
<[email protected]>, [email protected], 
[email protected]
CC: [email protected]

Hi Aishwarya,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.14-rc2 next-20170926]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Aishwarya-Pant/drm-gem-use-new-idr-deletion-interface-to-cleanup-drm_gem_handle_delete/20170927-121819
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

>> drivers/gpu/drm/drm_gem.c:287:2-8: preceding lock on line 284

# 
https://github.com/0day-ci/linux/commit/05eadb82a771dd64588809b382fc437aac5c981f
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 05eadb82a771dd64588809b382fc437aac5c981f
vim +287 drivers/gpu/drm/drm_gem.c

8815b23aa Chris Wilson   2016-01-05  269
673a394b1 Eric Anholt    2008-07-30  270  /**
89d61fc0f Daniel Vetter  2014-01-21  271   * drm_gem_handle_delete - deletes 
the given file-private handle
89d61fc0f Daniel Vetter  2014-01-21  272   * @filp: drm file-private structure 
to use for the handle look up
89d61fc0f Daniel Vetter  2014-01-21  273   * @handle: userspace handle to delete
89d61fc0f Daniel Vetter  2014-01-21  274   *
df2e0900a Daniel Vetter  2015-10-22  275   * Removes the GEM handle from the 
@filp lookup table which has been added with
df2e0900a Daniel Vetter  2015-10-22  276   * drm_gem_handle_create(). If this 
is the last handle also cleans up linked
df2e0900a Daniel Vetter  2015-10-22  277   * resources like GEM names.
673a394b1 Eric Anholt    2008-07-30  278   */
ff72145ba Dave Airlie    2011-02-07  279  int
a1a2d1d32 Pekka Paalanen 2009-08-23  280  drm_gem_handle_delete(struct drm_file 
*filp, u32 handle)
673a394b1 Eric Anholt    2008-07-30  281  {
673a394b1 Eric Anholt    2008-07-30  282        struct drm_gem_object *obj;
673a394b1 Eric Anholt    2008-07-30  283
673a394b1 Eric Anholt    2008-07-30 @284        spin_lock(&filp->table_lock);
05eadb82a Aishwarya Pant 2017-09-26  285        obj = 
idr_remove(&filp->object_idr, handle);
05eadb82a Aishwarya Pant 2017-09-26  286        if (!obj)
673a394b1 Eric Anholt    2008-07-30 @287                return -EINVAL;
f6cd7daec Chris Wilson   2016-04-15  288        /* Release driver's reference 
and decrement refcount. */
f6cd7daec Chris Wilson   2016-04-15  289        
drm_gem_object_release_handle(handle, obj, filp);
673a394b1 Eric Anholt    2008-07-30  290        spin_unlock(&filp->table_lock);
673a394b1 Eric Anholt    2008-07-30  291
673a394b1 Eric Anholt    2008-07-30  292        return 0;
673a394b1 Eric Anholt    2008-07-30  293  }
ff72145ba Dave Airlie    2011-02-07  294  EXPORT_SYMBOL(drm_gem_handle_delete);
673a394b1 Eric Anholt    2008-07-30  295

:::::: The code at line 287 was first introduced by commit
:::::: 673a394b1e3b69be886ff24abfd6df97c52e8d08 drm: Add GEM ("graphics 
execution manager") to i915 driver.

:::::: TO: Eric Anholt <[email protected]>
:::::: CC: Dave Airlie <[email protected]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to