diff options
Diffstat (limited to 'litmus/sched_pfp.c')
-rw-r--r-- | litmus/sched_pfp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c index a96c2b1aa26f..a435ed6621cf 100644 --- a/litmus/sched_pfp.c +++ b/litmus/sched_pfp.c | |||
@@ -692,6 +692,7 @@ static struct litmus_lock* pfp_new_fmlp(void) | |||
692 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); | 692 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); |
693 | if (!sem) | 693 | if (!sem) |
694 | return NULL; | 694 | return NULL; |
695 | memset(sem, 0, sizeof(*sem)); | ||
695 | 696 | ||
696 | sem->owner = NULL; | 697 | sem->owner = NULL; |
697 | init_waitqueue_head(&sem->wait); | 698 | init_waitqueue_head(&sem->wait); |
@@ -971,6 +972,7 @@ static struct litmus_lock* pfp_new_mpcp(int vspin) | |||
971 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); | 972 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); |
972 | if (!sem) | 973 | if (!sem) |
973 | return NULL; | 974 | return NULL; |
975 | memset(sem, 0, sizeof(*sem)); | ||
974 | 976 | ||
975 | sem->owner = NULL; | 977 | sem->owner = NULL; |
976 | init_waitqueue_head(&sem->wait); | 978 | init_waitqueue_head(&sem->wait); |
@@ -1362,6 +1364,7 @@ static struct litmus_lock* pfp_new_pcp(int on_cpu) | |||
1362 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); | 1364 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); |
1363 | if (!sem) | 1365 | if (!sem) |
1364 | return NULL; | 1366 | return NULL; |
1367 | memset(sem, 0, sizeof(*sem)); | ||
1365 | 1368 | ||
1366 | sem->litmus_lock.ops = &pfp_pcp_lock_ops; | 1369 | sem->litmus_lock.ops = &pfp_pcp_lock_ops; |
1367 | pcp_init_semaphore(sem, on_cpu); | 1370 | pcp_init_semaphore(sem, on_cpu); |
@@ -1552,6 +1555,7 @@ static struct litmus_lock* pfp_new_dpcp(int on_cpu) | |||
1552 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); | 1555 | sem = kmalloc(sizeof(*sem), GFP_KERNEL); |
1553 | if (!sem) | 1556 | if (!sem) |
1554 | return NULL; | 1557 | return NULL; |
1558 | memset(sem, 0, sizeof(*sem)); | ||
1555 | 1559 | ||
1556 | sem->litmus_lock.ops = &pfp_dpcp_lock_ops; | 1560 | sem->litmus_lock.ops = &pfp_dpcp_lock_ops; |
1557 | sem->owner_cpu = NO_CPU; | 1561 | sem->owner_cpu = NO_CPU; |