aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
diff options
context:
space:
mode:
authorEzequiel Garcia <[email protected]>2019-06-21 18:39:49 -0300
committerMyungJoo Ham <[email protected]>2019-08-24 20:11:12 +0900
commit7544fd7f384591038646d3cd9efb311ab4509e24 (patch)
tree77e3ad9912bd3e312b8322fb405505ecd8f8af73 /scripts/gcc-plugins/cyc_complexity_plugin.c
parent0a453aca94bd7886bca86cc78ce2771f55152232 (diff)
PM / devfreq: Fix kernel oops on governor module load
A bit unexpectedly (but still documented), request_module may return a positive value, in case of a modprobe error. This is currently causing issues in the devfreq framework. When a request_module exits with a positive value, we currently return that via ERR_PTR. However, because the value is positive, it's not a ERR_VALUE proper, and is therefore treated as a valid struct devfreq_governor pointer, leading to a kernel oops. Fix this by returning -EINVAL if request_module returns a positive value. Fixes: b53b0128052ff ("PM / devfreq: Fix static checker warning in try_then_request_governor") Signed-off-by: Ezequiel Garcia <[email protected]> Reviewed-by: Chanwoo Choi <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions