<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base, branch v3.4.26</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base?h=v3.4.26</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base?h=v3.4.26'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-17T16:50:54Z</updated>
<entry>
<title>regmap: debugfs: Avoid overflows for very small reads</title>
<updated>2013-01-17T16:50:54Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-12-10T16:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba1de754297ed6756f0a6281f3e41a0ef9ff0d77'/>
<id>urn:sha1:ba1de754297ed6756f0a6281f3e41a0ef9ff0d77</id>
<content type='text'>
commit db04328c167ff8e7c57f4a3532214aeada3a82fd upstream.

If count is less than the size of a register then we may hit integer
wraparound when trying to move backwards to check if we're still in
the buffer. Instead move the position forwards to check if it's still
in the buffer, we are unlikely to be able to allocate a buffer
sufficiently big to overflow here.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / QoS: fix wrong error-checking condition</title>
<updated>2012-12-03T19:47:10Z</updated>
<author>
<name>Guennadi Liakhovetski</name>
<email>g.liakhovetski@gmx.de</email>
</author>
<published>2012-11-23T19:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4e9e580078376f7fd53fcf3a27f3a1259ebe463'/>
<id>urn:sha1:c4e9e580078376f7fd53fcf3a27f3a1259ebe463</id>
<content type='text'>
commit a7227a0faa117d0bc532aea546ae5ac5f89e8ed7 upstream.

dev_pm_qos_add_request() can return 0, 1, or a negative error code,
therefore the correct error test is "if (error &lt; 0)." Checking just for
non-zero return code leads to erroneous setting of the req-&gt;dev pointer
to NULL, which then leads to a repeated call to
dev_pm_qos_add_ancestor_request() in st1232_ts_irq_handler(). This in turn
leads to an Oops, when the I2C host adapter is unloaded and reloaded again
because of the inconsistent state of its QoS request list.

Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Sleep: use resume event when call dpm_resume_early</title>
<updated>2012-10-12T20:38:39Z</updated>
<author>
<name>Feng Hong</name>
<email>hongfeng@marvell.com</email>
</author>
<published>2012-09-19T12:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=24a0c2063c805e9cf1f3f418bb7f444b5b3f0e4e'/>
<id>urn:sha1:24a0c2063c805e9cf1f3f418bb7f444b5b3f0e4e</id>
<content type='text'>
commit 997a031107ec962967ce36db9bc500f1fad491c1 upstream.

When dpm_suspend_noirq fail, state is PMSG_SUSPEND,
should change to PMSG_RESUME when dpm_resume_early is called

Signed-off-by: Feng Hong &lt;hongfeng@marvell.com&gt;
Signed-off-by: Raul Xiong &lt;xjian@marvell.com&gt;
Signed-off-by: Neil Zhang &lt;zhangwm@marvell.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Clear power.deferred_resume on success in rpm_suspend()</title>
<updated>2012-10-02T17:30:22Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-15T19:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f2e6defbe27240e9d51e4eee2f2568d31956b79'/>
<id>urn:sha1:7f2e6defbe27240e9d51e4eee2f2568d31956b79</id>
<content type='text'>
commit 58a34de7b1a920d287d17d2ca08bc9aaf7e6d35b upstream.

The power.deferred_resume can only be set if the runtime PM status
of device is RPM_SUSPENDING and it should be cleared after its
status has been changed, regardless of whether or not the runtime
suspend has been successful.  However, it only is cleared on
suspend failure, while it may remain set on successful suspend and
is happily leaked to rpm_resume() executed in that case.

That shouldn't happen, so if power.deferred_resume is set in
rpm_suspend() after the status has been changed to RPM_SUSPENDED,
clear it before calling rpm_resume().  Then, it doesn't need to be
cleared before changing the status to RPM_SUSPENDING any more,
because it's always cleared after the status has been changed to
either RPM_SUSPENDED (on success) or RPM_ACTIVE (on failure).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set</title>
<updated>2012-10-02T17:30:22Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-15T19:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a0bfb9191135a16c84df7ba580ea839aefff4a0f'/>
<id>urn:sha1:a0bfb9191135a16c84df7ba580ea839aefff4a0f</id>
<content type='text'>
commit 7f321c26c04807834fef4c524d2b21573423fc74 upstream.

For devices whose power.no_callbacks flag is set, rpm_resume()
should return 1 if the device's parent is already active, so that
the callers of pm_runtime_get() don't think that they have to wait
for the device to resume (asynchronously) in that case (the core
won't queue up an asynchronous resume in that case, so there's
nothing to wait for anyway).

