From: Geliang Tang <geliangtang@163.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>,
Kees Cook <keescook@chromium.org>,
Tony Luck <tony.luck@intel.com>,
linux-kernel@vger.kernel.org, Geliang Tang <geliangtang@163.com>
Subject: Re: [PATCH] pstore: remove __exit annotation for ramoops_remove
Date: Fri, 23 Oct 2015 00:09:33 +0800 [thread overview]
Message-ID: <20151022160933.GA1893@bogon> (raw)
In-Reply-To: <4192179.KJLgHAoH2d@wuerfel>
On Thu, Oct 22, 2015 at 04:52:33PM +0200, Arnd Bergmann wrote:
> 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
I can't see why it wasn't reported as an error on my machine.
But I think you are right. __exit should't be there.
Acked-by: Geliang Tang <geliangtang@163.com>
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.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;
>
prev parent reply other threads:[~2015-10-22 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 14:52 [PATCH] pstore: remove __exit annotation for ramoops_remove Arnd Bergmann
2015-10-22 16:05 ` Luck, Tony
2015-10-22 16:09 ` Geliang Tang [this message]
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=20151022160933.GA1893@bogon \
--to=geliangtang@163.com \
--cc=anton@enomsg.org \
--cc=arnd@arndb.de \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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