<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_context.c, branch v3.16.61</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-11-20T18:05:42+00:00</updated>
<entry>
<title>drm: re-enable error handling</title>
<updated>2018-11-20T18:05:42+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2018-07-14T12:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ee66ed12240ea231303db320b306ce022619993'/>
<id>urn:sha1:5ee66ed12240ea231303db320b306ce022619993</id>
<content type='text'>
commit d530b5f1ca0bb66958a2b714bebe40a1248b9c15 upstream.

drm_legacy_ctxbitmap_next() returns idr_alloc() which can return
-ENOMEM, -EINVAL or -ENOSPC none of which are -1 . but the call sites
of drm_legacy_ctxbitmap_next() seem to be assuming that the error case
would be -1 (original return of drm_ctxbitmap_next() prior to 2.6.23
was actually -1). Thus reenable error handling by checking for &lt; 0.

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr")
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1531571532-22733-1-git-send-email-hofrat@osadl.org
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>drm: Kill ctx_count from struct drm_device</title>
<updated>2013-10-09T05:55:32+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2013-10-04T11:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc6ff1935b550bdf525e0caa5ef0894010375414'/>
<id>urn:sha1:fc6ff1935b550bdf525e0caa5ef0894010375414</id>
<content type='text'>
The only user of ctx_count is the via driver, and we can replace that
use with list_is_singular().

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "drm: mark context support as a legacy subsystem"</title>
<updated>2013-09-19T22:32:59+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-09-19T22:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095'/>
<id>urn:sha1:c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095</id>
<content type='text'>
This reverts commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1.

Well looks like not enough digging was done, libdrm_nouveau before 2.4.33
used contexts,

292da616fe1f936ca78a3fa8e1b1b19883e343b6 nouveau: pull in major libdrm rewrite

got rid of them,

Reported-by: Paul Zimmerman &lt;Paul.Zimmerman@synopsys.com&gt;
Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: mark context support as a legacy subsystem</title>
<updated>2013-08-19T00:04:48+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-08-08T13:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c510133d93dd6f15ca040733ba7b2891ed61fd1'/>
<id>urn:sha1:7c510133d93dd6f15ca040733ba7b2891ed61fd1</id>
<content type='text'>
So after a lot of digging around in git histories it looks like this
has only ever be used by dri1 render clients. Hence we can fully
disable the entire thing for modesetting drivers and so greatly reduce
the attack surface for potential exploits (or at least tools like
trinity ...).

Also add the drm_legacy prefix for functions which are called from
common code. To further reduce the impact on common code also extract
all the ctx release handling into a function (instead of only
releasing individual handles) and make ctxbitmap_cleanup return void -
it can never fail.

Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: remove dev-&gt;last_switch</title>
<updated>2013-07-23T09:20:20+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a17800c70129d5976a52c42f04a16a0f1d9df4b2'/>
<id>urn:sha1:a17800c70129d5976a52c42f04a16a0f1d9df4b2</id>
<content type='text'>
Only ever assigned in the context code for real, with no readers
anywhere. Remove it.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: kill dev-&gt;context_wait</title>
<updated>2013-07-23T09:20:19+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3dadef6c96c8aa6e67f83b30504256a0605ee4d6'/>
<id>urn:sha1:3dadef6c96c8aa6e67f83b30504256a0605ee4d6</id>
<content type='text'>
No one ever waits on this waitqueue, so the wake_up call is wasted.
Remove it all.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: remove drm_modctx ioctl and use drm_noop instead</title>
<updated>2013-07-23T09:20:18+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=492d774db34fd601b3db17218cf0ae262b51b5cf'/>
<id>urn:sha1:492d774db34fd601b3db17218cf0ae262b51b5cf</id>
<content type='text'>
It doesn't do anything, so kill the code.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: convert to idr_alloc()</title>
<updated>2013-02-28T03:10:15+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e928815c1886fe628ed54623aa98d0889cf5509'/>
<id>urn:sha1:2e928815c1886fe628ed54623aa98d0889cf5509</id>
<content type='text'>
Convert to the much saner new idr interface.

* drm_ctxbitmap_next() error handling in drm_addctx() seems broken.
  drm_ctxbitmap_next() return -errno on failure not -1.

[artem.savkov@gmail.com: missing idr_preload_end in drm_gem_flink_ioctl]
[jslaby@suse.cz: fix drm_gem_flink_ioctl() return value]
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm: don't use idr_remove_all()</title>
<updated>2013-02-28T03:10:13+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d53233a36fdda567cd4d080e27e1ee4b669ddd1'/>
<id>urn:sha1:4d53233a36fdda567cd4d080e27e1ee4b669ddd1</id>
<content type='text'>
idr_destroy() can destroy idr by itself and idr_remove_all() is being
deprecated.  Drop its usage.

* drm_ctxbitmap_cleanup() was calling idr_remove_all() but forgetting
  idr_destroy() thus leaking all buffered free idr_layers.  Replace it
  with idr_destroy().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Airlie &lt;airlied@linux.ie&gt;
Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Joonyoung Shim &lt;jy0922.shim@samsung.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>UAPI: (Scripted) Convert #include "..." to #include &lt;path/...&gt; in drivers/gpu/</title>
<updated>2012-10-02T17:01:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-10-02T17:01:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=760285e7e7ab282c25b5e90816f7c47000557f4f'/>
<id>urn:sha1:760285e7e7ab282c25b5e90816f7c47000557f4f</id>
<content type='text'>
Convert #include "..." to #include &lt;path/...&gt; in drivers/gpu/.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Dave Airlie &lt;airlied@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
</feed>