Modify the code accordingly (and make sure that an idle notification
will be queued up on success, even if 1 is to be returned).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Sleep: call early resume handlers when suspend_noirq fails</title>
<updated>2012-08-09T15:31:30Z</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2012-07-19T08:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=46dbb0f5903b71e3c7b37e4ad707a9aa70fe3eed'/>
<id>urn:sha1:46dbb0f5903b71e3c7b37e4ad707a9aa70fe3eed</id>
<content type='text'>
commit 064b021fbe470ecc9ca10f9f87af48c0fc0865fb upstream.

Commit cf579dfb82550e34de7ccf3ef090d8b834ccd3a9 (PM / Sleep: Introduce
"late suspend" and "early resume" of devices) introduced a bug where
suspend_late handlers would be called, but if dpm_suspend_noirq returned
an error the early_resume handlers would never be called.  All devices
would end up on the dpm_late_early_list, and would never be resumed
again.

Fix it by calling dpm_resume_early when dpm_suspend_noirq returns
an error.

Signed-off-by: Colin Cross &lt;ccross@android.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Sleep: Prevent waiting forever on asynchronous suspend after abort</title>
<updated>2012-07-16T16:04:08Z</updated>
<author>
<name>Mandeep Singh Baines</name>
<email>msb@chromium.org</email>
</author>
<published>2012-06-24T21:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d90eeae377192032aa58c1934582cc155a2498f'/>
<id>urn:sha1:3d90eeae377192032aa58c1934582cc155a2498f</id>
<content type='text'>
commit 1f758b23177d588a71b96ad02990e715949bb82f upstream.

__device_suspend() must always send a completion. Otherwise, parent
devices will wait forever.

Commit 1e2ef05b, "PM: Limit race conditions between runtime PM and
system sleep (v2)", introduced a regression by short-circuiting the
complete_all() for certain error cases.

This patch fixes the bug by always signalling a completion.

Addresses http://crosbug.com/31972

Tested by injecting an abort.

Signed-off-by: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>regmap: fix possible memory corruption in regmap_bulk_read()</title>
<updated>2012-05-09T14:44:11Z</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2012-05-09T12:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6560ffd1ccd688152393dc7c35dbdcc33140633b'/>
<id>urn:sha1:6560ffd1ccd688152393dc7c35dbdcc33140633b</id>
<content type='text'>
The function regmap_bulk_read() calls the regmap_read() for
each register if set of register has volatile and cache is
enabled. In this case, last few register read makes the memory
corruption if the register size is not the size of unsigned int.
The regam_read() takes argument as unsigned int for returning
value and it update the value as
	*val = map-&gt;format.parse_val(map-&gt;work_buf);
This causes complete 4 bytes (size of unsigned int) to get written.
Now if client pass the memory pointer for value which is equal to the
required size of register count in regmap_bulk_read() then last few
register read actually update the memory beyond passed pointer size.

Avoid this by using local variable for read and then do memcpy()
for actual byte copy to passed pointer based on register size.

I allocated one pointer ptr and take first 16 bytes dump of that
pointer then call regmap_bulk_read() with pointer which is just
on top of this allocated pointer and register count of 128. Here
register size is 1 byte.
The memory trace of last 5 register read are as follows:

[    5.438589] regmap_bulk_read after regamp_read() for register 122
[    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.467535] regmap_bulk_read after regamp_read() for register 123
[    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.496425] regmap_bulk_read after regamp_read() for register 124
[    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.525372] regmap_bulk_read after regamp_read() for register 125
[    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
[    5.554258] regmap_bulk_read after regamp_read() for register 126
[    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
[    5.554258] regmap_bulk_read after regamp_read() for register 127
[    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001

Here it is observed that the memory content at first word started changing
on last 3 regmap_read() and so corruption happened.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>drivers/base: fix compiler warning in SoC export driver - idr should be ida</title>
<updated>2012-04-09T21:54:22Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2012-03-17T09:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3a4ffe930a2d2dad07604fe74d21b878decc6461'/>
<id>urn:sha1:3a4ffe930a2d2dad07604fe74d21b878decc6461</id>
<content type='text'>
This fixes:
  note: expected ‘struct ida *’ but argument is of type ‘struct idr *’
  warning: passing argument 1 of ‘ida_pre_get’ from incompatible pointer type

Reported-by: Arnd Bergman &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/base: Remove unneeded spin_lock_init call for soc_lock</title>
<updated>2012-04-09T21:54:22Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-03-20T08:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33cb4f345687a27e3fece0a7fcf78ac2e7b0a7d6'/>
<id>urn:sha1:33cb4f345687a27e3fece0a7fcf78ac2e7b0a7d6</id>
<content type='text'>
soc_lock is already initialized by DEFINE_SPINLOCK.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
