From: Arnd Bergmann <arnd@kernel.org>
To: reiserfs-devel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] reiserfs: avoid objtool warning after panic
Date: Thu, 15 Dec 2022 17:27:53 +0100 [thread overview]
Message-ID: <20221215162759.3883282-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
Calling reiserfs_panic() leaves the calling function in an
undefined state that objtool complains about, because of the
__noreturn attribute:
fs/reiserfs/do_balan.o: warning: objtool: balance_leaf+0x109fb: stack state mismatch: cfa1=4+576 cfa2=4+584
fs/reiserfs/ibalance.o: warning: objtool: balance_internal+0x6099: stack state mismatch: cfa1=4+512 cfa2=4+536
fs/reiserfs/ibalance.o: warning: objtool: internal_insert_key+0xa1c: stack state mismatch: cfa1=4+224 cfa2=4+216
Avoid that by removing the attribute, at the possible cost of
a few extra cycles. Mark the panic and error functions as __cold
instead to at least give the compiler a hint that this is not
the fast path.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/reiserfs/reiserfs.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 3aa928ec527a..1c22f48235c2 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -3185,12 +3185,11 @@ int fix_nodes(int n_op_mode, struct tree_balance *tb,
void unfix_nodes(struct tree_balance *);
/* prints.c */
-void __reiserfs_panic(struct super_block *s, const char *id,
- const char *function, const char *fmt, ...)
- __attribute__ ((noreturn));
+void __cold __reiserfs_panic(struct super_block *s, const char *id,
+ const char *function, const char *fmt, ...);
#define reiserfs_panic(s, id, fmt, args...) \
__reiserfs_panic(s, id, __func__, fmt, ##args)
-void __reiserfs_error(struct super_block *s, const char *id,
+void __cold __reiserfs_error(struct super_block *s, const char *id,
const char *function, const char *fmt, ...);
#define reiserfs_error(s, id, fmt, args...) \
__reiserfs_error(s, id, __func__, fmt, ##args)
--
2.35.1
next reply other threads:[~2022-12-15 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 16:27 Arnd Bergmann [this message]
2022-12-15 22:31 ` [PATCH] reiserfs: avoid objtool warning after panic kernel test robot
2022-12-16 8:00 ` Arnd Bergmann
2022-12-15 22:51 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-12-15 22:41 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221215162759.3883282-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.