commit 589136bfa784a4558b397f017ca2f06f0ca9080e Merge: 5d3efe0 23e701e Author: Linus Torvalds Date: Thu Nov 18 15:01:43 2010 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: [libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd commit 5d3efe0735350ca9329259f34ac6a84b36dd83f2 Author: Randy Dunlap Date: Thu Nov 18 12:27:37 2010 -0800 MAINTAINERS: update documentation entries Update kernel-doc and Documentation maintainers info. Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit f830673f6aa28741ff6993deade587c8550c1dd3 Author: Andres Salomon Date: Thu Nov 18 12:27:36 2010 -0800 Documentation/development-process: more staging info Document things that I would've liked to have known when submitting a driver to gregkh for staging. Signed-off-by: Andres Salomon Acked-by: Greg Kroah-Hartman Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit e4fabad30eaba5bb78cd8d47885f1b705a0918a0 Author: Andres Salomon Date: Thu Nov 18 12:27:35 2010 -0800 Documentation/development-process: use -next trees instead of staging This is confusing, as we have "staging" trees for drivers/staging. Call them -next trees. Signed-off-by: Andres Salomon Acked-by: Greg Kroah-Hartman Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit f99e0e98f95bbe8833bd96c314b71ef859851bc5 Author: Hans J. Koch Date: Thu Nov 18 12:27:34 2010 -0800 Documentation: change email address for Hans Koch My old mail address doesn't exist anymore. This changes all occurrences to my new address. Signed-off-by: Hans J. Koch Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit ebde7b062cd9e2ea968c93f23f73dd28c0a192d1 Author: Bernhard Walle Date: Thu Nov 18 12:27:33 2010 -0800 Documentation/gpio.txt: explain poll/select usage Add a bit more information how to use poll(2) on GPIO value files correctly. For me it was not clear that I need to poll(2) for POLLPRI|POLLERR or select(2) for exceptfds. Signed-off-by: Bernhard Walle Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 09c9feb94672bdb3ca6d424a292ffc26eff8ca0b Author: Dan Carpenter Date: Thu Nov 18 12:27:32 2010 -0800 Documentation: make configfs example code simpler, clearer If "p" is NULL then it will cause an oops when we pass it to simple_strtoul(). In this case "p" can not be NULL so I removed the check. I also changed the check a little to make it more explicit that we are testing whether p points to the NUL char. Signed-off-by: Dan Carpenter Acked-by: Joel Becker Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 2b35f4d9cab365d37c7b34ce51e1c1144c312d05 Author: Randy Dunlap Date: Thu Nov 18 12:27:31 2010 -0800 kernel-doc: escape xml for structs scripts/kernel-doc was leaving unescaped '<', '>', and '&' in generated xml output for structs. This causes xml parser errors. Convert these characters to "<", ">", and "&" as needed to prevent errors. Most of the conversion was already done; complete it just before output. Documentation/DocBook/device-drivers.xml:41883: parser error : StartTag: invalid element name #define INPUT_KEYMAP_BY_INDEX (1 << 0) Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 2811036a19624168ff9342bb85421dbbb1d2ac0d Author: Youquan Song Date: Thu Nov 18 18:28:20 2010 -0500 Fix build failure at cx25821-video driver Kernel build fail for cx25821-video has depends on smp_lock.h header file, but the dependency is removed in recent commit 451a3c24b013. Signed-off-by: Youquan Song Signed-off-by: Linus Torvalds commit ed1d77b18c9f4ff06d5b42c65041aa55a1447053 Author: Linus Torvalds Date: Thu Nov 18 10:56:29 2010 -0800 hardirq.h: needs sched.h if using BKL This really isn't the right thing to do, and strictly speaking we should have the BKL depth count in the thread info right next to the preempt count. The two really do go together. However, since that would involve a patch to all architectures, and the BKL is finally going away, it's simply not worth the effort to do the RightThing(tm). Just re-instate the include that we used to get accidentally from the smp_lock.h one. This is all fallout from the same old "BKL: remove extraneous #include " commit. Reported-by: Ingo Molnar Tested-by: Randy Dunlap Cc: Arnd Bergmann Signed-off-by: Linus Torvalds commit fb3ff69d1397ce4bd2441c87b1daea67cb945ac6 Merge: 2d42dc3 c8770e7 Author: Linus Torvalds Date: Thu Nov 18 09:45:47 2010 -0800 Merge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: VMX: Fix host userspace gsbase corruption KVM: Correct ordering of ldt reload wrt fs/gs reload commit 2d42dc3feb6649c0e08641b0a6f0e0bad22aeeb2 Merge: 70b99ef e3839ed Author: Linus Torvalds Date: Thu Nov 18 08:24:58 2010 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: kgdb,ppc: Fix regression in evr register handling kgdb,x86: fix regression in detach handling kdb: fix crash when KDB_BASE_CMD_MAX is exceeded kdb: fix memory leak in kdb_main.c commit 70b99eff756e8995b607a9d33f242c1e4f480f32 Merge: 0a5b871 0f6b77c Author: Linus Torvalds Date: Thu Nov 18 07:38:58 2010 -0800 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Update a BKL related comment powerpc/mm: Fix module instruction tlb fault handling on Book-E 64 powerpc: Fix call to subpage_protection() powerpc: Set CONFIG_32BIT on ppc32 powerpc/mm: Fix build error in setup_initial_memory_limit powerpc/pseries: Don't override CONFIG_PPC_PSERIES_DEBUG powerpc: Fix div64 in bootloader commit 0f6b77ca12bea571e0a97b0588f62aa5f6012d61 Author: Alessio Igor Bogani Date: Tue Nov 16 07:55:16 2010 +0000 powerpc: Update a BKL related comment The commit 5e3d20a remove bkl from startup code so setup_arch() it isn't called with bkl held anymore. Update the comment on top of that function. Fix also a typo. This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: Alessio Igor Bogani Signed-off-by: Benjamin Herrenschmidt commit 82ae5eaffad40a6d4738e8a57e48dd0d903a9ef0 Author: Kumar Gala Date: Wed Nov 17 07:20:32 2010 +0000 powerpc/mm: Fix module instruction tlb fault handling on Book-E 64 We were seeing oops like the following when we did an rmmod on a module: Unable to handle kernel paging request for instruction fetch Faulting instruction address: 0x8000000000008010 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=2 P5020 DS last sysfs file: /sys/devices/qman-portals.2/qman-pool.9/uevent Modules linked in: qman_tester(-) NIP: 8000000000008010 LR: c000000000074858 CTR: 8000000000008010 REGS: c00000002e29bab0 TRAP: 0400 Not tainted (2.6.34.6-00744-g2d21f14) MSR: 0000000080029000 CR: 24000448 XER: 00000000 TASK = c00000007a8be600[4987] 'rmmod' THREAD: c00000002e298000 CPU: 1 GPR00: 8000000000008010 c00000002e29bd30 8000000000012798 c00000000035fb28 GPR04: 0000000000000002 0000000000000002 0000000024022428 c000000000009108 GPR08: fffffffffffffffe 800000000000a618 c0000000003c13c8 0000000000000000 GPR12: 0000000022000444 c00000000fffed00 0000000000000000 0000000000000000 GPR16: 00000000100c0000 0000000000000000 00000000100dabc8 0000000010099688 GPR20: 0000000000000000 00000000100cfc28 0000000000000000 0000000010011a44 GPR24: 00000000100017b2 0000000000000000 0000000000000000 0000000000000880 GPR28: c00000000035fb28 800000000000a7b8 c000000000376d80 c0000000003cce50 NIP [8000000000008010] .test_exit+0x0/0x10 [qman_tester] LR [c000000000074858] .SyS_delete_module+0x1f8/0x2f0 Call Trace: [c00000002e29bd30] [c0000000000748b4] .SyS_delete_module+0x254/0x2f0 (unreliable) [c00000002e29be30] [c000000000000580] syscall_exit+0x0/0x2c Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 38600000 4e800020 60000000 60000000 <4e800020> 60000000 60000000 60000000 ---[ end trace 4f57124939a84dc8 ]--- This appears to be due to checking the wrong permission bits in the instruction_tlb_miss handling if the address that faulted was in vmalloc space. We need to look at the supervisor execute (_PAGE_BAP_SX) bit and not the user bit (_PAGE_BAP_UX/_PAGE_EXEC). Also removed a branch level since it did not appear to be used. Reported-by: Jeffrey Ladouceur Signed-off-by: Kumar Gala Signed-off-by: Benjamin Herrenschmidt commit 1c2c25c78740b2796c7c06640784cb6732fa4907 Author: Michael Neuling Date: Wed Nov 17 16:32:59 2010 +0000 powerpc: Fix call to subpage_protection() In: powerpc/mm: Fix pgtable cache cleanup with CONFIG_PPC_SUBPAGE_PROT commit d28513bc7f675d28b479db666d572e078ecf182d Author: David Gibson subpage_protection() was changed to to take an mm rather a pgdir but it didn't change calling site in hashpage_preload(). The change wasn't noticed at compile time since hashpage_preload() used a void* as the parameter to subpage_protection(). This is obviously wrong and can trigger the following crash when CONFIG_SLAB, CONFIG_DEBUG_SLAB, CONFIG_PPC_64K_PAGES CONFIG_PPC_SUBPAGE_PROT are enabled. Freeing unused kernel memory: 704k freed Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6c49b7 Faulting instruction address: 0xc0000000000410f4 cpu 0x2: Vector: 300 (Data Access) at [c00000004233f590] pc: c0000000000410f4: .hash_preload+0x258/0x338 lr: c000000000041054: .hash_preload+0x1b8/0x338 sp: c00000004233f810 msr: 8000000000009032 dar: 6b6b6b6b6b6c49b7 dsisr: 40000000 current = 0xc00000007e2c0070 paca = 0xc000000007fe0500 pid = 1, comm = init enter ? for help [c00000004233f810] c000000000041020 .hash_preload+0x184/0x338 (unreliable) [c00000004233f8f0] c00000000003ed98 .update_mmu_cache+0xb0/0xd0 [c00000004233f990] c000000000157754 .__do_fault+0x48c/0x5dc [c00000004233faa0] c000000000158fd0 .handle_mm_fault+0x508/0xa8c [c00000004233fb90] c0000000006acdd4 .do_page_fault+0x428/0x6ac [c00000004233fe30] c000000000005260 handle_page_fault+0x20/0x74 Signed-off-by: Benjamin Herrenschmidt commit 234a71a7d64832e4aa8d9b5c80133480b86f6de3 Author: kerstin jonsson Date: Fri Oct 22 00:17:55 2010 +0000 powerpc: Set CONFIG_32BIT on ppc32 commit ffe8018c3424892c9590048fc36caa6c3e0c8a76 of the -mm tree fixes the initramfs size calculation for e.g. s390 but breaks it for 32bit architectures which do not define CONFIG_32BIT. This patch fix the problem for PPC32 which will elsewise end up with a __initramfs_size of 0. Signed-off-by: Kerstin Jonsson Signed-off-by: Benjamin Herrenschmidt commit 4a89261b02d421cc1bcadaaebb90bb7919db0854 Author: Kumar Gala Date: Wed Nov 10 12:29:49 2010 +0000 powerpc/mm: Fix build error in setup_initial_memory_limit arch/powerpc/mm/tlb_nohash.c: In function 'setup_initial_memory_limit': arch/powerpc/mm/tlb_nohash.c:588:29: error: 'ppc64_memblock_base' undeclared (first use in this function) arch/powerpc/mm/tlb_nohash.c:588:29: note: each undeclared identifier is reported only once for each function it appears in Due to a copy/paste typo with the following commit: commit cd3db0c4ca3d237e7ad20f7107216e575705d2b0 Author: Benjamin Herrenschmidt Date: Tue Jul 6 15:39:02 2010 -0700 memblock: Remove rmo_size, burry it in arch/powerpc where it belongs Signed-off-by: Kumar Gala Signed-off-by: Benjamin Herrenschmidt commit 01cf6fe8553b0ac649f3323d8da69b51cad8c468 Author: Nishanth Aravamudan Date: Thu Oct 14 14:48:52 2010 +0000 powerpc/pseries: Don't override CONFIG_PPC_PSERIES_DEBUG EEH and pci_dlpar #undef DEBUG, but I think they were added before the ability to control this from Kconfig. It's really annoying to only get some of the debug messages from these files. Leave the lpar.c #undef alone as it produces so much output as to make the kernel unusable. Update the Kconfig text to indicate this particular quirk :) Signed-off-by: Nishanth Aravamudan Acked-by: Michael Ellerman Signed-off-by: Benjamin Herrenschmidt commit acbfd58e8a1f24ef644a90a90825c3f435b990f5 Author: Benjamin Herrenschmidt Date: Thu Nov 18 14:39:24 2010 +1100 powerpc: Fix div64 in bootloader The code is missing a fix that went into the main kernel variant (we should try to share that code again at some stage) Reported-by: Albert Cahalan Signed-off-by: Benjamin Herrenschmidt commit 0a5b871ea4c6bfb2723ac2ffc7ef5c32452abb89 Author: Linus Torvalds Date: Wed Nov 17 18:36:25 2010 -0800 hardirq.h: remove now-empty #ifdef/#endif pair Commit 451a3c24b013 ("BKL: remove extraneous #include ") removed the #include line that was the only thing that was surrounded by the #ifdef/#endif. So now that #ifdef is guarding nothing at all. Just remove it. Reported-by: Byeong-ryeol Kim Signed-off-by: Linus Torvalds commit 7957f0a857754c555e07f58a3fb83ac29501478c Author: Linus Torvalds Date: Wed Nov 17 14:58:36 2010 -0800 Fix build failure due to hwirq.h needing smp_lock.h Arnd Bergmann did an automated scripting run to find left-over instances of , and had made it trigger it on the normal BKL use of lock_kernel and unlock_lernel (and apparently release_kernel_lock and reacquire_kernel_lock too, used by the scheduler). That resulted in commit 451a3c24b013 ("BKL: remove extraneous #include "). However, hardirq.h was the only remaining user of the old 'kernel_locked()' interface, and Arnd's script hadn't checked for that. So depending on your configuration and what header files had been included, you would get errors like "implicit declaration of function 'kernel_locked'" during the build. The right fix is not to just re-instate the smp_lock.h include - it is to just remove 'kernel_locked()' entirely, since the only use was this one special low-level detail. Just make hardirq.h do it directly. In fact this simplifies and clarifies the code, because some trivial analysis makes it clear that hardirq.h only ever used _one_ of the two definitions of kernel_locked(), so we can remove the other one entirely. Reported-by: Zimny Lech Reported-and-acked-by: Randy Dunlap Acked-by: Arnd Bergmann Signed-off-by: Linus Torvalds commit c8770e7ba63bb5dd8fe5f9d251275a8fa717fb78 Author: Avi Kivity Date: Thu Nov 11 12:37:26 2010 +0200 KVM: VMX: Fix host userspace gsbase corruption We now use load_gs_index() to load gs safely; unfortunately this also changes MSR_KERNEL_GS_BASE, which we managed separately. This resulted in confusion and breakage running 32-bit host userspace on a 64-bit kernel. Fix by - saving guest MSR_KERNEL_GS_BASE before we we reload the host's gs - doing the host save/load unconditionally, instead of only when in guest long mode Things can be cleaned up further, but this is the minmal fix for now. Signed-off-by: Avi Kivity Signed-off-by: Marcelo Tosatti commit 0a77fe4c188e25917799f2356d4aa5e6d80c39a2 Author: Avi Kivity Date: Tue Oct 19 18:48:35 2010 +0200 KVM: Correct ordering of ldt reload wrt fs/gs reload If fs or gs refer to the ldt, they must be reloaded after the ldt. Reorder the code to that effect. Userspace code that uses the ldt with kvm is nonexistent, so this doesn't fix a user-visible bug. Signed-off-by: Avi Kivity Signed-off-by: Marcelo Tosatti commit e3839ed8e89e79202c0402ac46965c0686897890 Author: Dongdong Deng Date: Tue Nov 16 16:02:00 2010 -0600 kgdb,ppc: Fix regression in evr register handling Commit ff10b88b5a05c8f1646dd15fb9f6093c1384ff6d (kgdb,ppc: Individual register get/set for ppc) introduced a problem where memcpy was used incorrectly to read and write the evr registers with a kernel that has: CONFIG_FSL_BOOKE=y CONFIG_SPE=y CONFIG_KGDB=y This patch also fixes the following compilation problems: arch/powerpc/kernel/kgdb.c: In function 'dbg_get_reg': arch/powerpc/kernel/kgdb.c:341: error: passing argument 2 of 'memcpy' makes pointer from integer without a cast arch/powerpc/kernel/kgdb.c: In function 'dbg_set_reg': arch/powerpc/kernel/kgdb.c:366: error: passing argument 1 of 'memcpy' makes pointer from integer without a cast [jason.wessel@windriver.com: Remove void * casts and fix patch header] Reported-by: Milton Miller Signed-off-by: Dongdong Deng Acked-by: Kumar Gala Signed-off-by: Jason Wessel CC: linuxppc-dev@lists.ozlabs.org commit 10a6e67648d4b47769953bd24759ba9609bf00df Author: Jason Wessel Date: Mon Nov 15 08:07:35 2010 -0600 kgdb,x86: fix regression in detach handling The fix from ba773f7c510c0b252145933926c636c439889207 (x86,kgdb: Fix hw breakpoint regression) was not entirely complete. The kgdb_remove_all_hw_break() function also needs to call the hw_break_release_slot() or else a breakpoint can get activated again after the debugger has detached. The kgdb test suite exposes the behavior in the form of either a hang or repetitive failure. The kernel config that exposes the problem contains all of the following: CONFIG_DEBUG_RODATA=y CONFIG_KGDB_TESTS=y CONFIG_KGDB_TESTS_ON_BOOT=y CONFIG_KGDB_TESTS_BOOT_STRING="V1F100" Reported-by: Frederic Weisbecker Signed-off-by: Jason Wessel Tested-by: Frederic Weisbecker commit 5450d904054b4ed582793ad6ecb5469f03cc4c46 Author: Jovi Zhang Date: Wed Nov 10 07:22:18 2010 -0600 kdb: fix crash when KDB_BASE_CMD_MAX is exceeded When the number of dyanmic kdb commands exceeds KDB_BASE_CMD_MAX, the kernel will fault. Signed-off-by: Jovi Zhang Signed-off-by: Jason Wessel commit 85e76ab50aecbdc9011806f2f8943450ccb0d93c Author: Jovi Zhang Date: Wed Nov 10 07:22:18 2010 -0600 kdb: fix memory leak in kdb_main.c Call kfree in the error path as well as the success path in kdb_ll(). Signed-off-by: Jovi Zhang Signed-off-by: Jason Wessel commit 23e701e6208191ad103517ae7a700f2dc59ab2ec Author: Jeff Garzik Date: Wed Nov 17 12:03:58 2010 -0500 [libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd cmd->serial_number is never tested in any path we reach; therefore we may remove the call to scsi_cmd_get_serial() inside DEF_SCSI_QCMD, the SCSI host_lock acquisition surrounding it, and our own SCSI host_lock unlock+relock cycle. Signed-off-by: Jeff Garzik commit 460781b54253e3ed10a0a2a433bdc548ec952269 Author: Arnd Bergmann Date: Wed Nov 17 16:26:56 2010 +0100 BKL: remove references to lock_kernel from comments Lock_kernel is gone from the code, so the comments should be updated, too. nfsd now uses lock_flocks instead of lock_kernel to protect against posix file locks. Signed-off-by: Arnd Bergmann Acked-by: J. Bruce Fields Cc: linux-nfs@vger.kernel.org Signed-off-by: Linus Torvalds commit 451a3c24b0135bce54542009b5fde43846c7cf67 Author: Arnd Bergmann Date: Wed Nov 17 16:26:55 2010 +0100 BKL: remove extraneous #include The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds commit 55f6561c6941713ab5ae9180525b026dd40b7d14 Author: Arnd Bergmann Date: Wed Nov 17 16:26:53 2010 +0100 staging/stradis: mark as "depends on BKL" The stradis driver is on its way out, but it should still be marked correctly as depending on the big kernel lock. It could easily be changed to not require it if someone decides to revive the driver and port it to v4l2 in the process. Signed-off-by: Arnd Bergmann Reported-by: Sedat Dilek Cc: Nathan Laredo Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 59365d136d205cc20fe666ca7f89b1c5001b0d5a Author: Marcus Meissner Date: Tue Nov 16 11:46:03 2010 +0100 kernel: make /proc/kallsyms mode 400 to reduce ease of attacking Making /proc/kallsyms readable only for root by default makes it slightly harder for attackers to write generic kernel exploits by removing one source of knowledge where things are in the kernel. This is the second submit, discussion happened on this on first submit and mostly concerned that this is just one hole of the sieve ... but one of the bigger ones. Changing the permissions of at least System.map and vmlinux is also required to fix the same set, but a packaging issue. Target of this starter patch and follow ups is removing any kind of kernel space address information leak from the kernel. [ Side note: the default of root-only reading is the "safe" value, and it's easy enough to then override at any time after boot. The /proc filesystem allows root to change the permissions with a regular chmod, so you can "revert" this at run-time by simply doing chmod og+r /proc/kallsyms as root if you really want regular users to see the kernel symbols. It does help some tools like "perf" figure them out without any setup, so it may well make sense in some situations. - Linus ] Signed-off-by: Marcus Meissner Acked-by: Tejun Heo Acked-by: Eugene Teo Reviewed-by: Jesper Juhl Signed-off-by: Linus Torvalds commit 1d6636502b23a964f4e5aac5237d1bbb76a9f912 Merge: d33fdee 04e4bd1 Author: Linus Torvalds Date: Tue Nov 16 18:46:28 2010 -0800 Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: nfs: Ignore kmemleak false positive in nfs_readdir_make_qstr SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable nfs: trivial: remove unused nfs_wait_event macro NFS: readdir shouldn't read beyond the reply returned by the server NFS: Fix a couple of regressions in readdir. Revert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR" Regression: fix mounting NFS when NFSv3 support is not compiled NLM: Fix a regression in lockd commit d33fdee4d090076462cfe25473f7139c3204b16e Merge: 1e8703b 1e5a740 Author: Linus Torvalds Date: Tue Nov 16 15:20:05 2010 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix cross-sched-class wakeup preemption sched: Fix runnable condition for stoptask sched: Use group weight, idle cpu metrics to fix imbalances during idle commit 1e8703b2e6aefba84dd9633d90a4093ff1200b93 Merge: 4531491 00fafcd Author: Linus Torvalds Date: Tue Nov 16 15:18:17 2010 -0800 Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / PM QoS: Fix reversed min and max PM / OPP: Hide OPP configuration when SoCs do not provide an implementation PM: Allow devices to be removed during late suspend and early resume commit 45314915ed8089634144c975357bf5ba17f06ab9 Merge: f281233 4c115e9 Author: Linus Torvalds Date: Tue Nov 16 14:31:03 2010 -0800 Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Address compiler warnings in exit_robust_list commit f281233d3eba15fb225d21ae2e228fd4553d824a Author: Jeff Garzik Date: Tue Nov 16 02:10:29 2010 -0500 SCSI host lock push-down Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik Acked-by: James Bottomley Signed-off-by: Linus Torvalds commit bdbd01ac444bffb3c9aefed3059d12554059b320 Merge: 2ebc8ec 8c05cd0 Author: Linus Torvalds Date: Tue Nov 16 10:51:56 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fix offset check for sysfs mmapped files commit 2ebc8ec86fe0f3f3acf9ba9b41a368f819e7807e Merge: df6e61d 8948080 Author: Linus Torvalds Date: Tue Nov 16 09:27:13 2010 -0800 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] kprobes: Fix the return address of multiple kretprobes [S390] kprobes: disable interrupts throughout [S390] ftrace: build without frame pointers on s390 [S390] mm: add devmem_is_allowed() for STRICT_DEVMEM checking [S390] vmlogrdr: purge after recording is switched off [S390] cio: fix incorrect ccw_device_init_count [S390] tape: add medium state notifications [S390] fix get_user_pages_fast commit 8c05cd08a7504b855c265263e84af61aabafa329 Author: Darrick J. Wong Date: Tue Nov 16 09:13:41 2010 -0800 PCI: fix offset check for sysfs mmapped files I just loaded 2.6.37-rc2 on my machines, and I noticed that X no longer starts. Running an strace of the X server shows that it's doing this: open("/sys/bus/pci/devices/0000:07:00.0/resource0", O_RDWR) = 10 mmap(NULL, 16777216, PROT_READ|PROT_WRITE, MAP_SHARED, 10, 0) = -1 EINVAL (Invalid argument) This code seems to be asking for a shared read/write mapping of 16MB worth of BAR0 starting at file offset 0, and letting the kernel assign a starting address. Unfortunately, this -EINVAL causes X not to start. Looking into dmesg, there's a complaint like so: process "Xorg" tried to map 0x01000000 bytes at page 0x00000000 on 0000:07:00.0 BAR 0 (start 0x 96000000, size 0x 1000000) ...with the following code in pci_mmap_fits: pci_start = (mmap_api == PCI_MMAP_SYSFS) ? pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0; if (start >= pci_start && start < pci_start + size && start + nr <= pci_start + size) It looks like the logic here is set up such that when the mmap call comes via sysfs, the check in pci_mmap_fits wants vma->vm_pgoff to be between the resource's start and end address, and the end of the vma to be no farther than the end. However, the sysfs PCI resource files always start at offset zero, which means that this test always fails for programs that mmap the sysfs files. Given the comment in the original commit 3b519e4ea618b6943a82931630872907f9ac2c2b, I _think_ the old procfs files require that the file offset be equal to the resource's base address when mmapping. I think what we want here is for pci_start to be 0 when mmap_api == PCI_MMAP_PROCFS. The following patch makes that change, after which the Matrox and Mach64 X drivers work again. Acked-by: Martin Wilck Signed-off-by: Darrick J. Wong Signed-off-by: Jesse Barnes commit 04e4bd1c67f941d81bff78a3b6b94194f081b7df Author: Catalin Marinas Date: Thu Nov 11 12:53:47 2010 +0000 nfs: Ignore kmemleak false positive in nfs_readdir_make_qstr Strings allocated via kmemdup() in nfs_readdir_make_qstr() are referenced from the nfs_cache_array which is stored in a page cache page. Kmemleak does not scan such pages and it reports several false positives. This patch annotates the string->name pointer so that kmemleak does not consider it a real leak. Signed-off-by: Catalin Marinas Cc: Bryan Schumaker Cc: Trond Myklebust Signed-off-by: Trond Myklebust commit 94f58df8e545657f0b2d16eca1ac7a4ec39ed6be Author: Jesper Juhl Date: Sun Nov 7 22:11:34 2010 +0100 SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable Hi, We can simplify net/sunrpc/stats.c::rpc_alloc_iostats() a bit by getting rid of the unneeded local variable 'new'. Please CC me on replies. Signed-off-by: Jesper Juhl Signed-off-by: Trond Myklebust commit 5685b971362651ee3d99ff3cc512c3bbd049d34d Author: Jeff Layton Date: Fri Nov 12 09:23:04 2010 -0500 nfs: trivial: remove unused nfs_wait_event macro Nothing uses this macro anymore. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust commit df6e61d4ca268dc8706db38222fde9f04701566c Author: Joe Perches Date: Mon Nov 15 21:17:27 2010 -0800 kernel/sysctl.c: Fix build failure with !CONFIG_PRINTK Sigh... Signed-off-by: Joe Perches Acked-by: Eric Paris Signed-off-by: Linus Torvalds commit ac39612824e1fad8baf82c2841e42b2142af3445 Author: Trond Myklebust Date: Mon Nov 15 20:26:22 2010 -0500 NFS: readdir shouldn't read beyond the reply returned by the server Signed-off-by: Trond Myklebust commit 8cd51a0ccd1beda4482507769887c0be9d70f8c1 Author: Trond Myklebust Date: Mon Nov 15 20:26:22 2010 -0500 NFS: Fix a couple of regressions in readdir. Fix up the issue that array->eof_index needs to be able to be set even if array->size == 0. Ensure that we catch all important memory allocation error conditions and/or kmap() failures. Signed-off-by: Trond Myklebust commit 23ebbd9acf5756b6eb783df84403e3ab668a6bce Author: Trond Myklebust Date: Wed Nov 3 10:24:16 2010 -0400 Revert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR" This reverts commit 80e60639f1b7c121a7fea53920c5a4b94009361a. This change requires further fixes to ensure that the open doesn't succeed if the lookup later results in a regular file being created. Signed-off-by: Trond Myklebust commit 1e657bd51f313d87fbbb22d1edf625dba87ef353 Author: Paulius Zaleckas Date: Sun Oct 31 18:21:05 2010 +0200 Regression: fix mounting NFS when NFSv3 support is not compiled Trying to mount NFS (root partition in my case) fails if CONFIG_NFS_V3 is not selected. nfs_validate_mount_data() returns EPROTONOSUPPORT, because of this check: #ifndef CONFIG_NFS_V3 if (args->version == 3) goto out_v3_not_compiled; #endif /* !CONFIG_NFS_V3 */ and args->version was always initialized to 3. It was working in 2.6.36 Signed-off-by: Paulius Zaleckas Signed-off-by: Trond Myklebust commit 8e35f8e7c61c88f9a979a4e6f7f4ffd4c158a88a Author: Trond Myklebust Date: Tue Nov 2 09:11:55 2010 -0400 NLM: Fix a regression in lockd Nick Bowler reports: There are no unusual messages on the client... but I just logged into the server and I see lots of messages of the following form: nfsd: request from insecure port (192.168.8.199:35766)! nfsd: request from insecure port (192.168.8.199:35766)! nfsd: request from insecure port (192.168.8.199:35766)! nfsd: request from insecure port (192.168.8.199:35766)! nfsd: request from insecure port (192.168.8.199:35766)! Bisected to commit 9247685088398cf21bcb513bd2832b4cd42516c4 (SUNRPC: Properly initialize sock_xprt.srcaddr in all cases) Apparently, removing the 'transport->srcaddr.ss_family = family' from xs_create_sock() triggers this due to nlmclnt_lookup_host() incorrectly initialising the srcaddr family to AF_UNSPEC. Reported-by: Nick Bowler Signed-off-by: Trond Myklebust commit 00fafcda1773245a5292f953321ec3f0668c8c28 Author: Colin Cross Date: Mon Nov 15 22:45:22 2010 +0100 PM / PM QoS: Fix reversed min and max pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect. Signed-off-by: Colin Cross Acked-by: mark Signed-off-by: Rafael J. Wysocki Cc: stable@kernel.org commit 1e5a74059f9059d330744eac84873b1b99657008 Author: Peter Zijlstra Date: Sun Oct 31 12:37:04 2010 +0100 sched: Fix cross-sched-class wakeup preemption Instead of dealing with sched classes inside each check_preempt_curr() implementation, pull out this logic into the generic wakeup preemption path. This fixes a hang in KVM (and others) where we are waiting for the stop machine thread to run ... Reported-by: Markus Trippelsdorf Tested-by: Marcelo Tosatti Tested-by: Sergey Senozhatsky Signed-off-by: Peter Zijlstra LKML-Reference: <1288891946.2039.31.camel@laptop> Signed-off-by: Ingo Molnar commit 43e60861fe9d39740cf5b355f58fecedf0d8e9ba Author: Mark Brown Date: Thu Nov 11 01:51:26 2010 +0100 PM / OPP: Hide OPP configuration when SoCs do not provide an implementation Since the OPP API is only useful with an appropraite SoC-specific implementation there is no point in offering the ability to enable the API on general systems. Provide an ARCH_HAS OPP Kconfig symbol which masks out the option unless selected by an implementation. Signed-off-by: Mark Brown Acked-by: Nishanth Menon Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit d08a5ace18dce9b18d8eb56bb6c0feef082b1b33 Author: Rafael J. Wysocki Date: Thu Nov 11 01:50:53 2010 +0100 PM: Allow devices to be removed during late suspend and early resume Holding dpm_list_mtx across late suspend and early resume of devices is problematic for the PCMCIA subsystem and doesn't allow device objects to be removed by late suspend and early resume driver callbacks. This appears to be overly restrictive, as drivers are generally allowed to remove device objects in other phases of suspend and resume. Therefore rework dpm_{suspend|resume}_noirq() so that they don't have to hold dpm_list_mtx all the time. Signed-off-by: Rafael J. Wysocki commit 2d46709082c062cae7cce1a15f8cd4cd81b92d88 Author: Peter Zijlstra Date: Tue Nov 9 14:36:52 2010 +0100 sched: Fix runnable condition for stoptask Heiko reported that the TASK_RUNNING check is not sufficient for CONFIG_PREEMPT=y since we can get preempted with !TASK_RUNNING. He suggested adding a ->se.on_rq test to the existing TASK_RUNNING one, however TASK_RUNNING will always have ->se.on_rq, so we might as well reduce that to a single test. [ stop tasks should never get preempted, but its good to handle this case correctly should this ever happen ] Reported-by: Heiko Carstens Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar commit aae6d3ddd8b90f5b2c8d79a2b914d1706d124193 Author: Suresh Siddha Date: Fri Sep 17 15:02:32 2010 -0700 sched: Use group weight, idle cpu metrics to fix imbalances during idle Currently we consider a sched domain to be well balanced when the imbalance is less than the domain's imablance_pct. As the number of cores and threads are increasing, current values of imbalance_pct (for example 25% for a NUMA domain) are not enough to detect imbalances like: a) On a WSM-EP system (two sockets, each having 6 cores and 12 logical threads), 24 cpu-hogging tasks get scheduled as 13 on one socket and 11 on another socket. Leading to an idle HT cpu. b) On a hypothetial 2 socket NHM-EX system (each socket having 8 cores and 16 logical threads), 16 cpu-hogging tasks can get scheduled as 9 on one socket and 7 on another socket. Leaving one core in a socket idle whereas in another socket we have a core having both its HT siblings busy. While this issue can be fixed by decreasing the domain's imbalance_pct (by making it a function of number of logical cpus in the domain), it can potentially cause more task migrations across sched groups in an overloaded case. Fix this by using imbalance_pct only during newly_idle and busy load balancing. And during idle load balancing, check if there is an imbalance in number of idle cpu's across the busiest and this sched_group or if the busiest group has more tasks than its weight that the idle cpu in this_group can pull. Reported-by: Nikhil Rao Signed-off-by: Suresh Siddha Signed-off-by: Peter Zijlstra LKML-Reference: <1284760952.2676.11.camel@sbsiddha-MOBL3.sc.intel.com> Signed-off-by: Ingo Molnar commit 4c115e951d80aff126468adaec7a6c7854f61ab8 Author: Darren Hart Date: Thu Nov 4 15:00:00 2010 -0400 futex: Address compiler warnings in exit_robust_list Since commit 1dcc41bb (futex: Change 3rd arg of fetch_robust_entry() to unsigned int*) some gcc versions decided to emit the following warning: kernel/futex.c: In function ‘exit_robust_list’: kernel/futex.c:2492: warning: ‘next_pi’ may be used uninitialized in this function The commit did not introduce the warning as gcc should have warned before that commit as well. It's just gcc being silly. The code path really can't result in next_pi being unitialized (or should not), but let's keep the build clean. Annotate next_pi as an uninitialized_var. [ tglx: Addressed the same issue in futex_compat.c and massaged the changelog ] Signed-off-by: Darren Hart Tested-by: Matt Fleming Tested-by: Uwe Kleine-König Cc: Peter Zijlstra Cc: Eric Dumazet Cc: John Kacur Cc: Ingo Molnar LKML-Reference: <1288897200-13008-1-git-send-email-dvhart@linux.intel.com> Signed-off-by: Thomas Gleixner commit 89480801a17a3069f45169d40b828c8e511aa005 Author: Martin Schwidefsky Date: Wed Nov 10 10:05:58 2010 +0100 [S390] kprobes: Fix the return address of multiple kretprobes Analog to git commit 737480a0d525dae13306296da08029dff545bc72 fix the return address of subsequent kretprobes when multiple kretprobes are set on the same function. Signed-off-by: Martin Schwidefsky commit adb45839817392102e659c19e5c19aa39530021f Author: Martin Schwidefsky Date: Wed Nov 10 10:05:57 2010 +0100 [S390] kprobes: disable interrupts throughout Execute the kprobe exception and fault handler with interrupts disabled. To disable the interrupts only while a single step is in progress is not good enough, a kprobe from interrupt context while another kprobe is handled can confuse the internal house keeping. Signed-off-by: Martin Schwidefsky commit becf91f18750cf1c60828aa2ee63a36b05c2e4d0 Author: Heiko Carstens Date: Wed Nov 10 10:05:56 2010 +0100 [S390] ftrace: build without frame pointers on s390 s390 doesn't need FRAME_POINTERS in order to have a working function tracer. We don't need frame pointers in order to get strack traces since we always have valid backchains by using the -mkernel-backchain gcc option. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit ec6743bb06510c7b629603ce35713d6ae9273579 Author: Hendrik Brueckner Date: Wed Nov 10 10:05:55 2010 +0100 [S390] mm: add devmem_is_allowed() for STRICT_DEVMEM checking Provide the devmem_is_allowed() routine to restrict access to kernel memory from userspace. Set the CONFIG_STRICT_DEVMEM config option to switch on checking. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky commit ca768b663131ca644689fcadc9ca092dcc96a758 Author: Stefan Weinhuber Date: Wed Nov 10 10:05:54 2010 +0100 [S390] vmlogrdr: purge after recording is switched off If automatic purge is enabled for a vmlogrdr device, old records are purged before an IUCV recording service is switched on or off. If z/VM generates a large number of records between purging and switching the recording service off, these records remain queued, and may have a negative performance impact on the z/VM system. To avoid this problem, we need to purge the records after recording is switched off. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit 16d2ce271c6b8b3527ed1461d03b5f373d53f78f Author: Sebastian Ott Date: Wed Nov 10 10:05:53 2010 +0100 [S390] cio: fix incorrect ccw_device_init_count If device recognition is interrupted by a subchannel event indicating that the device is gone, ccw_device_init_count is not correctly decreased. Fix this by reporting the corresponding event to the device recognition callback via the state machine. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 3b210e7652a0ac638b1a267b6a181c8f742d8462 Author: Martin Schwidefsky Date: Wed Nov 10 10:05:52 2010 +0100 [S390] tape: add medium state notifications Add uevent notifications for tape cartridge load and tape cartridge unload events. Signed-off-by: Martin Schwidefsky commit 25591b07033663e09f5e60355fc5ec4d4aa53e63 Author: Martin Schwidefsky Date: Wed Nov 10 10:05:51 2010 +0100 [S390] fix get_user_pages_fast The check for the _PAGE_RO bit in get_user_pages_fast for write==1 is the wrong way around. It must not be set for the fast path. Signed-off-by: Martin Schwidefsky