Linux Core Kernel Commentary: First Edition Errata

Most Recent Change: Sat Sep 8 04:48:37 2001 UTC.

I was dreaming when I wrote this; forgive me if it goes astray. -- Prince
This page lists all known errata in the first edition of my book, Linux Core Kernel Commentary (the second-edition errata listing is also available now). If you find any errata in the book, no matter how trivial, please email me to let me know. Thanks.

Technical Errors

(Including typos or editing mistakes that caused technical errors.)
PageColumnDescription
672Line 6178 is missing a trailing \. [Thanks to Chris Sears for this correction.]
721Line 6639 is missing a trailing \. [Thanks to Chris Sears for this correction.]
4281"__wait_queue" was supposed to read "__wait_event". [Thanks to Rodrigo Real for this correction.]
4291On the last line in this column, "wait_event" was supposed to read "wait_event_interruptible". [Thanks to Chris Sears for this correction.]
4331These instructions are correct, but they assume that there is not already a directory named "linux" in the same directory as "linux-2.2.5" and "linux-my". I should have noted that in the text.
4452I inserted a line reference for the wrong cpu_idle in the second-to-last paragraph. To clarify, what really happens is this:
  1. Line 19886 calls the cpu_idle at line 19772 (not the one at 2014, as incorrectly stated in the book).
  2. This cpu_idle, which is the platform-generic cpu_idle, calls the idle system call -- that ends up being sys_idle, at line 2064.
  3. sys_idle calls the platform-specific cpu_idle -- for a UP x86 system, this is line 2014.
