commit f194d132e4971111f85c18c96067acffb13cee6d Merge: 09f3eca... 982286d... Author: Linus Torvalds Date: Thu Dec 6 14:14:16 2007 -0800 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: suspend: old debugging hacks sneaked back Freezer: Fix JFFS2 garbage collector freezing issue (rev. 2) HWMON: coretemp, suspend fix Freezer: Fix APM emulation breakage Freezer: Fix s2disk resume from initrd commit 982286d1b8e438f595cdc9304cc4c185c7b90a39 Merge: 9213148... 8baabde... Author: Len Brown Date: Thu Dec 6 16:52:00 2007 -0500 Pull bugzilla-9345 into release branch commit 921314811be704252ad2caa8dde507d4c421ddc4 Merge: f7a5274... cb43c54... Author: Len Brown Date: Thu Dec 6 16:51:29 2007 -0500 Pull apm-freeze-fix into release branch commit f7a5274d7dde0022dedfb6bca5b4438bbf30e9ce Merge: ceaeee6... 74d0f33... Author: Len Brown Date: Thu Dec 6 16:26:52 2007 -0500 Pull suspend-2.6.24 into release branch commit 74d0f3338fbb3c69894968df1fedaf10c88cd0e4 Author: Pavel Machek Date: Thu Dec 6 09:50:40 2007 +0100 ACPI: suspend: old debugging hacks sneaked back Old debugging hack sneaked back during x86 merge, this removes it. Signed-off-by: Pavel Machek Acked-by: Rafael J. Wysocki Signed-off-by: Len Brown commit 09f3eca2b7e2762e223fdd359f9d0f6303a85f6c Merge: e1b7361... bee86f1... Author: Linus Torvalds Date: Thu Dec 6 12:27:09 2007 -0800 Merge branch 'for-2.6.24' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc * 'for-2.6.24' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc: [POWERPC] Fix swapper_pg_dir size when CONFIG_PTE_64BIT=y on FSL_BOOKE commit e1b7361f32fdf60f575566ddef8a36b33086631d Merge: ceaeee6... 84f4506... Author: Linus Torvalds Date: Thu Dec 6 12:26:17 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: [PARISC] lba_pci: pci_claim_resources disabled expansion roms [PARISC] print more than one character at a time for pdc console [PARISC] Update parisc-linux MAINTAINERS entries [PARISC] timer interrupt should not be IRQ_DISABLED Revert "[PARISC] import necessary bits of libgcc.a" commit bee86f14d51a5a9a3b1897e301da1e415df0ba23 Author: Kumar Gala Date: Thu Dec 6 13:11:04 2007 -0600 [POWERPC] Fix swapper_pg_dir size when CONFIG_PTE_64BIT=y on FSL_BOOKE The size of swapper_pg_dir is 8k instead of 4k when using 64-bit PTEs (CONFIG_PTE_64BIT). This was reported by Cedric Hombourger Signed-off-by: Kumar Gala commit ceaeee6ad6c2a24bf37d9f426414cf3007432352 Merge: 3743d33... 5e2862e... Author: Linus Torvalds Date: Thu Dec 6 09:43:26 2007 -0800 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Oprofile: Fix computation of number of counters. [MIPS] Alchemy: fix IRQ bases [MIPS] Alchemy: replace ffs() with __ffs() [MIPS] BCM1480: Fix interrupt routing, take 2. commit 3743d33edf4e49376384822c57c4ee5cdf2d32f8 Author: Linus Torvalds Date: Thu Dec 6 09:41:12 2007 -0800 Tiny clean-up of OPROFILE/KPROBES configuration Make the Kconfig.instrumentation file a bit easier on the eyes, and use the new ARCH_SUPPORTS_OPROFILE for x86[-64]. Signed-off-by: Linus Torvalds commit 84f4506cb788d85a50c97b399f2999f90e6272b0 Author: Kyle McMartin Date: Thu Dec 6 09:38:26 2007 -0800 [PARISC] lba_pci: pci_claim_resources disabled expansion roms radeonfb was HPMC-ing my C8000 by trying to map its expansion rom from IO_VIEW, instead of PA_VIEW. Fix seems to be to ensure that its disabled ROM is properly inserted into the resource tree. FIXME: this will result in a whinging printk for cards which share expansion ROMS, such as a quad tulip. Thankfully, it isn't harmful. Signed-off-by: Kyle McMartin commit 00a5825332769706eb2e276c101dd20269a53992 Author: Ralf Baechle Date: Thu Dec 6 16:53:19 2007 +0000 Fix oprofile configuration breakage The cleanup 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9 broke the oprofile configuration for MIPS by allowing oprofile support to be built for kernel models where oprofile doesn't have a chance in hell to work. Just a dependecy list on a number of architectures is - surprise - broken and should as per past discussions probably in most considered to be broken in most cases. So I introduce a dependency for the oprofile configuration on ARCH_SUPPORTS_OPROFILE. Signed-off-by: Ralf Baechle Signed-off-by: Linus Torvalds commit 721fdf34167580ff98263c74cead8871d76936e6 Author: Kyle McMartin Date: Thu Dec 6 09:32:15 2007 -0800 [PARISC] print more than one character at a time for pdc console There's really no reason not to print more than one character at a time to the PDC console... Booting is measurably speedier, and now I don't have to watch individual characters get drawn. Signed-off-by: Kyle McMartin commit ac6aecbf0541ca277e6492fdf7c91e46e1fc4171 Author: Kyle McMartin Date: Mon Dec 3 22:04:34 2007 +0000 [PARISC] Update parisc-linux MAINTAINERS entries List changed & reordered so I'm more likely to see patches... Signed-off-by: Kyle McMartin commit 2421ba5b57ddbc3a972b9d6fb884817c39d2fff7 Author: Kyle McMartin Date: Wed Nov 28 02:17:53 2007 -0500 [PARISC] timer interrupt should not be IRQ_DISABLED The timer interrupt had accidentally been marked IRQ_DISABLED since IRQ_PER_CPU had been OR-ed in, instead of set. This had been working by accident for quite a while. Commit c642b8391cf8efc3622cc97329a0f46e7cbb70b8 changed the behaviour of IRQ_PER_CPU interrupts, which previously weren't checked for IRQ_DISABLED. Signed-off-by: Kyle McMartin commit 9d29213fd469c4c409a30b8dbb88c4efcba6e0a6 Author: Kyle McMartin Date: Wed Nov 28 02:07:35 2007 -0500 Revert "[PARISC] import necessary bits of libgcc.a" This reverts commit efb80e7e097d0888e59fbbe4ded2ac5a256f556d, it turned out to cause sporadic problems with the timer interrupt on 32-bit kernels. Needs more investigation. Signed-off-by: Kyle McMartin commit 5e2862eb5a263a0339a85545d96fb20995d67b1f Author: Ralf Baechle Date: Thu Dec 6 09:12:28 2007 +0000 [MIPS] Oprofile: Fix computation of number of counters. VSMP kernels will split the available performance counters between the two processors / cores. But don't do this when we're not on a VSMP system ... Signed-off-by: Ralf Baechle commit 0e8120e0946152720af3d73691550bba108a3826 Author: Sergei Shtylyov Date: Wed Dec 5 19:08:26 2007 +0300 [MIPS] Alchemy: fix IRQ bases Do what the commits commits f3e8d1da389fe2e514e31f6e93c690c8e1243849 and 9d360ab4a7568a8d177280f651a8a772ae52b9b9 failed to achieve -- actually convert the Alchemy code to irq_cpu. Signed-off-by: Sergei Shtylyov Signed-off-by: Ralf Baechle commit 4b36673284f86c649b9d9ec5818b1912fde556b3 Author: Sergei Shtylyov Date: Wed Dec 5 19:08:24 2007 +0300 [MIPS] Alchemy: replace ffs() with __ffs() Fix havoc wrought by commit 56f621c7f6f735311eed3f36858b402013023c18 -- au_ffs() and ffs() are equivalent, that patch should have just replaced one with another. Now replace ffs() with __ffs() which returns an unbiased bit number. Signed-off-by: Sergei Shtylyov Signed-off-by: Ralf Baechle commit f435a91e66e7776f0c73fca5af3cb87c61130ed6 Author: Ralf Baechle Date: Thu Dec 6 17:15:57 2007 +0000 [MIPS] BCM1480: Fix interrupt routing, take 2. Signed-off-by: Ralf Baechle commit 7e1fb765c613298d861f80fa18af26df87a4ec19 Merge: ad658ce... cde898f... Author: Linus Torvalds Date: Wed Dec 5 09:27:46 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: futex: correctly return -EFAULT not -EINVAL lockdep: in_range() fix lockdep: fix debug_show_all_locks() sched: style cleanups futex: fix for futex_wait signal stack corruption commit ad658cec232771b11e95bb5f0d639d48f898a1f2 Merge: 2a1292b... 5a211a5... Author: Linus Torvalds Date: Wed Dec 5 09:26:52 2007 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6: VM/Security: add security hook to do_brk Security: round mmap hint address above mmap_min_addr security: protect from stack expantion into low vm addresses Security: allow capable check to permit mmap or low vm space SELinux: detect dead booleans SELinux: do not clear f_op when removing entries commit 2a1292b36ba106b9b7f030d3fa130f5f634fd8f0 Merge: 2cfae27... 621544e... Author: Linus Torvalds Date: Wed Dec 5 09:26:13 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: [LRO]: fix lro_gen_skb() alignment [TCP]: NAGLE_PUSH seems to be a wrong way around [TCP]: Move prior_in_flight collect to more robust place [TCP] FRTO: Use of existing funcs make code more obvious & robust [IRDA]: Move ircomm_tty_line_info() under #ifdef CONFIG_PROC_FS [ROSE]: Trivial compilation CONFIG_INET=n case [IPVS]: Fix sched registration race when checking for name collision. [IPVS]: Don't leak sysctl tables if the scheduler registration fails. commit 2cfae2739bda8fc5d934977c0ab19f6df1dd6d6c Merge: 97bd791... 9cb1200... Author: Linus Torvalds Date: Wed Dec 5 09:25:53 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Update defconfig. [SPARC]: Add missing of_node_put [SPARC64]: check for possible NULL pointer dereference [SPARC]: Add missing "space" [SPARC64]: Add missing "space" [SPARC64]: Add missing pci_dev_put [SYSCTL_CHECK]: Fix typo in KERN_SPARC_SCONS_PWROFF entry string. [SPARC64]: Missing mdesc_release() in ldc_init(). commit 97bd7919e2c1445dabbcc2686795dbb52316b923 Author: Al Viro Date: Wed Dec 5 08:46:47 2007 +0000 remove nonsense force-casts from ocfs2 endianness annotations in networking code had been in place for quite a while; in particular, sin_port and s_addr are annotated as big-endian. Code in ocfs2 had __force casts added apparently to shut the sparse warnings up; of course, these days they only serve to *produce* warnings for no reason whatsoever... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 7e46aa5c8cb1347853de9ec86f3fa440f9dc9d77 Author: Al Viro Date: Wed Dec 5 08:32:52 2007 +0000 regression: bfs endianness bug BFS_FILEBLOCKS() expects struct bfs_inode * (on-disk data, with little- endian fields), not struct bfs_inode_info * (in-core stuff, with host- endian ones). It's a macro and fields with the right names are present in bfs_inode_info, so it compiles, but on big-endian host it gives bogus results. Introduced in commit f433dc56344cb72cc3de5ba0819021cec3aef807 ("Fixes to the BFS filesystem driver"). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 3c50b3683a8efbf3b4b314209d86aed1a0c44d5b Author: Al Viro Date: Wed Dec 5 08:38:56 2007 +0000 fcrypt endianness misannotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 79901a9738d75faba0f08547ff17d676af2f5be3 Author: Al Viro Date: Wed Dec 5 08:36:15 2007 +0000 no need to mess with KBUILD_CFLAGS on uml-i386 anymore Now that X86_32 is provided on Kconfig level for uml-i386, there's no need to play with it explicitly on Makefile level anymore. Signed-off-by: Al Viro Acked-by: Jeff Dike Signed-off-by: Linus Torvalds commit 9b5e6857b3f3acc8ab434e565b7ec87bf9f9b53c Author: Al Viro Date: Wed Dec 5 08:24:38 2007 +0000 regression: cifs endianness bug access_flags_to_mode() gets on-the-wire data (little-endian) and treats it as host-endian. Introduced in commit e01b64001359034d04c695388870936ed3d1b56b ("[CIFS] enable get mode from ACL when cifsacl mount option specified") Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ecaf18c15aac8bb9bed7b7aa0e382fe252e275d5 Author: Eric Paris Date: Tue Dec 4 23:45:31 2007 -0800 VM/Security: add security hook to do_brk Given a specifically crafted binary do_brk() can be used to get low pages available in userspace virtual memory and can thus be used to circumvent the mmap_min_addr low memory protection. Add security checks in do_brk(). Signed-off-by: Eric Paris Acked-by: Alan Cox Cc: Stephen Smalley Cc: James Morris Cc: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 294a80a8ed004b383ab214837e1c05ca4098a717 Author: Vegard Nossum Date: Tue Dec 4 23:45:30 2007 -0800 SLUB's ksize() fails for size > 2048 I can't pass memory allocated by kmalloc() to ksize() if it is allocated by SLUB allocator and size is larger than (I guess) PAGE_SIZE / 2. The error of ksize() seems to be that it does not check if the allocation was made by SLUB or the page allocator. Reviewed-by: Pekka Enberg Tested-by: Tetsuo Handa Cc: Christoph Lameter , Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5a622f2d0f86b316b07b55a4866ecb5518dd1cf7 Author: Alexey Dobriyan Date: Tue Dec 4 23:45:28 2007 -0800 proc: fix proc_dir_entry refcounting Creating PDEs with refcount 0 and "deleted" flag has problems (see below). Switch to usual scheme: * PDE is created with refcount 1 * every de_get does +1 * every de_put() and remove_proc_entry() do -1 * once refcount reaches 0, PDE is freed. This elegantly fixes at least two following races (both observed) without introducing new locks, without abusing old locks, without spreading lock_kernel(): 1) PDE leak remove_proc_entry de_put ----------------- ------ [refcnt = 1] if (atomic_read(&de->count) == 0) if (atomic_dec_and_test(&de->count)) if (de->deleted) /* also not taken! */ free_proc_entry(de); else de->deleted = 1; [refcount=0, deleted=1] 2) use after free remove_proc_entry de_put ----------------- ------ [refcnt = 1] if (atomic_dec_and_test(&de->count)) if (atomic_read(&de->count) == 0) free_proc_entry(de); /* boom! */ if (de->deleted) free_proc_entry(de); BUG: unable to handle kernel paging request at virtual address 6b6b6b6b printing eip: c10acdda *pdpt = 00000000338f8001 *pde = 0000000000000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: af_packet ipv6 cpufreq_ondemand loop serio_raw psmouse k8temp hwmon sr_mod cdrom Pid: 23161, comm: cat Not tainted (2.6.24-rc2-8c0863403f109a43d7000b4646da4818220d501f #4) EIP: 0060:[] EFLAGS: 00210097 CPU: 1 EIP is at strnlen+0x6/0x18 EAX: 6b6b6b6b EBX: 6b6b6b6b ECX: 6b6b6b6b EDX: fffffffe ESI: c128fa3b EDI: f380bf34 EBP: ffffffff ESP: f380be44 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process cat (pid: 23161, ti=f380b000 task=f38f2570 task.ti=f380b000) Stack: c10ac4f0 00000278 c12ce000 f43cd2a8 00000163 00000000 7da86067 00000400 c128fa20 00896b18 f38325a8 c128fe20 ffffffff 00000000 c11f291e 00000400 f75be300 c128fa20 f769c9a0 c10ac779 f380bf34 f7bfee70 c1018e6b f380bf34 Call Trace: [] vsnprintf+0x2ad/0x49b [] vscnprintf+0x14/0x1f [] vprintk+0xc5/0x2f9 [] handle_fasteoi_irq+0x0/0xab [] do_IRQ+0x9f/0xb7 [] preempt_schedule_irq+0x3f/0x5b [] need_resched+0x1f/0x21 [] printk+0x1b/0x1f [] de_put+0x3d/0x50 [] proc_delete_inode+0x38/0x41 [] proc_delete_inode+0x0/0x41 [] generic_delete_inode+0x5e/0xc6 [] iput+0x60/0x62 [] d_kill+0x2d/0x46 [] dput+0xdc/0xe4 [] __fput+0xb0/0xcd [] filp_close+0x48/0x4f [] sys_close+0x67/0xa5 [] sysenter_past_esp+0x5f/0x85 ======================= Code: c9 74 0c f2 ae 74 05 bf 01 00 00 00 4f 89 fa 5f 89 d0 c3 85 c9 57 89 c7 89 d0 74 05 f2 ae 75 01 4f 89 f8 5f c3 89 c1 89 c8 eb 06 <80> 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 c3 90 90 90 57 83 c9 EIP: [] strnlen+0x6/0x18 SS:ESP 0068:f380be44 Also, remove broken usage of ->deleted from reiserfs: if sget() succeeds, module is already pinned and remove_proc_entry() can't happen => nobody can mark PDE deleted. Dummy proc root in netns code is not marked with refcount 1. AFAICS, we never get it, it's just for proper /proc/net removal. I double checked CLONE_NETNS continues to work. Patch survives many hours of modprobe/rmmod/cat loops without new bugs which can be attributed to refcounting. Signed-off-by: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4beaf4ab5f89496f2bcf67db62ad95d99bfeff6 Author: Jan Kara Date: Tue Dec 4 23:45:27 2007 -0800 jbd: Fix assertion failure in fs/jbd/checkpoint.c Before we start committing a transaction, we call __journal_clean_checkpoint_list() to cleanup transaction's written-back buffers. If this call happens to remove all of them (and there were already some buffers), __journal_remove_checkpoint() will decide to free the transaction because it isn't (yet) a committing transaction and soon we fail some assertion - the transaction really isn't ready to be freed :). We change the check in __journal_remove_checkpoint() to free only a transaction in T_FINISHED state. The locking there is subtle though (as everywhere in JBD ;(). We use j_list_lock to protect the check and a subsequent call to __journal_drop_transaction() and do the same in the end of journal_commit_transaction() which is the only place where a transaction can get to T_FINISHED state. Probably I'm too paranoid here and such locking is not really necessary - checkpoint lists are processed only from log_do_checkpoint() where a transaction must be already committed to be processed or from __journal_clean_checkpoint_list() where kjournald itself calls it and thus transaction cannot change state either. Better be safe if something changes in future... Signed-off-by: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 369b8f5a70402d9fe77006cd0044c8a3fcd08430 Author: Nick Piggin Date: Tue Dec 4 23:45:25 2007 -0800 mm: fix XIP file writes Writing to XIP files at a non-page-aligned offset results in data corruption because the writes were always sent to the start of the page. Signed-off-by: Nick Piggin Cc: Christian Borntraeger Acked-by: Carsten Otte Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4670df831cb479ba57dd0fa0b8a9eb88cc7129be Author: Ben Gardner Date: Tue Dec 4 23:45:24 2007 -0800 gpio_cs5535: disable AUX on output The AMD CS5535/CS5536 GPIO has two alternate output modes: AUX-1 and AUX-2. When either AUX is enabled, the cs5535_gpio driver cannot control the output. Some BIOS code for the Geode processor enables AUX-1 for GPIO-1, which configures it as the PC BEEP output. This patch will disable AUX-1 and AUX-2 when the user enables output. Signed-of-by: Ben Gardner Cc: Richard Knutsson Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1dad166e88a5ddca0acf8f11dea0e2bd92d8bf3 Author: Pavel Emelyanov Date: Tue Dec 4 23:45:24 2007 -0800 Avoid potential NULL dereference in unregister_sysctl_table register_sysctl_table() can return NULL sometimes, e.g. when kmalloc() returns NULL or when sysctl check fails. I've also noticed, that many (most?) code in the kernel doesn't check for the return value from register_sysctl_table() and later simply calls the unregister_sysctl_table() with potentially NULL argument. This is unlikely on a common kernel configuration, but in case we're dealing with modules and/or fault-injection support, there's a slight possibility of an OOPS. Changing all the users to check for return code from the registering does not look like a good solution - there are too many code doing this and failure in sysctl tables registration is not a good reason to abort module loading (in most of the cases). So I think, that we can just have this check in unregister_sysctl_table just to avoid accidental OOPS-es (actually, the unregister_sysctl_table() did exactly this, before the start_unregistering() appeared). Signed-off-by: Pavel Emelyanov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 092e1fdaf35126475aef0dc70f4a2ce4f2f43052 Author: Bryan Wu Date: Tue Dec 4 23:45:23 2007 -0800 Blackfin SPI driver: reconfigure speed_hz and bits_per_word in each spi transfer - reconfigure SPI baud from speed_hz of each spi transfer - according to spi_transfer.bits_per_word to reprogram register and setup correct SPI operation handlers Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 003d922618150eaab53936f57ba8a61f2b601486 Author: Bryan Wu Date: Tue Dec 4 23:45:22 2007 -0800 Blackfin SPI driver: move hard coded pin_req to board file Remove some sort of bloaty code, try to get these pin_req arrays built at compile-time - move this static things to the blackfin board file - add pin_req array to struct bfin5xx_spi_master - tested on BF537/BF548 with SPI flash Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f452126c2e4b8bbfd8e41ebdf1e734e3bf18f8e9 Author: Bryan Wu Date: Tue Dec 4 23:45:22 2007 -0800 Blackfin SPI driver: use void __iomem * for regs_base Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8c05008b0e464c94967ed2f20d1d661fca6790e Author: Bryan Wu Date: Tue Dec 4 23:45:21 2007 -0800 Blackfin SPI driver: use cpu_relax() to replace continue in while busywait Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07612e5f224613020c0ba17ce28e8eac052ef8ce Author: Sonic Zhang Date: Tue Dec 4 23:45:21 2007 -0800 spi: spi_bfin: resequence DMA start/stop Set correct baud for spi mmc and enable SPI only after DMA is started. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 62310e51ac10c5e50998240e49a84d2e28377a48 Author: Bryan Wu Date: Tue Dec 4 23:45:20 2007 -0800 spi: spi_bfin: update handling of delay-after-deselect Move cs_chg_udelay handling (specific to this driver) to cs_deactive(), fixing a bug when some SPI LCD driver needs delay after cs_deactive. Fix bug reported by Cameron Barfield https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=23630&feedback=Message%20replied. Cc: Cameron Barfield Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3061abb9e95920407288cba143dc1af0babf099 Author: Bryan Wu Date: Tue Dec 4 23:45:19 2007 -0800 spi: spi_bfin: bugfix for 8..16 bit word sizes Fix bug in u16_cs_chg_reader to read data_len-2 bytes data firstly, then read out the last 2 bytes data Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb90eb00b6c28c8be5a69c6b58d5a6924f6f2ad7 Author: Bryan Wu Date: Tue Dec 4 23:45:18 2007 -0800 spi: spi_bfin: handle multiple spi_masters Move global SPI regs_base and dma_ch to struct driver_data. Test on BF54x SPI Flash with 2 spi_master devices enabled. Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f479a65b3f49ee4f058a965e6e33d97ee467b68 Author: Sonic Zhang Date: Tue Dec 4 23:45:18 2007 -0800 spi: spi_bfin: relocate spin/waits Move spin/waits to more correct locations in bfin SPI driver. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc487e732089360727e60f9fdbe3ff6cc4ca3155 Author: Sonic Zhang Date: Tue Dec 4 23:45:17 2007 -0800 spi: spi_bfin: change handling of communication parameters Fix SPI driver to work with SPI flash ST M25P16 on bf548 Currently the SPI driver enables the SPI controller and sets the SPI baud register for each SPI transfer. But they should never be changed within a SPI message session, in which several SPI transfers are pumped. This patch moves SPI setting to the begining of a message session, and never disables SPI controller until an error occurs. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12e17c4267a5b2a5ba77bd53a62388be641534b8 Author: Sonic Zhang Date: Tue Dec 4 23:45:16 2007 -0800 spi: spi_bfin, rearrange portmux calls Move pin muxing to setup and cleanup methods. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c4ef09449ca382da2e39b93ca9d03e3dbd5c17c Author: Sonic Zhang Date: Tue Dec 4 23:45:16 2007 -0800 spi: spi_bfin uses portmux for additional busses Use portmux mechanism to support SPI busses 1 and 2, instead of just the original bus 0. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a32c691d7cf5c37af753255ef4843b18a31935b9 Author: Bryan Wu Date: Tue Dec 4 23:45:15 2007 -0800 spi: spi_bfin uses platform device resources Update spi driver to support multi-ports by using platform resources; tested on STAMP537+SPI_MMC, other boards need more testing. Plus other minor updates. Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ed355165ff4ec834a75770f2a15dc87f5e06088 Author: Mike Frysinger Date: Tue Dec 4 23:45:14 2007 -0800 spi: spi_bfin, don't bypass spi framework Prevent people from setting bits in ctl_reg that the SPI framework already handles, hopefully we can one day drop ctl_reg completely Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fad91c890909aabab0d9858d50f3c8394ee16b21 Author: Bryan Wu Date: Tue Dec 4 23:45:14 2007 -0800 spi: spi_bfin handles spi_transfer.cs_change Respect per-transfer cs_change field (protocol tweaking support) by adding and using cs_active/cs_deactive functions. Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fec5b5a4ec0d6d8b41c56e3cc7de41063cd4736 Author: Bryan Wu Date: Tue Dec 4 23:45:13 2007 -0800 spi: spi_bfin cleanups, error handling Cleanup and error handling - add error handling in SPI bus driver with selecting clients - use proper defines to access Blackfin MMRs - remove useless SSYNCs - cleaner use of portmux calls Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc2f81a695640dd1c0cf12b35ee303460fa6d0bc Author: Michael Hennerich Date: Tue Dec 4 23:45:13 2007 -0800 spi: bfin spi uses portmux calls Use new Blackfin portmux interface, add error handling. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 131b17d42de6194fa960132c1f62c29923c4f20c Author: Bryan Wu Date: Tue Dec 4 23:45:12 2007 -0800 spi: initial BF54x SPI support Initial BF54x SPI support - support BF54x SPI0 - clean up some code (whitespace etc) - will support multiports in the future - start using portmux calls Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c24b2602af88db4489c6c3fb4b2a8e47fb15769b Author: Marc Pignat Date: Tue Dec 4 23:45:11 2007 -0800 spi: use simplified spi_sync() calling convention Given the patch which simplifies the spi_sync calling convention, this one updates the callers of that routine which tried using it according to the previous specification. (Most didn't.) Signed-off-by: Marc Pignat Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b938b749065d6a94172ac24d9748bd66a03da4c Author: Marc Pignat Date: Tue Dec 4 23:45:10 2007 -0800 spi: simplify spi_sync() calling convention Simplify spi_sync calling convention, eliminating the need to check both the return value AND the message->status. In consequence, this corrects misbehaviours of spi_read and spi_write (which only checked the former) and their callers. Signed-off-by: Marc Pignat Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f86f14c0fc9fdb0984e64209df2f47895a07151 Author: David Brownell Date: Tue Dec 4 23:45:10 2007 -0800 spi: at25 driver is for EEPROM not FLASH Add comment to at25 driver that it's for EEPROM chips, not FLASH chips ... the AT25 series has both types of chip, and sometimes they're even pin-compatible. The command sets are different, as is the treatment of erasure. (FLASH needs explicit erasure, but with EEPROM it's implicit.) Note that all vendors seem to have this same confusion in their *25* series SPI memory parts. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 068f4070868c801c7d7aa1ae1193c1c854193545 Author: David Brownell Date: Tue Dec 4 23:45:09 2007 -0800 SPI: use mutex not semaphore Make spi_write_then_read() use a mutex not a binary semaphore. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8fcc93319faa09272185af100fb24e71b02ab03 Author: Tetsuo Handa Date: Tue Dec 4 23:45:08 2007 -0800 Add EXPORT_SYMBOL(ksize); mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. It's used by binfmt_flat, which can be built as a module. Signed-off-by: Tetsuo Handa Cc: Christoph Lameter Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b01a0b1613beeb01e12c78feb69e98f0da0a69a Author: Denis Cheng Date: Tue Dec 4 23:45:07 2007 -0800 mm/backing-dev.c: fix percpu_counter_destroy call bug in bdi_init this call should use the array index j, not i. But with this approach, just one int i is enough, int j is not needed. Signed-off-by: Denis Cheng Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c664f974269bb4c3d38ba900c91a9a5d4cee5b1 Author: Evgeniy Dushistov Date: Tue Dec 4 23:45:06 2007 -0800 ufs: fix nexstep dir block size This patch fixes regression, introduced since 2.6.16. NextStep variant of UFS as OpenStep uses directory block size equals to 1024. Without this change, ufs_check_page fails in many cases. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Evgeniy Dushistov Cc: Dave Bailey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 372a302e9a892229206aafca0352584a745bc5f3 Author: Jiri Kosina Date: Tue Dec 4 23:45:05 2007 -0800 RTC: assure proper memory ordering with respect to RTC_DEV_BUSY flag We must make sure that the RTC_DEV_BUSY flag has proper lock semantics, i.e. that the RTC_DEV_BUSY stores clearing the flag don't get reordered before the preceeding stores and loads and vice versa. Spotted by Nick Piggin. Signed-off-by: Jiri Kosina Cc: Nick Piggin Cc: David Brownell Acked-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5cd17569fd0eeca510735e63a6061291e3971bf6 Author: Eric W. Biederman Date: Tue Dec 4 23:45:04 2007 -0800 fix clone(CLONE_NEWPID) Currently we are complicating the code in copy_process, the clone ABI, and if we fix the bugs sys_setsid itself, with an unnecessary open coded version of sys_setsid. So just simplify everything and don't special case the session and pgrp of the initial process in a pid namespace. Having this special case actually presents to user space the classic linux startup conditions with session == pgrp == 0 for /sbin/init. We already handle sending signals to processes in a child pid namespace. We need to handle sending signals to processes in a parent pid namespace for cases like SIGCHILD and SIGIO. This makes nothing extra visible inside a pid namespace. So this extra special case appears to have no redeeming merits. Further removing this special case increases the flexibility of how we can use pid namespaces, by not requiring the initial process in a pid namespace to be a daemon. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Cc: Pavel Emelyanov Cc: Sukadev Bhattiprolu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e00ba3dae077f54cfd2af42e939a618caa7a3bca Author: Jeff Moyer Date: Tue Dec 4 23:45:02 2007 -0800 aio: only account I/O wait time in read_events if there are active requests On 2.6.24, top started showing 100% iowait on one CPU when a UML instance was running (but completely idle). The UML code sits in io_getevents waiting for an event to be submitted and completed. Fix this by checking ctx->reqs_active before scheduling to determine whether or not we are waiting for I/O. Signed-off-by: Jeff Moyer Cc: Zach Brown Cc: Miklos Szeredi Cc: Jeff Dike Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cde898fa80a45bb23eab2a060fc79d0913081409 Author: Thomas Gleixner Date: Wed Dec 5 15:46:09 2007 +0100 futex: correctly return -EFAULT not -EINVAL return -EFAULT not -EINVAL. Found by review. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 54561783ee99d73a086f3abbda3e44f87f6bf65b Author: Oleg Nesterov Date: Wed Dec 5 15:46:09 2007 +0100 lockdep: in_range() fix Torsten Kaiser wrote: | static inline int in_range(const void *start, const void *addr, const void *end) | { | return addr >= start && addr <= end; | } | This will return true, if addr is in the range of start (including) | to end (including). | | But debug_check_no_locks_freed() seems does: | const void *mem_to = mem_from + mem_len | -> mem_to is the last byte of the freed range, that fits in_range | lock_from = (void *)hlock->instance; | -> first byte of the lock | lock_to = (void *)(hlock->instance + 1); | -> first byte of the next lock, not last byte of the lock that is being checked! | | The test is: | if (!in_range(mem_from, lock_from, mem_to) && | !in_range(mem_from, lock_to, mem_to)) | continue; | So it tests, if the first byte of the lock is in the range that is freed ->OK | And if the first byte of the *next* lock is in the range that is freed | -> Not OK. We can also simplify in_range checks, we need only 2 comparisons, not 4. If the lock is not in memory range, it should be either at the left of range or at the right. Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra commit 856848737bd944c1db3ce0a66bbf67e56bd6f77d Author: Ingo Molnar Date: Wed Dec 5 15:46:09 2007 +0100 lockdep: fix debug_show_all_locks() fix the oops that can be seen in: http://bugzilla.kernel.org/attachment.cgi?id=13828&action=view it is not safe to print the locks of running tasks. (even with this fix we have a small race - but this is a debug function after all.) Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra commit 41a2d6cfa3f77ec469e7e5f06b4d7ffd031f9c0e Author: Ingo Molnar Date: Wed Dec 5 15:46:09 2007 +0100 sched: style cleanups style cleanup of various changes that were done recently. no code changed: text data bss dec hex filename 23680 2542 28 26250 668a sched.o.before 23680 2542 28 26250 668a sched.o.after Signed-off-by: Ingo Molnar commit ce6bd420f43b28038a2c6e8fbb86ad24014727b6 Author: Steven Rostedt Date: Wed Dec 5 15:46:09 2007 +0100 futex: fix for futex_wait signal stack corruption David Holmes found a bug in the -rt tree with respect to pthread_cond_timedwait. After trying his test program on the latest git from mainline, I found the bug was there too. The bug he was seeing that his test program showed, was that if one were to do a "Ctrl-Z" on a process that was in the pthread_cond_timedwait, and then did a "bg" on that process, it would return with a "-ETIMEDOUT" but early. That is, the timer would go off early. Looking into this, I found the source of the problem. And it is a rather nasty bug at that. Here's the relevant code from kernel/futex.c: (not in order in the file) [...] smlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, struct timespec __user *utime, u32 __user *uaddr2, u32 val3) { struct timespec ts; ktime_t t, *tp = NULL; u32 val2 = 0; int cmd = op & FUTEX_CMD_MASK; if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI)) { if (copy_from_user(&ts, utime, sizeof(ts)) != 0) return -EFAULT; if (!timespec_valid(&ts)) return -EINVAL; t = timespec_to_ktime(ts); if (cmd == FUTEX_WAIT) t = ktime_add(ktime_get(), t); tp = &t; } [...] return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); } [...] long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, u32 __user *uaddr2, u32 val2, u32 val3) { int ret; int cmd = op & FUTEX_CMD_MASK; struct rw_semaphore *fshared = NULL; if (!(op & FUTEX_PRIVATE_FLAG)) fshared = ¤t->mm->mmap_sem; switch (cmd) { case FUTEX_WAIT: ret = futex_wait(uaddr, fshared, val, timeout); [...] static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared, u32 val, ktime_t *abs_time) { [...] struct restart_block *restart; restart = ¤t_thread_info()->restart_block; restart->fn = futex_wait_restart; restart->arg0 = (unsigned long)uaddr; restart->arg1 = (unsigned long)val; restart->arg2 = (unsigned long)abs_time; restart->arg3 = 0; if (fshared) restart->arg3 |= ARG3_SHARED; return -ERESTART_RESTARTBLOCK; [...] static long futex_wait_restart(struct restart_block *restart) { u32 __user *uaddr = (u32 __user *)restart->arg0; u32 val = (u32)restart->arg1; ktime_t *abs_time = (ktime_t *)restart->arg2; struct rw_semaphore *fshared = NULL; restart->fn = do_no_restart_syscall; if (restart->arg3 & ARG3_SHARED) fshared = ¤t->mm->mmap_sem; return (long)futex_wait(uaddr, fshared, val, abs_time); } So when the futex_wait is interrupt by a signal we break out of the hrtimer code and set up or return from signal. This code does not return back to userspace, so we set up a RESTARTBLOCK. The bug here is that we save the "abs_time" which is a pointer to the stack variable "ktime_t t" from sys_futex. This returns and unwinds the stack before we get to call our signal. On return from the signal we go to futex_wait_restart, where we update all the parameters for futex_wait and call it. But here we have a problem where abs_time is no longer valid. I verified this with print statements, and sure enough, what abs_time was set to ends up being garbage when we get to futex_wait_restart. The solution I did to solve this (with input from Linus Torvalds) was to add unions to the restart_block to allow system calls to use the restart with specific parameters. This way the futex code now saves the time in a 64bit value in the restart block instead of storing it on the stack. Note: I'm a bit nervious to add "linux/types.h" and use u32 and u64 in thread_info.h, when there's a #ifdef __KERNEL__ just below that. Not sure what that is there for. If this turns out to be a problem, I've tested this with using "unsigned int" for u32 and "unsigned long long" for u64 and it worked just the same. I'm using u32 and u64 just to be consistent with what the futex code uses. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds commit 9cb1200a286799db897e81bc2b2c1730cfdc9c08 Author: David S. Miller Date: Tue Dec 4 00:38:22 2007 -0800 [SPARC64]: Update defconfig. Signed-off-by: David S. Miller commit b127aa8bafb3b5b555ab0e7d6f87cb8a541a3d46 Author: Julia Lawall Date: Tue Dec 4 00:33:07 2007 -0800 [SPARC]: Add missing of_node_put There should be an of_node_put when breaking out of a loop that iterates using for_each_node_by_type. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit 75c6d1410caa6fea861ef3802e8b186f7685f235 Author: Cyrill Gorcunov Date: Tue Nov 20 17:32:19 2007 -0800 [SPARC64]: check for possible NULL pointer dereference This patch adds checking for possible NULL pointer dereference if of_find_property() failed. Signed-off-by: Cyrill Gorcunov Signed-off-by: David S. Miller commit 794b26e0600e3aab399f9d0f225f9e0b8782edbb Author: Joe Perches Date: Mon Nov 19 23:45:16 2007 -0800 [SPARC]: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 519c4d2debebc82b201b80fdc48643e19233eb97 Author: Joe Perches Date: Mon Nov 19 23:43:00 2007 -0800 [SPARC64]: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 55c45a3ad8e5f9488426332b7baca0261ec2f816 Author: Julia Lawall Date: Mon Nov 19 22:50:01 2007 -0800 [SPARC64]: Add missing pci_dev_put There should be a pci_dev_put when breaking out of a loop that iterates over calls to pci_get_device and similar functions. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit 874a5f87f53f80b798140b07fcf81f8d3718b3cc Author: David S. Miller Date: Mon Nov 19 21:35:42 2007 -0800 [SYSCTL_CHECK]: Fix typo in KERN_SPARC_SCONS_PWROFF entry string. Based upon a report by Mikael Pettersson. Signed-off-by: David S. Miller commit 6fab2600f9eae779ac49416e651a7f160004c9ae Author: David S. Miller Date: Wed Nov 14 20:17:24 2007 -0800 [SPARC64]: Missing mdesc_release() in ldc_init(). Signed-off-by: David S. Miller commit 621544eb8c3beaa859c75850f816dd9b056a00a3 Author: Andrew Gallatin Date: Wed Dec 5 02:31:42 2007 -0800 [LRO]: fix lro_gen_skb() alignment Add a field to the lro_mgr struct so that drivers can specify how much padding is required to align layer 3 headers when a packet is copied into a freshly allocated skb by inet_lro.c:lro_gen_skb(). Without padding, skbs generated by LRO will cause alignment warnings on architectures which require strict alignment (seen on sparc64). Myri10GE is updated to use this field. Signed-off-by: Andrew Gallatin Signed-off-by: David S. Miller commit 4e67d876ce07471e02be571038d5435a825f0215 Author: Ilpo Järvinen Date: Wed Dec 5 02:25:32 2007 -0800 [TCP]: NAGLE_PUSH seems to be a wrong way around The comment in tcp_nagle_test suggests that. This bug is very very old, even 2.4.0 seems to have it. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 52d3408150858a301a84bcbfe2f323d90d71d2ce Author: Ilpo Järvinen Date: Wed Dec 5 02:21:35 2007 -0800 [TCP]: Move prior_in_flight collect to more robust place The previous location is after sacktag processing, which affects counters tcp_packets_in_flight depends on. This may manifest as wrong behavior if new SACK blocks are present and all is clear for call to tcp_cong_avoid, which in the case of tcp_reno_cong_avoid bails out early because it thinks that TCP is not limited by cwnd. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 3e6f049e0c4cf0606207c1a210abf50b436e9adf Author: Ilpo Järvinen Date: Wed Dec 5 02:20:21 2007 -0800 [TCP] FRTO: Use of existing funcs make code more obvious & robust Though there's little need for everything that tcp_may_send_now does (actually, even the state had to be adjusted to pass some checks FRTO does not want to occur), it's more robust to let it make the decision if sending is allowed. State adjustments needed: - Make sure snd_cwnd limit is not hit in there - Disable nagle (if necessary) through the frto_counter == 2 The result of check for frto_counter in argument to call for tcp_enter_frto_loss can just be open coded, therefore there isn't need to store the previous frto_counter past tcp_may_send_now. In addition, returns can then be combined. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 92b05e13f16a41405c4f6c953c47b6c4bcf82d30 Author: Pavel Emelyanov Date: Wed Dec 5 02:18:48 2007 -0800 [IRDA]: Move ircomm_tty_line_info() under #ifdef CONFIG_PROC_FS The function in question is called only from ircomm_tty_read_proc, which is under this option. Move this helper to the same place. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller commit 78f150bf94f5430fe8c34edeafe8d01706f38148 Author: Pavel Emelyanov Date: Wed Dec 5 02:18:15 2007 -0800 [ROSE]: Trivial compilation CONFIG_INET=n case The rose_rebuild_header() consists only of some variables in case INET=n, and gcc will warn us about it. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller commit 4ac63ad6c52e9cdefbcb54ec4575ab12b78b49d9 Author: Pavel Emelyanov Date: Tue Dec 4 00:45:06 2007 -0800 [IPVS]: Fix sched registration race when checking for name collision. The register_ip_vs_scheduler() checks for the scheduler with the same name under the read-locked __ip_vs_sched_lock, then drops, takes it for writing and puts the scheduler in list. This is racy, since we can have a race window between the lock being re-locked for writing. The fix is to search the scheduler with the given name right under the write-locked __ip_vs_sched_lock. Signed-off-by: Pavel Emelyanov Acked-by: Simon Horman Signed-off-by: David S. Miller commit a014bc8f0f0a3a0cac4fef656f101cdfb77b71eb Author: Pavel Emelyanov Date: Tue Dec 4 00:43:24 2007 -0800 [IPVS]: Don't leak sysctl tables if the scheduler registration fails. In case we load lblc or lblcr module we can leak some sysctl tables if the call to register_ip_vs_scheduler() fails. I've looked at the register_ip_vs_scheduler() code and saw, that the only reason to fail is the name collision, so I think that with some 3rd party schedulers this becomes a relevant issue. No? Signed-off-by: Pavel Emelyanov Acked-by: Simon Horman Signed-off-by: David S. Miller commit 5a211a5deabcafdc764817d5b4510c767d317ddc Author: Eric Paris Date: Tue Dec 4 11:06:55 2007 -0500 VM/Security: add security hook to do_brk Given a specifically crafted binary do_brk() can be used to get low pages available in userspace virtually memory and can thus be used to circumvent the mmap_min_addr low memory protection. Add security checks in do_brk(). Signed-off-by: Eric Paris Acked-by: Alan Cox Signed-off-by: James Morris commit 7cd94146cd504016315608e297219f9fb7b1413b Author: Eric Paris Date: Mon Nov 26 18:47:40 2007 -0500 Security: round mmap hint address above mmap_min_addr If mmap_min_addr is set and a process attempts to mmap (not fixed) with a non-null hint address less than mmap_min_addr the mapping will fail the security checks. Since this is just a hint address this patch will round such a hint address above mmap_min_addr. gcj was found to try to be very frugal with vm usage and give hint addresses in the 8k-32k range. Without this patch all such programs failed and with the patch they happily get a higher address. This patch is wrappad in CONFIG_SECURITY since mmap_min_addr doesn't exist without it and there would be no security check possible no matter what. So we should not bother compiling in this rounding if it is just a waste of time. Signed-off-by: Eric Paris Signed-off-by: James Morris commit 8869477a49c3e99def1fcdadd6bbc407fea14b45 Author: Eric Paris Date: Mon Nov 26 18:47:26 2007 -0500 security: protect from stack expantion into low vm addresses Add security checks to make sure we are not attempting to expand the stack into memory protected by mmap_min_addr Signed-off-by: Eric Paris Signed-off-by: James Morris commit ab5a91a8364c3d6fc617abc47cc81d162c01d90a Author: Eric Paris Date: Mon Nov 26 18:47:46 2007 -0500 Security: allow capable check to permit mmap or low vm space On a kernel with CONFIG_SECURITY but without an LSM which implements security_file_mmap it is impossible for an application to mmap addresses lower than mmap_min_addr. Based on a suggestion from a developer in the openwall community this patch adds a check for CAP_SYS_RAWIO. It is assumed that any process with this capability can harm the system a lot more easily than writing some stuff on the zero page and then trying to get the kernel to trip over itself. It also means that programs like X on i686 which use vm86 emulation can work even with mmap_min_addr set. Signed-off-by: Eric Paris Signed-off-by: James Morris commit d313f948309ab22797316e789a7ff8fa358176b6 Author: Stephen Smalley Date: Mon Nov 26 11:12:53 2007 -0500 SELinux: detect dead booleans Instead of using f_op to detect dead booleans, check the inode index against the number of booleans and check the dentry name against the boolean name for that index on reads and writes. This prevents incorrect use of a boolean file opened prior to a policy reload while allowing valid use of it as long as it still corresponds to the same boolean in the policy. Signed-off-by: Stephen Smalley Signed-off-by: James Morris commit 0955dc03aedfb6a5565445b3f2176255b784cc6a Author: Stephen Smalley Date: Wed Nov 21 09:01:36 2007 -0500 SELinux: do not clear f_op when removing entries Do not clear f_op when removing entries since it isn't safe to do. Signed-off-by: Stephen Smalley Signed-off-by: James Morris commit e3c0ac04f980750a368f7cd5f1b8d1d2cdc1f735 Merge: 943547a... 6f4a7f4... Author: Linus Torvalds Date: Tue Dec 4 12:21:11 2007 -0800 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: PHY: Add the phy_device_release device method. gianfar: fix compile warning pasemi_mac: Fix reuse of free'd skb SMC911X: Fix using of dereferenced skb after netif_rx sky2: recovery deadlock fix Fix memory corruption in fec_mpc52xx Don't claim to do IPv6 checksum offload cxgb - revert file mode changes. commit 6f4a7f4183bdbd02741dcd8edbd10b8628acc5d5 Author: Anton Vorontsov Date: Tue Dec 4 16:17:33 2007 +0300 PHY: Add the phy_device_release device method. Lately I've got this nice badness on mdio bus removal: Device 'e0103120:06' does not have a release() function, it is broken and must be fixed. ------------[ cut here ]------------ Badness at drivers/base/core.c:107 NIP: c015c1a8 LR: c015c1a8 CTR: c0157488 REGS: c34bdcf0 TRAP: 0700 Not tainted (2.6.23-rc5-g9ebadfbb-dirty) MSR: 00029032 CR: 24088422 XER: 00000000 ... [c34bdda0] [c015c1a8] device_release+0x78/0x80 (unreliable) [c34bddb0] [c01354cc] kobject_cleanup+0x80/0xbc [c34bddd0] [c01365f0] kref_put+0x54/0x6c [c34bdde0] [c013543c] kobject_put+0x24/0x34 [c34bddf0] [c015c384] put_device+0x1c/0x2c [c34bde00] [c0180e84] mdiobus_unregister+0x2c/0x58 ... Though actually there is nothing broken, it just device subsystem core expects another "pattern" of resource managment. This patch implement phy device's release function, thus we're getting rid of this badness. Also small hidden bug fixed, hope none other introduced. ;-) Signed-off-by: Anton Vorontsov Acked-by: Andy Fleming Signed-off-by: Jeff Garzik commit f9663aea2a938f9dc60dbfef34b9e7847a69c947 Author: Grant Likely Date: Sat Dec 1 22:10:03 2007 -0700 gianfar: fix compile warning Eliminate an uninitialized variable warning. The code is correct, but a pointer to the automatic variable 'addr' is passed to dma_alloc_coherent. Since addr has never been initialized, and the compiler doesn't know what dma_alloc_coherent will do with it, it complains. Signed-off-by: Grant Likely Signed-off-by: Jeff Garzik commit 4352d82647f679fb8dd9440b34400fa49beedb2c Author: Olof Johansson Date: Mon Dec 3 21:34:14 2007 -0600 pasemi_mac: Fix reuse of free'd skb Turns out we're freeing the skb when we detect CRC error, but we're not clearing out info->skb. We could either clear it and have the stack reallocate it, or just leave it and the rx ring refill code will reuse the one that was allocated. Reusing a freed skb obviously caused some nasty crashes of various kind, as reported by Brent Baude and David Woodhouse. Signed-off-by: Olof Johansson Signed-off-by: Jeff Garzik commit d30f53aeb31d453a5230f526bea592af07944564 Author: Wang Chen Date: Tue Dec 4 10:01:37 2007 +0800 SMC911X: Fix using of dereferenced skb after netif_rx Signed-off-by: Wang Chen Signed-off-by: Jeff Garzik commit 8cfcbe998aa0459e20bbad61376f81c1715b25d6 Author: Stephen Hemminger Date: Mon Dec 3 17:02:17 2007 -0800 sky2: recovery deadlock fix Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize which gets stuck if napi was already disabled. Fix by rearranging slightly and not calling napi_disable until after both ports are stopped. The napi_disable probably is being overly paranoid, but it is safe now. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 4c537e6371a9510c82eb96fb7e1e66017e0e2053 Author: Jon Smirl Date: Mon Dec 3 22:38:10 2007 +0000 Fix memory corruption in fec_mpc52xx The mpc5200 fec driver is corrupting memory. This patch fixes two bugs where the wrong skb was being referenced. Signed-off-by: Jon Smirl Acked-by: Domen Puncer Signed-off-by: Grant Likely Signed-off-by: David Woodhouse Signed-off-by: Jeff Garzik commit 0581d3f53053de597ef4956568c15785e59828ef Author: David Woodhouse Date: Mon Dec 3 04:34:32 2007 +0000 Don't claim to do IPv6 checksum offload Signed-off-by: David Woodhouse Signed-off-by: Jeff Garzik commit 4c14fe91d0209897fda4dea0102c8cd2e1ddd860 Author: Divy Le Ray Date: Sat Dec 1 15:57:17 2007 -0800 cxgb - revert file mode changes. revert inavertant file mode changes Signed-off-by: Divy Le Ray Signed-off-by: Jeff Garzik commit 943547abdfe9b4e27e36a25987909619908dffbf Author: Bartlomiej Zolnierkiewicz Date: Sun Dec 2 03:47:01 2007 +0100 pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings * Don't program UDMA timings when programming PIO or MWDMA modes. This has also a nice side-effect of fixing regression added by commit 681c80b5d96076f447e8101ac4325c82d8dce508 ("libata: correct handling of SRST reset sequences") (->set_piomode method for PIO0 is called before ->cable_detect method which checks UDMA timings to get the cable type). * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz Tested-by: "Thomas Lindroth" Acked-by: Alan Cox Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik commit 6ba8695870a5a2ebf6f3d1ee3ac1e4d96d667cf6 Author: peerchen Date: Mon Dec 3 22:20:37 2007 +0800 ahci: add the Device IDs of MCP79 AHCI controller to ahci.c Add the device IDs of legacy mode of MCP79 AHCI controller to ahci.c Signed-off-by: Peer Chen Signed-off-by: Jeff Garzik commit 306b30f74d37f289033c696285e07ce0158a5d7b Author: Mark Lord Date: Tue Dec 4 14:07:52 2007 -0500 sata_mv: Warn about HPT RocketRAID BIOS treatment of "Legacy" drives The Highpoint RocketRAID boards using Marvell 7042 chips overwrite the 9th sector of attached drives at boot time, when those drives are configured as "Legacy" (the default) in the HighPoint BIOS. This kills GRUB, and probably other stuff. But it all happens *before* Linux is even loaded. So, for now we'll log a WARNING when such boards are detected, and advise users to configure BIOS "JBOD" volumes instead, which don't appear to suffer from this problem. Signed-off-by: Mark Lord Signed-off-by: Jeff Garzik commit 3f3debdbfb7713aa06c4370bab6bef277dfd7a37 Author: Robert Hancock Date: Sun Nov 25 16:59:36 2007 -0600 sata_nv: don't use legacy DMA in ADMA mode (v3) We need to run any DMA command with result taskfile requested in ADMA mode when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine in ADMA mode which is not allowed. Enforce this with BUG_ON() since data corruption could potentially result if this happened. Also, fail any attempt to try and issue NCQ commands with result taskfile requested, since the hardware doesn't allow this. Signed-off-by: Robert Hancock Signed-off-by: Jeff Garzik commit 2254c2e0184c603f92fc9b81016ff4bb53da622d Merge: a3aaabd... 7af0d6f... Author: Linus Torvalds Date: Tue Dec 4 09:37:39 2007 -0800 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] Make sure the restore psw masks are initialized. [S390] Fix compile error on 31bit without preemption [S390] dcssblk: prevent early access without own make_request function [S390] cio: add missing reprobe loop end statement [S390] cio: Issue SenseID per path. commit a3aaabd6b402d8b0ede5aa4a040e9fdbbfdf9116 Merge: 98f20fb... da54bec... Author: Linus Torvalds Date: Tue Dec 4 09:28:45 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: arch_register_cpu() section fix x86: free_cache_attributes() section fix x86: add the word 'WARNING' in check_nmi_watchdog() output x86: revert CONFIG_X86_HT semantics change commit 98f20fb6a9b1db4ef6ab19e5eb0e41f04d38b4aa Merge: 2208210... db292ca... Author: Linus Torvalds Date: Tue Dec 4 09:28:23 2007 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: sched: default to more agressive yield for SCHED_BATCH tasks sched: fix crash in sys_sched_rr_get_interval() commit 220821028cd764c24e60485251c4d0bc1732bdfa Author: Adrian Bunk Date: Tue Dec 4 14:35:00 2007 +0100 MAINTAINERS: remove the MTRR entry I haven't seen Richard doing MTRR related work for quite some time, and the "X86 ARCHITECTURE" entry in MAINTAINERS already covers the people currently responsible for this code. Signed-off-by: Adrian Bunk Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 799b37b5ee6b4c197f38611eb7f02552e4f14e70 Author: Ingo Molnar Date: Tue Dec 4 11:32:38 2007 +0100 drivers/s390/net/ctcmain.c: fix build bug SET_MODULE_OWNER() is obsolete. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit da54becc7166b5fad70538acea5e93bdd83dd8a6 Author: Andrew Morton Date: Tue Dec 4 17:19:07 2007 +0100 x86: arch_register_cpu() section fix fix this on i386 allnoconfig: WARNING: vmlinux.o(.text+0x6f2e): Section mismatch: reference to .init.text:register_cpu (between 'arch_register_cpu' and 'text_poke') Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit f22d9bc1e87270586610216084b00cb2fb09abba Author: Adrian Bunk Date: Tue Dec 4 17:19:07 2007 +0100 x86: free_cache_attributes() section fix free_cache_attributes() must be __cpuinit since it calls the __cpuinit cache_remove_shared_cpu_map(). This patch fixes the following section mismatch reported by Chris Clayton: ... WARNING: vmlinux.o(.text+0x90b6): Section mismatch: reference to .init.text:cache_remove_shared_cpu_map (between 'free_cache_attributes' and 'show_level') ... Signed-off-by: Adrian Bunk Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 75bc122c2dc4d497909248e85d86139e54c8fd13 Author: Don Zickus Date: Tue Dec 4 17:19:07 2007 +0100 x86: add the word 'WARNING' in check_nmi_watchdog() output Our automated test suite looks for keywords like error, fail, warning in the boot log. In the case when the nmi watchdog is determined to be stuck in check_nmi_watchdog(), none of those keywords are displayed. This patch adds a keyword, "WARNING:", so it makes it easier to notice when the nmi watchdog isn't working correctly. Also add a proper KERN_WARNING mark to this printout. Signed-off-by: Don Zickus Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit ee0011a798ba0e9134506830c58323f2bfcd2443 Author: Adrian Bunk Date: Tue Dec 4 17:19:07 2007 +0100 x86: revert CONFIG_X86_HT semantics change The recent Kconfig changes in x86 resulted in CONFIG_X86_HT no longer being set if (X86_32 && MK8). After grep'ing through the tree I think the problem is that different places have different assumptions about the semantics of CONFIG_X86_HT, either: - hyperthreading or - multicore This should be sorted out properly, but until then we should keep the 2.6.23 status quo. Signed-off-by: Adrian Bunk Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit db292ca302e83534f5f0f7139e13d7e6976e51f9 Author: Ingo Molnar Date: Tue Dec 4 17:04:39 2007 +0100 sched: default to more agressive yield for SCHED_BATCH tasks do more agressive yield for SCHED_BATCH tuned tasks: they are all about throughput anyway. This allows a gentler migration path for any apps that relied on stronger yield. Signed-off-by: Ingo Molnar commit 77034937dc4575ca0a76bf209838ecd39e804089 Author: Ingo Molnar Date: Tue Dec 4 17:04:39 2007 +0100 sched: fix crash in sys_sched_rr_get_interval() Luiz Fernando N. Capitulino reported that sched_rr_get_interval() crashes for SCHED_OTHER tasks that are on an idle runqueue. The fix is to return a 0 timeslice for tasks that are on an idle runqueue. (and which are not running, obviously) this also shrinks the code a bit: text data bss dec hex filename 47903 3934 336 52173 cbcd sched.o.before 47885 3934 336 52155 cbbb sched.o.after Reported-by: Luiz Fernando N. Capitulino Signed-off-by: Ingo Molnar commit 7af0d6f753f5adf773f99470666b50490d3379f1 Author: Heiko Carstens Date: Tue Dec 4 16:09:05 2007 +0100 [S390] Make sure the restore psw masks are initialized. In case of TRACE_IRQFLAGS the restore psw masks will not be initialized if noexec is turned on. This will lead to an immediate system crash. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit ab1809b4ed9a3aaf3b34133a776a94f9fad54cc4 Author: Christian Borntraeger Date: Tue Dec 4 16:09:04 2007 +0100 [S390] Fix compile error on 31bit without preemption Commit b8e7a54cd06b0b0174029ef3a7f5a1415a2c28f2 introduced a compile error if CONFIG_PREEMPT is not set: arch/s390/kernel/built-in.o: In function `cleanup_io_leave_insn': /space/kvm/arch/s390/kernel/entry.S:(.text+0xbfce): undefined reference to `preempt_schedule_irq' This patch hides preempt_schedule_irq if CONFIG_PREEMPT is not set. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 436d1bc7fe6e78e37fe5f5022ea4d5c133d825eb Author: Christian Borntraeger Date: Tue Dec 4 16:09:03 2007 +0100 [S390] dcssblk: prevent early access without own make_request function When loading a dcss segment with the dcssblk driver, sometimes the following kind of message appears: bio too big device dcssblk0 (8 > 0) Buffer I/O error on device dcssblk0, logical block 172016 .. The fix is to move the disk registration after setting the make_request function, to avoid calls into generic_make_request for dcssblock without having the make_request function set up properly. Cc: Gerald Schaefer Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 671756162cfb0b3ccbb6a0047baa3010885561a2 Author: Peter Oberparleiter Date: Tue Dec 4 16:09:02 2007 +0100 [S390] cio: add missing reprobe loop end statement Add loop end statement to prevent looping over empty subchannel sets. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit c94dec99f9759c41cadf0f2781846da5b40a98f6 Author: Cornelia Huck Date: Tue Dec 4 16:09:01 2007 +0100 [S390] cio: Issue SenseID per path. We may receive a unit check for every path when we issue a SenseID. Unfortunately, the channel subsystem will try on a different path every time if we use a lpm of 0xff, which will exhaust our retry counter. Therefore, revert SenseID to its previous per-path behaviour and just leave out the suspend multipath reconnect. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit e136e769d471e7f3d24a8f6bf9c91dcb372bd0ab Author: Rafael J. Wysocki Date: Tue Dec 4 01:11:09 2007 +0100 Freezer: Fix JFFS2 garbage collector freezing issue (rev. 2) Fix breakage caused by commit d5d8c5976d6adeddb8208c240460411e2198b393 "freezer: do not send signals to kernel threads" in jffs2_garbage_collect_thread() that assumed it would be sent signals by the freezer. Signed-off-by: Rafael J. Wysocki Cc: David Woodhouse Cc: Pete MacKay Signed-off-by: Len Brown commit 561d9a969455cb009bb15b63e1d925dc527e7a9d Author: Rafael J. Wysocki Date: Mon Dec 3 18:01:50 2007 +0100 HWMON: coretemp, suspend fix It's not permitted to unregister a device after devices have been suspended. It causes deadlocks to appear on systems with coretemp hwmon loaded.  To avoid this, we can make coretemp_cpu_callback() do nothing if the _FROZEN bit is set in action.   Also, in other cases it's generally too late to unregister the coretemp device if the CPU is already dead, so it should be unregistered on CPU_DOWN_PREPARE.   Signed-off-by: Rafael J. Wysocki Acked-by: Mark M. Hoffman Cc: Jiri Slaby Cc: Andrew Morton Signed-off-by: Len Brown commit cb43c54ca05c01533c45e4d3abfe8f99b7acf624 Author: Rafael J. Wysocki Date: Wed Nov 21 02:53:14 2007 +0100 Freezer: Fix APM emulation breakage The APM emulation is currently broken as a result of commit 831441862956fffa17b9801db37e6ea1650b0f69 "Freezer: make kernel threads nonfreezable by default" that removed the PF_NOFREEZE annotations from apm_ioctl() without adding the appropriate freezer hooks. Fix it and remove the unnecessary variable flags from apm_ioctl(). Special thanks to Franck Bui-Huu for pointing out the problem. Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Cc: Franck Bui-Huu Cc: Nigel Cunningham Signed-off-by: Len Brown commit 8baabde66c60a84781c718c28fe283ed411a7bd0 Author: Rafael J. Wysocki Date: Wed Nov 21 02:50:17 2007 +0100 Freezer: Fix s2disk resume from initrd Add appropriate freezer annotations to handle_initrd(), so that it's possible to resume from disk from an initrd. http://bugzilla.kernel.org/show_bug.cgi?id=9345 Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Cc: Nigel Cunningham Cc: Ingo Molnar Cc: Chris Friedhoff Signed-off-by: Len Brown