<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap/regmap.c, branch v3.10.27</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/regmap/regmap.c?h=v3.10.27</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/regmap/regmap.c?h=v3.10.27'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-04T08:50:58Z</updated>
<entry>
<title>regmap: cache: bail in regmap_async_complete() for bus-less maps</title>
<updated>2013-08-04T08:50:58Z</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-07-04T11:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8acd5b1eaaf5b06ca149e697ed2a017a748bcd57'/>
<id>urn:sha1:8acd5b1eaaf5b06ca149e697ed2a017a748bcd57</id>
<content type='text'>
commit f2e055e7c9c6084bfbaa68701e52562acf96419e upstream.

Commit f8bd822cb ("regmap: cache: Factor out block sync") made
regcache_rbtree_sync() call regmap_async_complete(), which in turn does
not check for map-&gt;bus before dereferencing it.

This causes a NULL pointer dereference on bus-less maps.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/topic/cache' into regmap-next</title>
<updated>2013-04-16T15:05:46Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-04-16T15:05:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b3b44847590b3cbaafdf01d4ad260fa53d04167'/>
<id>urn:sha1:5b3b44847590b3cbaafdf01d4ad260fa53d04167</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/topic/async' into regmap-next</title>
<updated>2013-04-16T15:05:44Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-04-16T15:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b508c80c553c03baf5c9ad5612ac8caceb13c5f4'/>
<id>urn:sha1:b508c80c553c03baf5c9ad5612ac8caceb13c5f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: don't corrupt work buffer in _regmap_raw_write()</title>
<updated>2013-04-16T15:05:03Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2013-03-20T23:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a08d15602987bbdff3407d7645f95b7a70f1a6f'/>
<id>urn:sha1:5a08d15602987bbdff3407d7645f95b7a70f1a6f</id>
<content type='text'>
_regmap_raw_write() contains code to call regcache_write() to write
values to the cache. That code calls memcpy() to copy the value data to
the start of the work_buf. However, at least when _regmap_raw_write() is
called from _regmap_bus_raw_write(), the value data is in the work_buf,
and this memcpy() operation may over-write part of that value data,
depending on the value of reg_bytes + pad_bytes. At least when using
reg_bytes==1 and pad_bytes==0, corruption of the value data does occur.

To solve this, remove the memcpy() operation, and modify the subsequent
.parse_val() call to parse the original value buffer directly.

At least in the case of 8-bit register address and 16-bit values, and
writes of single registers at a time, this memcpy-then-parse combination
used to cancel each-other out; for a work-buffer containing xx 89 03,
the memcpy changed it to 89 03 03, and the parse_val changed it back to
89 89 03, thus leaving the value uncorrupted. This appears completely
accidental though. Since commit 8a819ff "regmap: core: Split out in
place value parsing", .parse_val only returns the parsed value, and does
not modify the buffer, and hence does not (accidentally) undo the
corruption caused by memcpy(). This caused bogus values to get written
to HW, thus preventing e.g. audio playback on systems with a WM8903
CODEC. This patch fixes that.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v3.9-rc7' into regmap-cache</title>
<updated>2013-04-16T15:02:41Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-04-16T15:02:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60f7110e36ff7858182e8990a2d19fa3df7e05f5'/>
<id>urn:sha1:60f7110e36ff7858182e8990a2d19fa3df7e05f5</id>
<content type='text'>
Linux 3.9-rc7
</content>
</entry>
<entry>
<title>regmap: Back out work buffer fix</title>
<updated>2013-04-09T17:03:25Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-04-09T17:03:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=51a246aa5c0a14b3d34a5c6d3c9e271c784b127f'/>
<id>urn:sha1:51a246aa5c0a14b3d34a5c6d3c9e271c784b127f</id>
<content type='text'>
This reverts commit bc8ce4 (regmap: don't corrupt work buffer in
_regmap_raw_write()) since it turns out that it can cause issues when
taken in isolation from the other changes in -next that lead to its
discovery.  On the basis that nobody noticed the problems for quite some
time without that subsequent work let's drop it from v3.9.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/fix/async' into tmp</title>
<updated>2013-03-31T22:27:38Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-03-31T22:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af8ee69df3b5cf4649d65efa3aa359c73c48402a'/>
<id>urn:sha1:af8ee69df3b5cf4649d65efa3aa359c73c48402a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/fix/core' into tmp</title>
<updated>2013-03-31T22:09:22Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-03-31T22:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d66df41098b84cba9b26772c09d90a108459c39'/>
<id>urn:sha1:6d66df41098b84cba9b26772c09d90a108459c39</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: async: Add missing return</title>
<updated>2013-03-27T13:08:44Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-03-27T13:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f951b6587b94df2abb8c7a2425f7dcdb4fe647dc'/>
<id>urn:sha1:f951b6587b94df2abb8c7a2425f7dcdb4fe647dc</id>
<content type='text'>
Let's only write once...

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>regmap: core: Provide regmap_can_raw_write() operation</title>
<updated>2013-03-27T13:03:39Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-03-26T21:24:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=221ad7f2df7c54b3f05471a3599ea7368366aaeb'/>
<id>urn:sha1:221ad7f2df7c54b3f05471a3599ea7368366aaeb</id>
<content type='text'>
Mainly useful internally but exported since this is a public API that's
being checked for.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
</feed>
