lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4192179.KJLgHAoH2d@wuerfel>
Date:	Thu, 22 Oct 2015 16:52:33 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Tony Luck <tony.luck@...el.com>
Cc:	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Kees Cook <keescook@...omium.org>,
	linux-kernel@...r.kernel.org, Geliang Tang <geliangtang@....com>
Subject: [PATCH] pstore: remove __exit annotation for ramoops_remove

The remove function of a device driver should not be marked
__exit, because that section gets discarded for built-in drivers,
and it is still possible to manually unbind a driver from a
device, which would result in a runtime error.

The kernel also produces a link error for this when the module
is built-in:

`ramoops_remove' referenced in section `.data' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 2adb611ef932 ("pstore: add pstore unregister")

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 68889a727bc7..319c3a60cfa5 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -578,7 +578,7 @@ fail_out:
 	return err;
 }
 
-static int __exit ramoops_remove(struct platform_device *pdev)
+static int ramoops_remove(struct platform_device *pdev)
 {
 	struct ramoops_context *cxt = &oops_cxt;
 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