[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061206002403.GA4587@ftp.linux.org.uk>
Date: Wed, 6 Dec 2006 00:24:03 +0000
From: Al Viro <viro@....linux.org.uk>
To: David Howells <dhowells@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
Matthew Wilcox <matthew@....cx>,
Linus Torvalds <torvalds@...l.org>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC] timers, pointers to functions and type safety
On Mon, Dec 04, 2006 at 12:22:44PM +0000, David Howells wrote:
> Ingo Molnar <mingo@...e.hu> wrote:
>
> > the question is: which is more important, the type safety of a
> > container_of() [or type cast], which if we get it wrong produces a
> > /very/ trivial crash that is trivial to fix
The hell it is. You get wrong fields of a big struct read and modified.
Silently.
Besides, I can show you fsckloads of cases when we do *NOT* pass a
pointer to struct the timer is embedded into. Some of them called directly
(and no, the thing they get as argument doesn't point to anything that
would contain a timer_list).
> > structure size all around the kernel? I believe the latter is more
> > important.
>
> Indeed yes.
Guys, please, look at actual users of that stuff.
-
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