objtool: Add __kunit_abort() to noreturns
authorJosh Poimboeuf <jpoimboe@kernel.org>
Fri, 2 Jun 2023 17:54:53 +0000 (10:54 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 2 Jun 2023 19:12:24 +0000 (21:12 +0200)
Fixes a bunch of warnings like:

  drivers/input/tests/input_test.o: warning: objtool: input_test_init+0x1cb: stack state mismatch: cfa1=4+64 cfa2=4+56
  lib/kunit/kunit-test.o: warning: objtool: kunit_log_newline_test+0xfb: return with modified stack frame
  ...

Fixes: 260755184cbd ("kunit: Move kunit_abort() call out of kunit_do_failed_assertion()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230602175453.swsn3ehyochtwkhy@treble
tools/objtool/noreturns.h

index cede6068ddf6cd72ea7451ff6ce50b47bfb837a9..1514e84d5cc400e661cb59023c0cec04d9321d43 100644 (file)
@@ -7,6 +7,7 @@
  * Yes, this is unfortunate.  A better solution is in the works.
  */
 NORETURN(__invalid_creds)
+NORETURN(__kunit_abort)
 NORETURN(__module_put_and_kthread_exit)
 NORETURN(__reiserfs_panic)
 NORETURN(__stack_chk_fail)