<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/base/regmap/regmap.c, branch v3.14.44</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>regmap: fix kernel hang on regmap_bulk_write with zero val_count.</title>
<updated>2014-11-21T17:23:06+00:00</updated>
<author>
<name>Quentin Casasnovas</name>
<email>quentin.casasnovas@oracle.com</email>
</author>
<published>2014-11-12T10:19:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=197b3975f4b079f004b02786bfa985ec276f6112'/>
<id>197b3975f4b079f004b02786bfa985ec276f6112</id>
<content type='text'>
Fixes commit 2f06fa04cf35da5c24481da3ac84a2900d0b99c3 which was an
incorrect backported version of commit
d6b41cb06044a7d895db82bdd54f6e4219970510 upstream.

If val_count is zero we return -EINVAL with map-&gt;lock_arg locked, which
will deadlock the kernel next time we try to acquire this lock.

This was introduced by f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer
dereferencing error.") which improperly back-ported d6b41cb0.

This issue was found during review of Ubuntu Trusty 3.13.0-40.68 kernel to
prepare Ksplice rebootless updates.

Fixes: f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.")
Signed-off-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes commit 2f06fa04cf35da5c24481da3ac84a2900d0b99c3 which was an
incorrect backported version of commit
d6b41cb06044a7d895db82bdd54f6e4219970510 upstream.

If val_count is zero we return -EINVAL with map-&gt;lock_arg locked, which
will deadlock the kernel next time we try to acquire this lock.

This was introduced by f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer
dereferencing error.") which improperly back-ported d6b41cb0.

This issue was found during review of Ubuntu Trusty 3.13.0-40.68 kernel to
prepare Ksplice rebootless updates.

Fixes: f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.")
Signed-off-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.</title>
<updated>2014-10-30T16:38:20+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>Li.Xiubo@freescale.com</email>
</author>
<published>2014-09-28T09:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f06fa04cf35da5c24481da3ac84a2900d0b99c3'/>
<id>2f06fa04cf35da5c24481da3ac84a2900d0b99c3</id>
<content type='text'>
commit d6b41cb06044a7d895db82bdd54f6e4219970510 upstream.

Since we cannot make sure the 'val_count' will always be none zero
here, and then if it equals to zero, the kmemdup() will return
ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling
kmemdup().

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d6b41cb06044a7d895db82bdd54f6e4219970510 upstream.

Since we cannot make sure the 'val_count' will always be none zero
here, and then if it equals to zero, the kmemdup() will return
ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling
kmemdup().

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: fix NULL pointer dereference in _regmap_write/read</title>
<updated>2014-10-30T16:38:20+00:00</updated>
<author>
<name>Pankaj Dubey</name>
<email>pankaj.dubey@samsung.com</email>
</author>
<published>2014-09-27T04:17:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e2fe6c3046ba3a75b3228181a34831b9bb8ee861'/>
<id>e2fe6c3046ba3a75b3228181a34831b9bb8ee861</id>
<content type='text'>
commit 5336be8416a71b5568d2cf54a2f2066abe9f2a53 upstream.

If LOG_DEVICE is defined and map-&gt;dev is NULL it will lead to NULL
pointer dereference. This patch fixes this issue by adding check for
dev-&gt;NULL in all such places in regmap.c

Signed-off-by: Pankaj Dubey &lt;pankaj.dubey@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5336be8416a71b5568d2cf54a2f2066abe9f2a53 upstream.

If LOG_DEVICE is defined and map-&gt;dev is NULL it will lead to NULL
pointer dereference. This patch fixes this issue by adding check for
dev-&gt;NULL in all such places in regmap.c

Signed-off-by: Pankaj Dubey &lt;pankaj.dubey@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: Fix handling of volatile registers for format_write() chips</title>
<updated>2014-10-05T21:52:17+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@linaro.org</email>
</author>
<published>2014-08-26T11:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=83c40254d2ab977aa87c3e424c8b82ceb422d8be'/>
<id>83c40254d2ab977aa87c3e424c8b82ceb422d8be</id>
<content type='text'>
commit 5844a8b9d98ec11ce1d77610daacf3f0a0e14715 upstream.

A previous over-zealous factorisation of code means that we only treat
registers as volatile if they are readable. For most devices this is fine
since normally most registers can be read and volatility implies
readability but for format_write() devices where there is no readback from
the hardware and we use volatility to mean simply uncacheability this means
that we end up treating all registers as cacheble.

A bigger refactoring of the code to clarify this is in order but as a fix
make a minimal change and only check readability when checking volatility
if there is no format_write() operation defined for the device.

Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Tested-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5844a8b9d98ec11ce1d77610daacf3f0a0e14715 upstream.

