lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0704101141110.3614-100000@iolanthe.rowland.org>
Date:	Tue, 10 Apr 2007 12:46:11 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Satyam Sharma <satyam.sharma@...il.com>,
	Neil Brown <neilb@...e.de>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	linux-s390 <linux-s390@...r.kernel.org>
Subject: Re: [PATCH (revised)] device_schedule_callback needs a module
 reference

On Tue, 10 Apr 2007, Cornelia Huck wrote:

> Whoops:
> 
> In file included from include/linux/interrupt.h:15,
>                  from include/asm/hardirq.h:18,
>                  from include/linux/hardirq.h:7,
>                  from include/asm-generic/local.h:5,
>                  from include/asm/local.h:1,
>                  from include/linux/module.h:19,
>                  from arch/s390/kernel/time.c:16:
> include/linux/device.h: In function 'device_schedule_callback':
> include/linux/device.h:374: error: 'THIS_MODULE' undeclared (first use in this function)
> include/linux/device.h:374: error: (Each undeclared identifier is reported only once
> include/linux/device.h:374: error: for each function it appears in.)
> 
> Maybe better move the implementation of device_schedule_callback() to
> drivers/base/core.c? (Though I'm not sure why
> include/asm-s390/hardirq.h includes linux/interrupt.h, and e.g.
> include/asm-i386/hardirq.h doesn't.)

I don't think moving device_schedule_callback() is the answer.  For one 
thing, the implementation _has_ to be compiled in the calling module so 
that THIS_MODULE will have the correct value.  If it were compiled in 
drivers/base/core.c then it wouldn't refer to the caller's module.

The real problem is bad nesting of #includes.  Maybe changing 
include/asm-s390/hardirq.h not to include linux/interrupt.h will be 
feasible.

Or perhaps it would be better to move the definition of THIS_MODULE in
linux/module.h up before all the #include lines, since it seems reasonable
that a file indirectly included by module.h might need to use THIS_MODULE.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