stackvalidate reports the following warnings for __schedule():

  stackvalidate: kernel/sched/core.o: __schedule()+0x3e7: duplicate frame 
pointer save
  stackvalidate: kernel/sched/core.o: __schedule()+0x424: sibling call from 
callable instruction with changed frame pointer
  stackvalidate: kernel/sched/core.o: __schedule()+0x431: call without frame 
pointer save/setup
  stackvalidate: kernel/sched/core.o: __schedule()+0x8b8: frame pointer state 
mismatch
  stackvalidate: kernel/sched/core.o: __schedule()+0x447: frame pointer state 
mismatch

__schedule() is obviously a special case which is allowed to do unusual
things with the frame pointer.  Add it to the stackvalidate whitelist.
This results in no actual changes to the generated code.

Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
 kernel/sched/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 78b4bad10..9f49eae 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -74,6 +74,7 @@
 #include <linux/binfmts.h>
 #include <linux/context_tracking.h>
 #include <linux/compiler.h>
+#include <linux/stackvalidate.h>
 
 #include <asm/switch_to.h>
 #include <asm/tlb.h>
@@ -3059,6 +3060,7 @@ static void __sched __schedule(void)
 
        balance_callback(rq);
 }
+STACKVALIDATE_IGNORE_FUNC(__schedule);
 
 static inline void sched_submit_work(struct task_struct *tsk)
 {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to