From 25095b8b9e2e9f9734b7abfd3a54cb0c85b53f0f Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Tue, 26 Apr 2011 18:14:04 -0400 Subject: NULL affinity dereference in C-EDF. C-EDF needs to check to see if affinity is not NULL before checking if affinity-selected CPU is in current cluster. --- litmus/sched_cedf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'litmus') 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( get_nearest_available_cpu(affinity, start, cedf_cpu_entries, -1); /* make sure CPU is in our cluster */ - if(cpu_isset(affinity->cpu, *cluster->cpu_map)) + if(affinity && cpu_isset(affinity->cpu, *cluster->cpu_map)) return(affinity); else return(NULL); -- cgit v1.2.2