From: Arnd Bergmann <arnd@kernel.org>
To: Richard Weinberger <richard@nod.at>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Ben Hutchings <ben.hutchings@mind.be>
Cc: Arnd Bergmann <arnd@arndb.de>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Li Nan <linan122@huawei.com>,
Daniel Golle <daniel@makrotopia.org>,
Jens Axboe <axboe@kernel.dk>,
ZhaoLong Wang <wangzhaolong1@huawei.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mtd: ubi: remove __exit annotation on ubiblock_exit
Date: Fri, 19 Jul 2024 09:39:06 +0200 [thread overview]
Message-ID: <20240719073912.2743171-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
Calling an __exit function from an __init function leads to undefined behavior
when the drier is built-in and the __exit functions are dropped from the
object:
WARNING: modpost: drivers/mtd/ubi/ubi: section mismatch in reference: ubi_init+0xbe (section: .init.text) -> ubiblock_exit (section: .exit.text)
ERROR: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
Remove the now incorrect annotation.
Fixes: 72f3d3daddd7 ("mtd: ubi: Restore missing cleanup on ubi_init() failure path")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mtd/ubi/block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
index bf7308e8ec2f..60d0155be869 100644
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -670,7 +670,7 @@ int __init ubiblock_init(void)
return ret;
}
-void __exit ubiblock_exit(void)
+void ubiblock_exit(void)
{
ubi_unregister_volume_notifier(&ubiblock_notifier);
ubiblock_remove_all();
--
2.39.2
next reply other threads:[~2024-07-19 7:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 7:39 Arnd Bergmann [this message]
2024-07-19 8:09 ` Zhihao Cheng
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=20240719073912.2743171-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=ben.hutchings@mind.be \
--cc=chengzhihao1@huawei.com \
--cc=daniel@makrotopia.org \
--cc=linan122@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=wangzhaolong1@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®