That's how it works in a UP kernel. It's simpler in an SMP kernel: the cpu_idle at line 19772 is #ifdefd out, so line 19886 calls directly to the platform-specific cpu_idle (for the x86, line 2044). [Thanks to George Voon Hian Hee for bringing this mistake to my attention -- twice. :-)]
4483The responsibility for an orphaned process is not passed up a chain to init (via the orphan's grandparent, great-grandparent, etc.); instead, init becomes immediately responsible for an orphaned process. [Thanks to jc for this correction.]
4602Since SI_PAD_SIZE includes a division by sizeof(int), _pad actually pads siginfo_t to 128 bytes, not 512. [Thanks to Ross Patterson for this correction.]
4642"SIGSTP" should be "SIGTSTP" -- this error is repeated at page 466, column 3, and at page 483, column 1. [Thanks to Ross Patterson for this correction.]
4662"notify_parent (line 3393)" should read "notify_parent (line 28548)". [Thanks to Ross Patterson for this correction.]
4691"and blocks any other signals as defined by these" should read "temporarily narrowing the set of blocked signals as specified by these". [Thanks to Ross Patterson for this correction.]
4693"blocked.set" should be "blocked.sig". [Thanks to Ross Patterson for this correction.]
4712In Figure 6.1, "irc_desc_t" should read "irq_desc_t". [Thanks to Chris Sears for this correction.]
4773The section titled "Timer Queues" should be titled "The Timer Queue" (or perhaps "Task Queues"). [Thanks to Chris Sears for this correction.]
4811In Figure 7.2, one of the arrows labeled "next_hash" is double-ended but should be single-ended. Also, one of the ends is on the wrong node. The original was uglier but had this right.
4812"As with next_task" is a typo; it should read "As with prev_task". [Thanks to Ross Patterson for this correction.]
4821-2In Figure 7.3, the "p_cptr" link from the "Me" node should be pointing in the opposite direction (from "Parent" to "Me," not the other way around). Again, the original had it right. (Though this is hard to tell if you don't already know it, which is probably what led to the mistake in the first place.)
4852"cat x >/tmp/joined" should read "cat * >/tmp/joined".
4872"It continues performing sanity checks up to line 9147" is overenthusiastic; the sanity checks actually end at 9124. The second part of the same sentence is also incorrect, as the code is stripping the ".class" from the end of the filename, not just checking for ".class". [Thanks to Chris Sears for this correction.]
4991The phrase "three orders of magnitude -- a factor of 1,000" should be "six orders of magnitude -- a factor of 1,000,000". Ouch, this one was super-dumb; and just to make matters worse, I repeated the mistake twice (page 500, column 1, and page 510, column 1). [Thanks to Chris Sears for this correction.]
5002Oops, a couple of off-by-one errors: 0x4000000 should be 0x3ffffff, and 0xc0000000 should be 0xbfffffff. [Thanks to Ross Patterson for this correction, and to Nate E. Kidwell for correcting my mistake in my original correction (my error, not Patterson's).]
5071"A page's read/write protections were violated" should add "and the page was not designated copy-on-write".
5082This may not strictly qualify as an erratum, but it's at least a useful note: the reason the kernel's version of this code and my proposed version were "[i]n my tests ... about equally fast" (as I wrote) is that they generate identical code. That clears up that mystery. [Thanks to Dan Kegel for prompting me to revisit this. Dan also points out that the kernel's version uses more constant-only subexpressions than mine, making it easier for a compiler to optimize the code -- my version depends on gcc to do more sophisticated optimizations, which, happily, it does.]
5122For some reason, I claimed that version 2 swap files are, like version 1 swap files, limited to about 128 MB. I have no idea why I said this (or why I repeated the error in the next column), since I knew better, and since the code plainly contradicts me, as does the man page. Ouch. The actual maximum size for version 2 swap files is about 2 GB on the x86.
5152The "return 0" should obviously have been indented and followed by a semicolon.
5212I should have added that the relatedness constraint applies only to anonymous pipes; processes communicating through a named pipe need not be related. I should also have made it clear that pipe-based bidirectional communication requires two pipes.
5221The boldfaced "b" on the first line of this column is supposed to read "sizeof(struct msg)".
5223"struct msgqid_ds" should read "struct msqid_ds".
5261"msgid" should read "msqid". [Thanks to Ross Patterson for this correction.]
5312In Figure 9.2, the box labeled "struct msqid_ds" is supposed to be labeled "struct semid_ds".
5501"smp_send_reschedule (line 26205)" should read "smp_send_reschedule (line 5019)". [Thanks to Ross Patterson for this correction.]
5511"both call update_process_times" should read "both call update_one_process". [Thanks to Ross Patterson for this correction.]

Typos, Glitches, Gaffes, and Other Infelicities

PageColumnDescription
xv1The phrase "To provide a printed version of the complete source for a recent version of the server" is quite wrong; it should have read something like "To provide a printed version of the source for a critical subset of the core kernel." (I adapted the introduction from the one written for the Apache book -- oops.)
4193The phrase "a better user file system (UFS)" was supposed to read "a better file system (UFS, the user file system)".

On this point, correspondent George Voon Hian Hee reports that several sources he's investigated credit UFS to AT&T, not to BSD. While different sources (online and off) assign UFS to different inventors, majority opinion seems to credit UFS to AT&T -- and in any case, FFS (the Berkeley Fast Filesystem), not UFS, was the innovative file system I meant to mention in the book. [Thanks to George Voon Hian Hee for this correction.]

4203I wrote, "The Linux kernel has even been selected as the basis of the new OS to be shipped by Amiga." That is technically true, but shortly after it was too late to change the chapter, Amiga dropped its plans for that new OS (not because of Linux, I'm sure!). Since then, the Amiga OS plans have continued to mutate faster than I can track, a sad story all too familiar to long-time Amiga fans (including myself).
4301"Linux distributions" should have read "GNU/Linux distributions" in this case, since I'm not talking about the kernel alone.
4311There's an unwanted space in "sys_create_column". [Thanks to an anonymous correspondent for this correction.]
4312"Under all circumstances" offends my ear: "in all circumstances" would have been better. (OK, so this is picky even for me.)
4332Kernel-traffic's URL changed shortly after press time (though the one given in the book still works). It's now http://kt.linuxcare.com/.
4362In the sentence "Understanding that speed ...", the ";" should have been a ",". (The editor didn't seem to understand the sentence, so it got "fixed." Argh! But in all fairness, when even a trained editor doesn't understand your sentence, maybe you should rewrite it.)
4452The phrase "and then briefly put" should read "and then briefly puts" (it's smp_boot_cpus that's putting, not the data structures).
4463In "option=value", both words should be italicized. Ditto for "envar=value" on 447/1.
4473The word "whereby" was supposed to be "where".
4511There's an extraneous period after "forth".
4533"If so, jump to the reschedule label" should have read "jumps" instead of "jump".
4553In the first paragraph in this column, there should have been a comma after "Indeed".
4562There should be no comma after "Doing it this way".
4671There should be no comma after "hence".
4672The phrase "that it may be modified" should read "that may be modified".
4683The phrase "every time the handler is involved" should read "every time the handler is invoked".
4753The word "together" is incorrectly hyphenated.
4861There should be no comma after "which we need".
4971"exit with an error" should read "exits with an error".
5001"The standard distribution Linux kernel" should read "The standard distribution of the Linux kernel".
5071"In 0xf00fc7C8", the "C" obviously should have been lower-case.
5072"I haven't seen this case yet" should read "We haven't seen this case yet".
5141"If at least one page is not being freed" is ambiguous; it should read "If the region to be freed is smaller than one page".
5141"see line 33361 for example" should read "see line 33361, for example".
5152In keeping with the rest of the book, "0xC0000000" should read "0xc0000000".
5182"fill out a local variable" should read "fills out a local variable".
5261"over 9 quintillion" is correct, but a stronger statement can be made: it is also over 18 quintillion.
5353"the reader seeing inconsistent data" should read "the reader's seeing inconsistent data".
5381A space crept into "get_unmapped_area".
5492"It generally puts" should read "They generally put".

Up.

[Support Free Speech Online] [Best Viewed with Any Browser] [Made with Emacs!] [Boycott Micro$oft] [Page Counter]

lckc@ScottMaxwell.org