From 057dcfdb1f0dfe07ec3e030b238e46a69d249a1e Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Thu, 6 Sep 2012 14:25:41 +0200 Subject: P-FP: prevent misuse of priority queue Stop hard-to-detect out-of-bounds errors early. --- include/litmus/fp_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/litmus/fp_common.h b/include/litmus/fp_common.h index dd1f7bf1e347..19356c0fa6c1 100644 --- a/include/litmus/fp_common.h +++ b/include/litmus/fp_common.h @@ -57,7 +57,7 @@ static inline unsigned int fpq_find(struct fp_prio_queue* q) static inline void fp_prio_add(struct fp_prio_queue* q, struct task_struct* t, unsigned int index) { - + BUG_ON(index >= LITMUS_MAX_PRIORITY); BUG_ON(bheap_node_in_heap(tsk_rt(t)->heap_node)); fpq_set(q, index); -- cgit v1.2.2