<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/gpu/drm/drm_gem.c, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>drm: drm_gem, check kzalloc retval</title>
<updated>2009-07-15T05:56:12+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-07-13T21:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=845792d940f5755b7a7837c450a71d9e831a13e2'/>
<id>845792d940f5755b7a7837c450a71d9e831a13e2</id>
<content type='text'>
Check kzalloc retval against NULL in drm_gem_object_alloc and bail out
appropriately.

While at it merge the fail paths and jump to them by gotos at the end
of the function.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check kzalloc retval against NULL in drm_gem_object_alloc and bail out
appropriately.

While at it merge the fail paths and jump to them by gotos at the end
of the function.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Remove memory debugging infrastructure.</title>
<updated>2009-06-18T20:00:33+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2009-03-24T19:23:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9a298b2acd771d8a5c0004d8f8e4156c65b11f6b'/>
<id>9a298b2acd771d8a5c0004d8f8e4156c65b11f6b</id>
<content type='text'>
It hasn't been used in ages, and having the user tell your how much
memory is being freed at free time is a recipe for disaster even if it
was ever used.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It hasn't been used in ages, and having the user tell your how much
memory is being freed at free time is a recipe for disaster even if it
was ever used.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: simplify kcalloc() call to kzalloc().</title>
<updated>2009-06-11T06:10:30+00:00</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2009-06-10T19:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b798b1fe3b6436275ad1b517a6823d55e3b75c22'/>
<id>b798b1fe3b6436275ad1b517a6823d55e3b75c22</id>
<content type='text'>
Calls to kcalloc() for a single element can be simplified to calls to
kzalloc().

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calls to kcalloc() for a single element can be simplified to calls to
kzalloc().

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Use pgprot_writecombine in GEM GTT mapping to get the right bits for !PAT.</title>
<updated>2009-04-02T21:28:32+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2009-04-01T01:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1055f9ddad093f54dfd708a0f976582034d4ce1a'/>
<id>1055f9ddad093f54dfd708a0f976582034d4ce1a</id>
<content type='text'>
Otherwise, the PAGE_CACHE_WC would end up getting us a UC-only mapping, and
the write performance of GTT maps dropped 10x.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
[anholt: cleaned up unused var]
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise, the PAGE_CACHE_WC would end up getting us a UC-only mapping, and
the write performance of GTT maps dropped 10x.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
[anholt: cleaned up unused var]
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Split drm_map and drm_local_map</title>
<updated>2009-03-13T04:23:56+00:00</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2009-02-02T05:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f77d390c9779c496aa5b99ec832996fb76bb1d13'/>
<id>f77d390c9779c496aa5b99ec832996fb76bb1d13</id>
<content type='text'>
Once upon a time, the DRM made the distinction between the drm_map
data structure exchanged with user space and the drm_local_map used
in the kernel.

For some reasons, while the BSD port still has that "feature", the
linux part abused drm_map for kernel internal usage as the local
map only existed as a typedef of the struct drm_map.

This patch fixes it by declaring struct drm_local_map separately
(though its content is currently identical to the userspace variant),
and changing the kernel code to only use that, except when it's a
user&lt;-&gt;kernel interface (ie. ioctl).

This allows subsequent changes to the in-kernel format

I've also replaced the use of drm_local_map_t with struct drm_local_map
in a couple of places. Mostly by accident but they are the same (the
former is a typedef of the later) and I have some remote plans and
half finished patch to completely kill the drm_local_map_t typedef
so I left those bits in.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Once upon a time, the DRM made the distinction between the drm_map
data structure exchanged with user space and the drm_local_map used
in the kernel.

For some reasons, while the BSD port still has that "feature", the
linux part abused drm_map for kernel internal usage as the local
map only existed as a typedef of the struct drm_map.

This patch fixes it by declaring struct drm_local_map separately
(though its content is currently identical to the userspace variant),
and changing the kernel code to only use that, except when it's a
user&lt;-&gt;kernel interface (ie. ioctl).

This allows subsequent changes to the in-kernel format

