- 08 Oct, 2003 40 commits
-
-
Jamie Lokier authored
This fixes two serious bugs in the futex code. One is a race condition which results in list corruption when FUTEX_REQUEUE is used. It is due to the split locks change introduced in 2.6.0-test6, and oopses when triggered. The other is a security hole. A program can use FUTEX_FD to create futexes on mms or inodes which don't reference them, and when those structures are reused by a different mm or inode, the addresses match. The effect is that a malicious or flawed program can steal wakeups from completely unrelated tasks, causing them to block (or worse if they are counting on the token passing property). These are the specific changes: 1. Each futex_q retains a reference to its key mm or inode. 2. The condition for a futex_q to indicate that it's woken can usually be interrogated lock-free. 3. futex_wait calls the hash function once instead of three times, and usually takes the per-bucket lock once too. 4. When a futex is woken, the per-bucket lock is not usually taken, so that's one less cache line transfer during heavy SMP futex use. 5. The wait condition and barriers in futex_wait are simpler. 5. FUTEX_REQUEUE is fixed. The per-bucket lock juggling is done in such a way that there are no race conditions against the tests for whether a futex is woken. This patch is an combination of patches previously sent to the list. An equivalent patch has been in Andrew Morton's tree for a while, with no failure reports. Also I have been running it on my own SMP box for a while. Conversely, we have received an oops report for the 2.6.0-test6 code, so the fix is needed.
-
Jamie Lokier authored
1. send_sigio() sends to a specific thread, _not_ a process. (It can also send to a process group, but that's not relevant here). This is useful, and should stay as it is. Therefore it makes _no sense_ to call f_setown() with current->tgid. Presently the kernel is inconsistent about it, with some places using current->pid and some others using current->tgid. This patch changes f_setown() calls to use current->pid. 2. In some places, f_setown() is called not at the user's direct request, but as a side effect of another function. Specifically: dnotify and file leases. It is good to allow a program the flexibility to specify a different pid than the default, using F_SETOWN. Presently they can do this after the dnotify or lease call, but there is a small time window when it will be temporarily set to current->tgid (which as pointed out above, is not always right). The window is avoidable if the program can use F_SETOWN prior to the dnotify or lease call. This is exactly what the "force" argument to f_setown() is for, and this patch changes it to zero in those callers. This change is not likely to affect any existing programs.
-
Trond Myklebust authored
Enable NFS_DIRECTIO support now that it has been fixed...
-
Trond Myklebust authored
- Support synchronous directio only. Defer asynchronous directio until it can be made safe. - If read/write exits due to an error, return number of bytes read/written prior to occurrence of the error. - Make sure we mark read pages as dirty in case we're doing zero-copy tricks. Export set_page_dirty_lock() for use by NFS directio. - Ensure we revalidate stale attribute info.
-
Trond Myklebust authored
Add support for synchronous calls to the NFSv3/v4 COMMIT functions.
-
Trond Myklebust authored
It is in any case no longer needed.
-
Trond Myklebust authored
- Use correct credentials in the NFSv4 synchronous read/write code. - Return correct number of read bytes in the NFSv4 synchronous read code. - SunRPC XDR fix: NFSv4 reads when caller requests a non-word aligned number of bytes was broken.
-
bk://kernel.bkbits.net//home/mochel/linux-2.5-powerLinus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
bk://kernel.bkbits.net//home/mochel/linux-2.5-coreLinus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Andi Kleen authored
This just disables some drivers which are clearly not 64bit clean from the configuration for CONFIG_64BIT hosts. Partly from Arnd Bergmann.
-
Andi Kleen authored
From Arnd Bergmann.
-
Andi Kleen authored
Various APIC/ACPI fixes for x86-64. This brings us closer to working out of the box on the now popular VIA and NVidia Nforce3 based Athlon64 and Opteron boards. To be really good we would need more ACPI changes (still waiting for that to be all merged through the usual channels). With this we mostly work with acpi=off at least. Also it syncs us up with bugfixes done in 2.4. - Disable IO-APIC by default on non SMP VIA/NVidia boards. This is a bit of a hack, but needed to work around ACPI bugs. Can be overwriten with "apic". - Add acpi=ht, meaning run ACPI boot setup, but do not enable the interpreter. Same as i386. - Stop MADT parsing early when local APIC or IO-APIC are disabled - Add more option parsing early enough to actually change the boot process - Update documentation for command line options
-
bk://bk.arm.linux.org.uk/linux-2.6-serialLinus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Bjorn Helgaas authored
Patch from Bjorn Helgaas Intel 870 firmware reports an extra zero-length IO port range, which is bogus, as far as I can tell. Ignore it.
-
bk://bk.arm.linux.org.uk/linux-2.6-rmkLinus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Russell King authored
-
Russell King authored
-
Russell King authored
-
Yves Rutschle authored
Patch from Yves Rutschle. This cset allows LART to build again.
-
Benjamin Herrenschmidt authored
This allows PPC to insert resource descriptors later on after boot.
-
http://jfs.bkbits.net/linux-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Dave Kleikamp authored
into shaggy.austin.ibm.com:/home/shaggy/bk/jfs-2.5
-
bk://linux.bkbits.net/linux-2.5Patrick Mochel authored
into kernel.bkbits.net:/home/mochel/linux-2.5-power
-
Patrick Mochel authored
into kernel.bkbits.net:/home/mochel/linux-2.5-core
-
bk://kernel.bkbits.net/lord/xfs-2.6Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Stephen Lord authored
-
Stephen Lord authored
the online backup tools.
-
Stephen Lord authored
this correctly
-
Stephen Lord authored
-
Dave Kleikamp authored
This patch replaces many assert statements, which caused a BUG(), with improved code to mark the superblock dirty and then proceed as specified by the errors= mount flag (as ext2 and ext3 do). JFS's default for the errors option is "remount-ro" in order to prevent addition data corruption when a problem is found. These asserts are usually triggered by on-disk data corruption. By marking the superblock dirty, fsck will perform a complete check on the file system and correct the problems, rather than simply replaying the journal, inviting later trouble. Submitted by Karl Rister & Dave Kleikamp
-
ssh://lord@kernel.bkbits.net/xfs-2.6Stephen Lord authored
into penguin.americas.sgi.com:/src/lord/bitkeeper/xfs-2.6
-
Linus Torvalds authored
-
Stephen Hemminger authored
Replace read/write lock used for HPET timer monotonic_lock with seqlock. Similar to locking used on xtime and monotonic_lock in timers/timer_tsc.c
-
Stephen Hemminger authored
Replace read/write lock used for cyclone timer monotonic_lock with seqlock. Similar to locking used on xtime and monotonic_lock in timers/timer_tsc.c
-
Stephen Lord authored
SGI Modid: 2.5.x-xfs:slinx:159631a
-
bk://kernel.bkbits.net/davem/net-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
David S. Miller authored
-
Andi Kleen authored
-
bk://kernel.bkbits.net/davem/sparc-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Chas Williams authored
-