<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/msm, branch v3.18.136</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.136</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.136'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-07-03T09:18:40+00:00</updated>
<entry>
<title>drm/msm: Fix possible null dereference on failure of get_pages()</title>
<updated>2018-07-03T09:18:40+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-04-03T22:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f3b0340a1a0250fa9870f09dd53cc98ed64d84e'/>
<id>urn:sha1:5f3b0340a1a0250fa9870f09dd53cc98ed64d84e</id>
<content type='text'>
[ Upstream commit 3976626ea3d2011f8fd3f3a47070a8b792018253 ]

Commit 62e3a3e342af changed get_pages() to initialise
msm_gem_object::pages before trying to initialise msm_gem_object::sgt,
so that put_pages() would properly clean up pages in the failure
case.

However, this means that put_pages() now needs to check that
msm_gem_object::sgt is not null before trying to clean it up, and
this check was only applied to part of the cleanup code.  Move
it all into the conditional block.  (Strictly speaking we don't
need to make the kfree() conditional, but since we can't avoid
checking for null ourselves we may as well do so.)

Fixes: 62e3a3e342af ("drm/msm: fix leak in failed get_pages")
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Reviewed-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: fix leak in failed get_pages</title>
<updated>2018-03-24T09:57:34+00:00</updated>
<author>
<name>Prakash Kamliya</name>
<email>pkamliya@codeaurora.org</email>
</author>
<published>2017-12-04T13:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1fa04de1af73874d7e0ef4ca7b91e513a2023f8f'/>
<id>urn:sha1:1fa04de1af73874d7e0ef4ca7b91e513a2023f8f</id>
<content type='text'>
[ Upstream commit 62e3a3e342af3c313ab38603811ecdb1fcc79edb ]

get_pages doesn't keep a reference of the pages allocated
when it fails later in the code path. This can lead to
a memory leak. Keep reference of the allocated pages so
that it can be freed when msm_gem_free_object gets called
later during cleanup.

Signed-off-by: Prakash Kamliya &lt;pkamliya@codeaurora.org&gt;
Signed-off-by: Sharat Masetty &lt;smasetty@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: fix an integer overflow test</title>
<updated>2017-11-08T09:03:49+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-06-30T07:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77336ca65ccf544bbca59d55b0a1bb10bf420fe3'/>
<id>urn:sha1:77336ca65ccf544bbca59d55b0a1bb10bf420fe3</id>
<content type='text'>
commit 65e93108891e571f177c202add9288eda9ac4100 upstream.

We recently added an integer overflow check but it needs an additional
tweak to work properly on 32 bit systems.

The problem is that we're doing the right hand side of the assignment as
type unsigned long so the max it will have an integer overflow instead
of being larger than SIZE_MAX.  That means the "sz &gt; SIZE_MAX" condition
is never true even on 32 bit systems.  We need to first cast it to u64
and then do the math.

Fixes: 4a630fadbb29 ("drm/msm: Fix potential buffer overflow issue")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/msm: Fix potential buffer overflow issue</title>
<updated>2017-11-08T09:03:49+00:00</updated>
<author>
<name>Kasin Li</name>
<email>donglil@codeaurora.org</email>
</author>
<published>2017-06-19T21:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f449835963f47a3755d2f893a49928cf8d7ca58e'/>
<id>urn:sha1:f449835963f47a3755d2f893a49928cf8d7ca58e</id>
<content type='text'>
commit 4a630fadbb29d9efaedb525f1a8f7449ad107641 upstream.

In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.

Signed-off-by: Kasin Li &lt;donglil@codeaurora.org&gt;
Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set</title>
<updated>2017-08-11T16:30:12+00:00</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c166da740dd6b99332f292817a23e1af19dfca2'/>
<id>urn:sha1:2c166da740dd6b99332f292817a23e1af19dfca2</id>
<content type='text'>
[ Upstream commit a6cb3b864b21b7345f824a4faa12b723c8aaf099 ]

For every submission buffer object one of MSM_SUBMIT_BO_WRITE
and MSM_SUBMIT_BO_READ must be set (and nothing else). If we
allowed zero then the buffer object would never get queued to
be unreferenced.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Ensure that the hardware write pointer is valid</title>
<updated>2017-08-11T16:30:12+00:00</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a077768ad10cbb6c4ea1091caa145d3d9499b72'/>
<id>urn:sha1:6a077768ad10cbb6c4ea1091caa145d3d9499b72</id>
<content type='text'>
[ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ]

Currently the value written to CP_RB_WPTR is calculated on the fly as
(rb-&gt;next - rb-&gt;start). But as the code is designed rb-&gt;next is wrapped
before writing the commands so if a series of commands happened to
fit perfectly in the ringbuffer, rb-&gt;next would end up being equal to
rb-&gt;size / 4 and thus result in an out of bounds address to CP_RB_WPTR.

The easiest way to fix this is to mask WPTR when writing it to the
hardware; it makes the hardware happy and the rest of the ringbuffer
math appears to work and there isn't any point in upsetting anything.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
[squash in is_power_of_2() check]
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;

Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: fix use of copy_from_user() while holding spinlock</title>
<updated>2016-12-23T14:40:55+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2016-08-22T19:15:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86a53e36f16d0318caa73de296b20d80df6b27f1'/>
<id>urn:sha1:86a53e36f16d0318caa73de296b20d80df6b27f1</id>
<content type='text'>
[ Upstream commit 89f82cbb0d5c0ab768c8d02914188aa2211cd2e3 ]

Use instead __copy_from_user_inatomic() and fallback to slow-path where
we drop and re-aquire the lock in case of fault.

Cc: stable@vger.kernel.org
Reported-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>drm/fb-helper: Propagate errors from initial config failure</title>
<updated>2016-06-20T03:47:41+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2014-12-19T10:21:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee20274fabe1b30b86f45d913a15f5cf0defdd80'/>
<id>urn:sha1:ee20274fabe1b30b86f45d913a15f5cf0defdd80</id>
<content type='text'>
[ Upstream commit 01934c2a691882185b3021d437df13bcba07711d ]

Make drm_fb_helper_initial_config() return an int rather than a bool so
that the error can be properly propagated. While at it, update drivers
to propagate errors further rather than just ignore them.

v2:
- cirrus: No cleanup is required, the top-level cirrus_driver_load()
  will do it as part of cirrus_driver_unload() in its cleanup path.
  Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;

Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
[danvet: Squash in simplification patch from kbuild.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>drm: Pass dma-buf as argument to gem_prime_import_sg_table</title>
<updated>2014-09-30T12:04:00+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@canonical.com</email>
</author>
<published>2014-01-09T10:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5e9c1a25fcf8a0d664606251a53b5caa6a19d08'/>
<id>urn:sha1:b5e9c1a25fcf8a0d664606251a53b5caa6a19d08</id>
<content type='text'>
Allows importing dma_reservation_objects from a dma-buf.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
</content>
</entry>
<entry>
<title>drm: Extract &lt;drm/drm_gem.h&gt;</title>
<updated>2014-09-24T01:43:41+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-23T13:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9fc9413f97f5c615256a5657ec667c064c07a70'/>
<id>urn:sha1:d9fc9413f97f5c615256a5657ec667c064c07a70</id>
<content type='text'>
v2: Don't forget git add, noticed by David.

Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Acked-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
</feed>
