[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240719073912.2743171-1-arnd@kernel.org>
Date: Fri, 19 Jul 2024 09:39:06 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Richard Weinberger <richard@....at>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Vignesh Raghavendra <vigneshr@...com>,
Ben Hutchings <ben.hutchings@...d.be>
Cc: Arnd Bergmann <arnd@...db.de>,
Zhihao Cheng <chengzhihao1@...wei.com>,
Li Nan <linan122@...wei.com>,
Daniel Golle <daniel@...rotopia.org>,
Jens Axboe <axboe@...nel.dk>,
ZhaoLong Wang <wangzhaolong1@...wei.com>,
linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mtd: ubi: remove __exit annotation on ubiblock_exit
From: Arnd Bergmann <arnd@...db.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@...db.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
Powered by blists - more mailing lists