lkml.org 
[lkml]   [2001]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CHECKER] 2.4.5-ac4 non-init functions calling init functions
On Wed, May 30, 2001 at 01:08:40PM -0700, Dawson Engler wrote:

> Here are *uninspected* 2.4.5-ac4 results of a checker that warns when a
> non-__init function calls an __init function (suggested by
> jlundell@lobitos.net). There seem to be two cases:
>
> 1. The best case: the caller should actually be an __init function
> as well. This is a performance bug since it won't be freed.
>
> 2. The worst case: some random post-initialization routine
> calls an __init routine which can cause the kernel to go into
> hyperspace if the __init routine's code has been deleted.
>
> The current messages do not differentiate between these two cases. If these
> results are generally useful, I can fix up the checker, but as it now stands
> there shouldn't be that many false positives.
>
> Dawson
> MC linux bug database: http://hands.stanford.edu/linux
>

> /u2/engler/mc/oses/linux/2.4.5-ac4/net/ipv4/netfilter/ip_nat_standalone.c:278:init_or_cleanup: ERROR:INIT: non-init fn 'init_or_cleanup' calling init fn 'ip_nat_rule_init'

This is not a bug. init_or_cleanup is only called from one place with
an argument of 1: from the init() function. If the argument is 0,
as called by the exit() function, the code for calling the ip_nat_rule_setup
is never reached.

So it is definitely not a bug.

Anyway, one should maybe make this a little bit cleaner. Will look into that.

--
Live long and prosper
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:54    [W:0.079 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site