diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2011-04-26 18:14:04 -0400 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2011-04-26 18:14:04 -0400 |
| commit | 25095b8b9e2e9f9734b7abfd3a54cb0c85b53f0f (patch) | |
| tree | 56a07ef501aa207f658d96ea8829ebe497e37a87 | |
| parent | bd3b525604304f070ca4a82b5dd6dd1fd0503d97 (diff) | |
NULL affinity dereference in C-EDF.wip-migration-affinity
C-EDF needs to check to see if affinity is not NULL before
checking if affinity-selected CPU is in current cluster.
| -rw-r--r-- | litmus/sched_cedf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index 1538695c1c1d..9678f0433bb7 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c | |||
| @@ -270,7 +270,7 @@ static cpu_entry_t* cedf_get_nearest_available_cpu( | |||
| 270 | get_nearest_available_cpu(affinity, start, cedf_cpu_entries, -1); | 270 | get_nearest_available_cpu(affinity, start, cedf_cpu_entries, -1); |
| 271 | 271 | ||
| 272 | /* make sure CPU is in our cluster */ | 272 | /* make sure CPU is in our cluster */ |
| 273 | if(cpu_isset(affinity->cpu, *cluster->cpu_map)) | 273 | if(affinity && cpu_isset(affinity->cpu, *cluster->cpu_map)) |
| 274 | return(affinity); | 274 | return(affinity); |
| 275 | else | 275 | else |
| 276 | return(NULL); | 276 | return(NULL); |
