All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: value of returning positive error code from module_init()?
Date: Sat, 4 Jul 2009 12:38:26 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.0907041236440.3907@localhost> (raw)


  whoops, i forgot to ask this as well.  accidentally, i returned a
positive value from a module_init() routine, which loaded the module
and generated in /var/log/messages:

...
Jul  4 12:34:43 localhost kernel: hi module being loaded.
Jul  4 12:34:43 localhost kernel: sys_init_module: 'hi'->init
suspiciously returned 42, it should follow 0/-E convention
Jul  4 12:34:43 localhost kernel: sys_init_module: loading module
anyway...
Jul  4 12:34:43 localhost kernel: Pid: 3881, comm: insmod Tainted: G
M       2.6.29.5-191.fc11.x86_64 #1
Jul  4 12:34:43 localhost kernel: Call Trace:
Jul  4 12:34:43 localhost kernel: [<ffffffff8106f33b>]
sys_init_module+0x13e/0x1cd
Jul  4 12:34:43 localhost kernel: [<ffffffff8101133a>]
system_call_fastpath+0x16
...

  i'd never seen that before, i guess because i never returned a
positive error code.  is there a tradition for returning positive
values?  for what purpose?  thanks.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Linked In:                             http://www.linkedin.com/in/rpjday
Twitter:                                       http://twitter.com/rpjday
========================================================================

             reply	other threads:[~2009-07-04 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-04 16:38 Robert P. J. Day [this message]
2009-07-04 18:01 ` value of returning positive error code from module_init()? Robert Hancock

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=alpine.LFD.2.00.0907041236440.3907@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.