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: <20060821213650.dee2a0a3.akpm@osdl.org>
Date:	Mon, 21 Aug 2006 21:36:50 -0700
From:	Andrew Morton <akpm@...l.org>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
Cc:	Christoph Hellwig <hch@...radead.org>,
	lkml <linux-kernel@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Ulrich Drepper <drepper@...hat.com>,
	netdev <netdev@...r.kernel.org>,
	Zach Brown <zach.brown@...cle.com>, tglx@...utronix.de
Subject: Re: [take12 3/3] kevent: Timer notifications.

On Mon, 21 Aug 2006 16:09:34 +0400
Evgeniy Polyakov <johnpol@....mipt.ru> wrote:

> On Mon, Aug 21, 2006 at 12:12:39PM +0100, Christoph Hellwig (hch@...radead.org) wrote:
> > > +static int __init kevent_init_timer(void)
> > > +{
> > > +	struct kevent_callbacks tc = {
> > > +		.callback = &kevent_timer_callback, 
> > > +		.enqueue = &kevent_timer_enqueue, 
> > > +		.dequeue = &kevent_timer_dequeue};
> > 
> > I think this should be static, and the normal style to write it would be:
> > 
> > static struct kevent_callbacks tc = {
> > 	.callback	= kevent_timer_callback,
> > 	.enqueue	= kevent_timer_enqueue,
> > 	.dequeue	= kevent_timer_dequeue,
> > };
> > 
> > also please consider makring all the kevent_callbacks structs const
> > to avoid false cacheline sharing and accidental modification, similar
> > to what we did to various other operation vectors.
> 
> Actually I do not think it should be static, since it is only used for
> initialization and it's members are copied into main structure.
> 

It should be static __initdata a) so we don't need to construct it at
runtime and b) so it gets dropped from memory after initcalls have run.

(But given that kevent_init_timer() also gets dropped from memory after initcalls
it hardly matters).
-
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