[Intel-gfx] [PATCH 2/3] drm/sysfs: Grab lock for edid/modes_show

Julia Lawall julia.lawall at lip6.fr
Tue Sep 29 07:47:44 PDT 2015


Maybe line 294 should become an unlock and should be moved under 295?

julia

On Tue, 29 Sep 2015, kbuild test robot wrote:

> CC: kbuild-all at 01.org
> In-Reply-To: <1443513993-5228-2-git-send-email-daniel.vetter at ffwll.ch>
> TO: Daniel Vetter <daniel.vetter at ffwll.ch>
> CC: DRI Development <dri-devel at lists.freedesktop.org>
> CC: Daniel Vetter <daniel.vetter at ffwll.ch>, Intel Graphics Development <intel-gfx at lists.freedesktop.org>
>
> Hi Daniel,
>
> [auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
>
> :::::: branch date: 2 hours ago
> :::::: commit date: 2 hours ago
>
> >> drivers/gpu/drm/drm_sysfs.c:277:1-11: second lock on line 294
> --
> >> drivers/gpu/drm/drm_sysfs.c:297:1-7: preceding lock on line 277
>
> git remote add linux-review https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git remote update linux-review
> git checkout 0a4b5f2c3380cb718d25f3ecf7af6cbbc4a7bced
> vim +277 drivers/gpu/drm/drm_sysfs.c
>
> f453ba04 Dave Airlie   2008-11-07  271  	struct device *connector_dev = container_of(kobj, struct device, kobj);
> f453ba04 Dave Airlie   2008-11-07  272  	struct drm_connector *connector = to_drm_connector(connector_dev);
> f453ba04 Dave Airlie   2008-11-07  273  	unsigned char *edid;
> f453ba04 Dave Airlie   2008-11-07  274  	size_t size;
> 0a4b5f2c Daniel Vetter 2015-09-29  275  	ssize_t ret = 0;
> f453ba04 Dave Airlie   2008-11-07  276
> 0a4b5f2c Daniel Vetter 2015-09-29 @277  	mutex_lock(&connector->dev->mode_config.mutex);
> f453ba04 Dave Airlie   2008-11-07  278  	if (!connector->edid_blob_ptr)
> 0a4b5f2c Daniel Vetter 2015-09-29  279  		goto unlock;
> f453ba04 Dave Airlie   2008-11-07  280
> f453ba04 Dave Airlie   2008-11-07  281  	edid = connector->edid_blob_ptr->data;
> f453ba04 Dave Airlie   2008-11-07  282  	size = connector->edid_blob_ptr->length;
> f453ba04 Dave Airlie   2008-11-07  283  	if (!edid)
> 0a4b5f2c Daniel Vetter 2015-09-29  284  		goto unlock;
> f453ba04 Dave Airlie   2008-11-07  285
> f453ba04 Dave Airlie   2008-11-07  286  	if (off >= size)
> 0a4b5f2c Daniel Vetter 2015-09-29  287  		goto unlock;
> f453ba04 Dave Airlie   2008-11-07  288
> f453ba04 Dave Airlie   2008-11-07  289  	if (off + count > size)
> f453ba04 Dave Airlie   2008-11-07  290  		count = size - off;
> f453ba04 Dave Airlie   2008-11-07  291  	memcpy(buf, edid + off, count);
> f453ba04 Dave Airlie   2008-11-07  292
> 0a4b5f2c Daniel Vetter 2015-09-29  293  	ret = count;
> 0a4b5f2c Daniel Vetter 2015-09-29 @294  	mutex_lock(&connector->dev->mode_config.mutex);
> 0a4b5f2c Daniel Vetter 2015-09-29  295  unlock:
> 0a4b5f2c Daniel Vetter 2015-09-29  296
> 0a4b5f2c Daniel Vetter 2015-09-29 @297  	return ret;
> f453ba04 Dave Airlie   2008-11-07  298  }
> f453ba04 Dave Airlie   2008-11-07  299
> f453ba04 Dave Airlie   2008-11-07  300  static ssize_t modes_show(struct device *device,
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>


More information about the Intel-gfx mailing list