Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
45e00374
Commit
45e00374
authored
Jun 25, 2013
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-fixes'
* pm-fixes: cpufreq: fix NULL pointer deference at od_set_powersave_bias()
parents
96c9ddae
c2837558
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
drivers/cpufreq/cpufreq_ondemand.c
drivers/cpufreq/cpufreq_ondemand.c
+13
-4
No files found.
drivers/cpufreq/cpufreq_ondemand.c
View file @
45e00374
...
...
@@ -47,6 +47,8 @@ static struct od_ops od_ops;
static
struct
cpufreq_governor
cpufreq_gov_ondemand
;
#endif
static
unsigned
int
default_powersave_bias
;
static
void
ondemand_powersave_bias_init_cpu
(
int
cpu
)
{
struct
od_cpu_dbs_info_s
*
dbs_info
=
&
per_cpu
(
od_cpu_dbs_info
,
cpu
);
...
...
@@ -543,7 +545,7 @@ static int od_init(struct dbs_data *dbs_data)
tuners
->
sampling_down_factor
=
DEF_SAMPLING_DOWN_FACTOR
;
tuners
->
ignore_nice
=
0
;
tuners
->
powersave_bias
=
0
;
tuners
->
powersave_bias
=
default_powersave_bias
;
tuners
->
io_is_busy
=
should_io_be_busy
();
dbs_data
->
tuners
=
tuners
;
...
...
@@ -585,6 +587,7 @@ static void od_set_powersave_bias(unsigned int powersave_bias)
unsigned
int
cpu
;
cpumask_t
done
;
default_powersave_bias
=
powersave_bias
;
cpumask_clear
(
&
done
);
get_online_cpus
();
...
...
@@ -593,11 +596,17 @@ static void od_set_powersave_bias(unsigned int powersave_bias)
continue
;
policy
=
per_cpu
(
od_cpu_dbs_info
,
cpu
).
cdbs
.
cur_policy
;
dbs_data
=
policy
->
governor_data
;
od_tuners
=
dbs_data
->
tuners
;
od_tuners
->
powersave_bias
=
powersave_bias
;
if
(
!
policy
)
continue
;
cpumask_or
(
&
done
,
&
done
,
policy
->
cpus
);
if
(
policy
->
governor
!=
&
cpufreq_gov_ondemand
)
continue
;
dbs_data
=
policy
->
governor_data
;
od_tuners
=
dbs_data
->
tuners
;
od_tuners
->
powersave_bias
=
default_powersave_bias
;
}
put_online_cpus
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment