Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

value of returning positive error code from module_init()?

 
   Linux (Home) -> Kernel RSS
Next:  Bug#46049: What Is Erntoic Power Exchange?  
Author Message
Robert P. J. Day

External


Since: Jul 04, 2009
Posts: 3



(Msg. 1) Posted: Sat Jul 04, 2009 1:25 pm
Post subject: value of returning positive error code from module_init()?
Archived from groups: linux>kernel (more info?)

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
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Robert Hancock

External


Since: Jul 04, 2009
Posts: 3



(Msg. 2) Posted: Sat Jul 04, 2009 3:25 pm
Post subject: Re: value of returning positive error code from module_init()? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 07/04/2009 10:38 AM, Robert P. J. Day wrote:
> 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.

My guess would be no, hence the warning you're not supposed to do it..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[Patch] quota: fix error code for ext2_new_inode() - Hi Honza! the quota check in ext2_new_inode() returns ENOSPC where IMHO it should return EDQUOT instead. here is a trivial patch to fix that ... rationale: ext3, reiser, udf and ufs do similar checks and already return EDQUOT best, Herbert ..

[PATCH] [MMC] Proper check of SCR error code - The routine reading the SCR wasn't paying proper attention to the error codes returned from the driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> --- drivers/mmc/mmc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --...

[patch] Fix a bit/byte counting error in the MMC/SD code - This fixes what looks like a bit/byte counting error in the MMC/SD code which was causing data corruption (in the -mm tree). Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Index: linux-2.6.12/drivers/mmc/mmc.c..

[PATCH] Separate tainted code from panic code - * Create kernel/tainted.c and include/linux/tainted.h * Move all tainted-related stuff from kernel/panic.c and include/linux/kernel.h there. * #include <linux/tainted.h> where needed. * Switch #include <linux/kernel.h> to #include <linux...

[PATCH] Update an code example - From: Henrik Kretzschmar <henne@nachtwindheim.de> Update an example function in the deviceiobook to be in sync with actual qla1280c . The change in the driver happend in Aug-2005 and is a bit clearer. Signed-off-by: Henrik Kretzschmar..
       Linux (Home) -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact