From: Tomek The Messenger <tomekthemessenger@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Unknown symbol reboot_mode
Date: Mon, 23 Mar 2020 11:27:50 +0100 [thread overview]
Message-ID: <CAA4NGyvS=wBr4+y+LFa0C+XbfGDhwesqMwk6aQ0TbVCjDHC_5A@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 620 bytes --]
Hi
When I insert external kernel module which is compiled out of tree I got
error:
root:/run# insmod ./my_module.ko
[ 137.443823] my_module: Unknown symbol reboot_mode (err 0)
I investigated that I have attached in my my_module.c file:
#include <linux/reboot.h>
and in this file we have:
extern enum reboot_mode reboot_mode;
However reboot_mode symbol is not exported with macro EXPORT_SYMBOL_GPL.
Probably this is the reason why symbol is not seen in my module. Then why
the same issue doesn't occur here:
/arch/arm/kernel/setup.c
/arch/arm64/kernel/process.c
Those linux files also use global variable reboot_mode.
[-- Attachment #1.2: Type: text/html, Size: 811 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next reply other threads:[~2020-03-23 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 10:27 Tomek The Messenger [this message]
2020-03-23 10:46 ` Unknown symbol reboot_mode Greg KH
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='CAA4NGyvS=wBr4+y+LFa0C+XbfGDhwesqMwk6aQ0TbVCjDHC_5A@mail.gmail.com' \
--to=tomekthemessenger@gmail.com \
--cc=kernelnewbies@kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).