A previous over-zealous factorisation of code means that we only treat
registers as volatile if they are readable. For most devices this is fine
since normally most registers can be read and volatility implies
readability but for format_write() devices where there is no readback from
the hardware and we use volatility to mean simply uncacheability this means
that we end up treating all registers as cacheble.

A bigger refactoring of the code to clarify this is in order but as a fix
make a minimal change and only check readability when checking volatility
if there is no format_write() operation defined for the device.

Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Tested-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: Allow regmap_bulk_write() to work for "no-bus" regmaps</title>
<updated>2013-12-30T12:39:20+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-12-26T21:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f4298360a5c21409e04cd2b0e220c8f8521fd14c'/>
<id>f4298360a5c21409e04cd2b0e220c8f8521fd14c</id>
<content type='text'>
regmap_bulk_write() should decay to performing individual writes
if we're using a "no-bus" regmap. Unfortunately, it returns an
error because there is no map-&gt;bus pointer. Fix it.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
regmap_bulk_write() should decay to performing individual writes
if we're using a "no-bus" regmap. Unfortunately, it returns an
error because there is no map-&gt;bus pointer. Fix it.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v3.13-rc4' into regmap-core</title>
<updated>2013-12-30T12:38:53+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@linaro.org</email>
</author>
<published>2013-12-30T12:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34f653345018c42cedea89b7f6a4aba3783ebd7b'/>
<id>34f653345018c42cedea89b7f6a4aba3783ebd7b</id>
<content type='text'>
Needed as a subsequent patch is built on some of the fixes.

Linux 3.13-rc4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Needed as a subsequent patch is built on some of the fixes.

Linux 3.13-rc4
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: Allow regmap_bulk_read() to work for "no-bus" regmaps</title>
<updated>2013-12-16T20:54:35+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-12-13T17:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3b58ee13da7510115b66f71c67c9e87b47e9c4aa'/>
<id>3b58ee13da7510115b66f71c67c9e87b47e9c4aa</id>
<content type='text'>
regmap_bulk_read() should decay to performing individual reads if
we're using a "no-bus" regmap. Unfortunately, it returns an
error because there is no map-&gt;bus pointer. Fix it.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
regmap_bulk_read() should decay to performing individual reads if
we're using a "no-bus" regmap. Unfortunately, it returns an
error because there is no map-&gt;bus pointer. Fix it.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regmap/fix/doc' and 'regmap/fix/mmio' into regmap-linus</title>
<updated>2013-11-26T13:16:56+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@linaro.org</email>
</author>
<published>2013-11-26T13:16:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=652787ab1aca35e5e85e644757f7ea2cc00681d1'/>
<id>652787ab1aca35e5e85e644757f7ea2cc00681d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: Fix 'ret' would return an uninitialized value</title>
<updated>2013-11-24T13:59:14+00:00</updated>
<author>
<name>Cai Zhiyong</name>
<email>caizhiyong@huawei.com</email>
</author>
<published>2013-11-18T12:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bd60e381fab88979c3312265d18bb635c314d242'/>
<id>bd60e381fab88979c3312265d18bb635c314d242</id>
<content type='text'>
This patch give a warning when calling regmap_register_patch with
parameter num_regs &lt;= 0.

When the num_regs parameter is zero and krealloc doesn't fail,
then the code would return an uninitialized value. However,
calling this function with num_regs == 0, would be a waste as it
essentially does nothing.

Signed-off-by: Cai Zhiyong &lt;caizhiyong@huawei.com&gt;
Reviewed-by: Geyslan G. Bem &lt;geyslan@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch give a warning when calling regmap_register_patch with
parameter num_regs &lt;= 0.

When the num_regs parameter is zero and krealloc doesn't fail,
then the code would return an uninitialized value. However,
calling this function with num_regs == 0, would be a waste as it
essentially does nothing.

Signed-off-by: Cai Zhiyong &lt;caizhiyong@huawei.com&gt;
Reviewed-by: Geyslan G. Bem &lt;geyslan@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: make sure we unlock on failure in regmap_bulk_write</title>
<updated>2013-11-21T14:05:31+00:00</updated>
<author>
<name>Courtney Cavin</name>
<email>courtney.cavin@sonymobile.com</email>
</author>
<published>2013-11-20T23:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=73f080fde50de1be7ab1e62fd93287edaf0861db'/>
<id>73f080fde50de1be7ab1e62fd93287edaf0861db</id>
<content type='text'>
Signed-off-by: Courtney Cavin &lt;courtney.cavin@sonymobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Courtney Cavin &lt;courtney.cavin@sonymobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
