Re: [PATCH] Autoregulate vm swappiness cleanup

From: Valdis . Kletnieks
Date: Tue Oct 28 2003 - 12:35:04 EST


On Tue, 28 Oct 2003 17:51:48 +0100, mru@xxxxxx (=?iso-8859-1?q?M=E5ns_Rullg=E5rd?=) said:

> Doing that mistake would give a linker error.

Not necessarily. Consider shared libraries. Load module1.so, load module2.so,
and then load module3.so that has an unresolved reference that both of the
other two happen to have. Oh wow.. results that are dependent on the order of
-l flags in a non-obvious way... And '-z muldefs' is always a good way to
shoot yourself in the foot.....

Yes, it's stupid, yes, it's a mistake - my point is that the design of C makes that
sort of mistake more likely. If there *did* exist a "private to all the pieces of the
module" status similar to the "private to THIS .c 'static'", it wouldn't be anywhere
near the problem.

And don't tell me that the Linux kernel hasn't seen similar issues - a supposedly
private interface that didn't have 'static' because it *was* called from 2 other
.c files in the directory. And then we have to tell people "don't call that interface,
it's private".

Attachment: pgp00001.pgp
Description: PGP signature