aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--litmus/sched_pfp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index 0e875a3b5cba..e3c3bd770efa 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -1292,7 +1292,9 @@ int pfp_pcp_open(struct litmus_lock* l, void* __user config)
1292 /* we need to know the real-time priority */ 1292 /* we need to know the real-time priority */
1293 return -EPERM; 1293 return -EPERM;
1294 1294
1295 if (get_user(cpu, (int*) config)) 1295 if (!config)
1296 cpu = get_partition(t);
1297 else if (get_user(cpu, (int*) config))
1296 return -EFAULT; 1298 return -EFAULT;
1297 1299
1298 /* make sure the resource location matches */ 1300 /* make sure the resource location matches */
@@ -1613,7 +1615,9 @@ static long pfp_allocate_lock(struct litmus_lock **lock, int type,
1613 1615
1614 case PCP_SEM: 1616 case PCP_SEM:
1615 /* Priority Ceiling Protocol */ 1617 /* Priority Ceiling Protocol */
1616 if (get_user(cpu, (int*) config)) 1618 if (!config)
1619 cpu = get_partition(current);
1620 else if (get_user(cpu, (int*) config))
1617 return -EFAULT; 1621 return -EFAULT;
1618 1622
1619 if (!cpu_online(cpu)) 1623 if (!cpu_online(cpu))