I've also replaced the use of drm_local_map_t with struct drm_local_map
in a couple of places. Mostly by accident but they are the same (the
former is a typedef of the later) and I have some remote plans and
half finished patch to completely kill the drm_local_map_t typedef
so I left those bits in.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Keep refs on the object over the lifetime of vmas for GTT mmap.</title>
<updated>2009-02-20T02:21:13+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2009-02-11T22:01:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ab00b3e5210954cbaff9207db874a9f03197e3ba'/>
<id>ab00b3e5210954cbaff9207db874a9f03197e3ba</id>
<content type='text'>
This fixes potential fault at fault time if the object was unreferenced
while the mapping still existed.  Now, while the mmap_offset only lives
for the lifetime of the object, the object also stays alive while a vma
exists that needs it.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes potential fault at fault time if the object was unreferenced
while the mapping still existed.  Now, while the mmap_offset only lives
for the lifetime of the object, the object also stays alive while a vma
exists that needs it.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Do not leak a new reference for flink() on an existing name</title>
<updated>2009-02-20T02:21:10+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2009-02-11T14:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8d59bae5d9aae10ab230561519bfb97962509bcb'/>
<id>8d59bae5d9aae10ab230561519bfb97962509bcb</id>
<content type='text'>
The name table should only hold a single reference, so avoid leaking
additional references for secondary calls to flink().

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The name table should only hold a single reference, so avoid leaking
additional references for secondary calls to flink().

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Free the object ref on error.</title>
<updated>2009-02-20T02:21:08+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2009-02-09T11:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3e49c4f4cf786b70bbc369b99e590de4bebac1b3'/>
<id>3e49c4f4cf786b70bbc369b99e590de4bebac1b3</id>
<content type='text'>
Ensure that the object is unreferenced if we fail to allocate during
drm_gem_flink_ioctl().

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that the object is unreferenced if we fail to allocate during
drm_gem_flink_ioctl().

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Potential use-after-free on error path.</title>
<updated>2009-02-20T02:21:08+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2009-02-09T11:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ad45aa9e6e010283bbd8cf0c6309866233e113f2'/>
<id>ad45aa9e6e010283bbd8cf0c6309866233e113f2</id>
<content type='text'>
Remove the member from the hash table before we free the structure!

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the member from the hash table before we free the structure!

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop playing silly games with the VM_ACCOUNT flag</title>
<updated>2009-01-31T23:08:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-01-31T23:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fc8744adc870a8d4366908221508bb113d8b72ee'/>
<id>fc8744adc870a8d4366908221508bb113d8b72ee</id>
<content type='text'>
The mmap_region() code would temporarily set the VM_ACCOUNT flag for
anonymous shared mappings just to inform shmem_zero_setup() that it
should enable accounting for the resulting shm object.  It would then
clear the flag after calling -&gt;mmap (for the /dev/zero case) or doing
shmem_zero_setup() (for the MAP_ANON case).

This just resulted in vma merge issues, but also made for just
unnecessary confusion.  Use the already-existing VM_NORESERVE flag for
this instead, and let shmem_{zero|file}_setup() just figure it out from
that.

This also happens to make it obvious that the new DRI2 GEM layer uses a
non-reserving backing store for its object allocation - which is quite
possibly not intentional.  But since I didn't want to change semantics
in this patch, I left it alone, and just updated the caller to use the
new flag semantics.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mmap_region() code would temporarily set the VM_ACCOUNT flag for
anonymous shared mappings just to inform shmem_zero_setup() that it
should enable accounting for the resulting shm object.  It would then
clear the flag after calling -&gt;mmap (for the /dev/zero case) or doing
shmem_zero_setup() (for the MAP_ANON case).

This just resulted in vma merge issues, but also made for just
unnecessary confusion.  Use the already-existing VM_NORESERVE flag for
this instead, and let shmem_{zero|file}_setup() just figure it out from
that.

This also happens to make it obvious that the new DRI2 GEM layer uses a
non-reserving backing store for its object allocation - which is quite
possibly not intentional.  But since I didn't want to change semantics
in this patch, I left it alone, and just updated the caller to use the
new flag semantics.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
