<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/devfreq, branch v4.9.139</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.139</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.139'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-04-13T17:48:09Z</updated>
<entry>
<title>PM / devfreq: Fix potential NULL pointer dereference in governor_store</title>
<updated>2018-04-13T17:48:09Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2017-12-06T20:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=715f7e3efef0227865162b00d13321431be7962f'/>
<id>urn:sha1:715f7e3efef0227865162b00d13321431be7962f</id>
<content type='text'>
[ Upstream commit 63f1e05f7fe9ca509c60154d6a833abf96eecdc9 ]

df-&gt;governor is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.

Notice that df-&gt;governor is being null checked at line 1004:
if (df-&gt;governor) {, which implies it might be null.

Fix this by null checking df-&gt;governor before dereferencing it.

Addresses-Coverity-ID: 1401988 ("Dereference before null check")
Fixes: bcf23c79c4e4 ("PM / devfreq: Fix available_governor sysfs")
Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.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>PM / devfreq: Propagate error from devfreq_add_device()</title>
<updated>2018-02-22T14:43:52Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2017-11-06T05:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b3685e8e2b6ddec107f62f03ada6302cfc3a7bce'/>
<id>urn:sha1:b3685e8e2b6ddec107f62f03ada6302cfc3a7bce</id>
<content type='text'>
commit d1bf2d30728f310f72296b54f0651ecdb09cbb12 upstream.

Propagate the error of devfreq_add_device() in devm_devfreq_add_device()
rather than statically returning ENOMEM. This makes it slightly faster
to pinpoint the cause of a returned error.

Fixes: 8cd84092d35e ("PM / devfreq: Add resource-managed function for devfreq device")
Cc: stable@vger.kernel.org
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / devfreq: Fix memory leak when fail to register device</title>
<updated>2017-09-27T12:39:24Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-08-24T01:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f5c3fd83284fd8add9308281fc9cfc8afc5e8d97'/>
<id>urn:sha1:f5c3fd83284fd8add9308281fc9cfc8afc5e8d97</id>
<content type='text'>
commit 9e14de1077e9c34f141cf98bdba60cdd5193d962 upstream.

When the devfreq_add_device fails to register deivce, the memory
leak of devfreq instance happen. So, this patch fix the memory
leak issue. Before freeing the devfreq instance checks whether
devfreq instance is NULL or not because the device_unregister()
frees the devfreq instance when jumping to the 'err_init'.
It is to prevent the duplicate the kfee(devfreq).

Fixes: ac4b281176a5 ("PM / devfreq: fix duplicated kfree on devfreq pointer")
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / devfreq: Fix wrong trans_stat of passive devfreq device</title>
<updated>2017-03-12T05:41:44Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-01-31T06:38:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe8f92c7beba2f1c6b1235e52e199eafbe4aa39a'/>
<id>urn:sha1:fe8f92c7beba2f1c6b1235e52e199eafbe4aa39a</id>
<content type='text'>
commit 30582c25a4b4e0a5e456a309fde79b845e9473b2 upstream.

Until now, the trans_stat information of passive devfreq is not updated.
This patch updates the trans_stat information after setting the target
frequency of passive devfreq device.

Fixes: 996133119f57 ("PM / devfreq: Add new passive governor")
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / devfreq: Fix available_governor sysfs</title>
<updated>2017-03-12T05:41:44Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-01-31T06:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2294b771a4b425d9365aabeaff8d33ccd0c0fffe'/>
<id>urn:sha1:2294b771a4b425d9365aabeaff8d33ccd0c0fffe</id>
<content type='text'>
commit bcf23c79c4e46130701370af4383b61a3cba755c upstream.

The devfreq using passive governor is not able to change the governor.
So, the user can not change the governor through 'available_governor' sysfs
entry. Also, the devfreq which don't use the passive governor is not able to
change to 'passive' governor on the fly.

Fixes: 996133119f57 ("PM / devfreq: Add new passive governor")
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / devfreq: Fix the bug of devfreq_add_device when governor is NULL</title>
<updated>2017-01-26T07:24:44Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-12-28T11:52:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ebdfcaa14eef97ae0711823524fd8c8865c05933'/>
<id>urn:sha1:ebdfcaa14eef97ae0711823524fd8c8865c05933</id>
<content type='text'>
commit 73613b16cb5c5d5a659fc8832eff99eead3f9afb upstream.

This patch fixes the bug of devfreq_add_device(). The devfreq device must
have the default governor. If find_devfreq_governor() returns error,
devfreq_add_device() fail to add the devfreq instance.

Fixes: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name)
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&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 / devfreq: exynos-bus: Fix the wrong return value</title>
<updated>2017-01-26T07:24:44Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-12-28T11:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7959835473173638527f3d294fcccb1b1697bd92'/>
<id>urn:sha1:7959835473173638527f3d294fcccb1b1697bd92</id>
<content type='text'>
commit 32dd7731699765f21dbe6df9020e613d4ed73fc3 upstream.

This patch fixes the wrong return value. If devfreq driver requires the wrong
and non-available governor, it is fail. So, this patch returns the error
insead of -EPROBE_DEFER.

Fixes: 403e0689d2a9 (PM / devfreq: exynos: Add support of bus frequency of sub-blocks using passive governor)
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&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 / devfreq: Skip status update on uninitialized previous_freq</title>
<updated>2016-10-10T22:01:20Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-29T12:36:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0563a039c9d35305f4cb2405665130de596d86a'/>
<id>urn:sha1:d0563a039c9d35305f4cb2405665130de596d86a</id>
<content type='text'>
In case devfreq-&gt;previous_freq is still uninitialized in
devfreq_update_status(), i.e. it has value '0', the lookups in
that function fail, eventually leading to some error message:
[    3.041292] devfreq bus_dmc: Couldn't update frequency transition information.

Just skip the statup update in this situation.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Add proper locking around list_del()</title>
<updated>2016-10-10T22:00:20Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2016-09-29T02:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0f376c9cd86c23f37312d37748b233660ef9d9af'/>
<id>urn:sha1:0f376c9cd86c23f37312d37748b233660ef9d9af</id>
<content type='text'>
Use devfreq_list_lock around list_del() to prevent list corruption.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: exynos-nocp: Remove redundant code</title>
<updated>2016-10-10T21:56:22Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2016-09-25T12:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b91f4b361daad1f3e1c60ca5a7861e8b36f9728'/>
<id>urn:sha1:3b91f4b361daad1f3e1c60ca5a7861e8b36f9728</id>
<content type='text'>
load_count/total_count are reset by devfreq_event_get_event(), so
remove the redundant code in exynos_nocp_get_event().

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
[ rjw: Subject/changelog ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
