commit 76be97c1fc945db08aae1f1b746012662d643e97 Author: Linus Torvalds Date: Sun Aug 22 17:43:29 2010 -0700 Linux 2.6.36-rc2 commit 3dc8d7f07e7496c0c6702e7e4b1acc179fa94019 Merge: 4238a41 6b5d7a9 Author: Linus Torvalds Date: Sun Aug 22 11:27:36 2010 -0700 Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: PIT: free irq source id in handling error path KVM: destroy workqueue on kvm_create_pit() failures KVM: fix poison overwritten caused by using wrong xstate size commit 4238a417a91643e1162a98770288f630e37f0484 Merge: bc584c5 4fefe43 Author: Linus Torvalds Date: Sun Aug 22 11:03:27 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (58 commits) drm/i915,intel_agp: Add support for Sandybridge D0 drm/i915: fix render pipe control notify on sandybridge agp/intel: set 40-bit dma mask on Sandybridge drm/i915: Remove the conflicting BUG_ON() drm/i915/suspend: s/IS_IRONLAKE/HAS_PCH_SPLIT/ drm/i915/suspend: Flush register writes before busy-waiting. i915: disable DAC on Ironlake also when doing CRT load detection. drm/i915: wait for actual vblank, not just 20ms drm/i915: make sure eDP PLL is enabled at the right time drm/i915: fix VGA plane disable for Ironlake+ drm/i915: eDP mode set sequence corrections drm/i915: add panel reset workaround drm/i915: Enable RC6 on Ironlake. drm/i915/sdvo: Only set is_lvds if we have a valid fixed mode. drm/i915: Set up a render context on Ironlake drm/i915 invalidate indirect state pointers at end of ring exec drm/i915: Wake-up wait_request() from elapsed hang-check (v2) drm/i915: Apply i830 errata for cursor alignment drm/i915: Only update i845/i865 CURBASE when disabled (v2) drm/i915: FBC is updated within set_base() so remove second call in mode_set() ... commit bc584c5107bfd97e2aa41c798e3b213bcdd4eae7 Merge: a28e085 1ab335d Author: Linus Torvalds Date: Sun Aug 22 10:08:52 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slab: fix object alignment slub: add missing __percpu markup in mm/slub_def.h commit a28e0852d45e65d9edf249c36e432b5e0a80f01d Merge: e36c886 1cb0c92 Author: Linus Torvalds Date: Sun Aug 22 09:44:47 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: wait for discard to finish commit 4fefe435626758b14e6c05d2a5f8d71a997c0ad6 Author: Zhenyu Wang Date: Thu Aug 19 09:46:16 2010 +0800 drm/i915,intel_agp: Add support for Sandybridge D0 Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 3fdef0205e69b80c4219f14b834cb85eb719039f Author: Zhenyu Wang Date: Thu Aug 19 09:46:15 2010 +0800 drm/i915: fix render pipe control notify on sandybridge This one is missed in last pipe control fix for sandybridge, that really unmask interrupt bit for notify in render engine IMR. Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 877fdacf8291d7627f339885b5ae52c2f6061734 Author: Zhenyu Wang Date: Thu Aug 19 09:46:13 2010 +0800 agp/intel: set 40-bit dma mask on Sandybridge Signed-off-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 156dadc180a1bd3a25d644ee6c361afc465ccd0e Author: Chris Wilson Date: Sun Aug 15 10:52:34 2010 +0100 drm/i915: Remove the conflicting BUG_ON() We now attempt to free "active" objects following a GPU hang as either the GPU will be reset or the hang is permenant. In either case, the GPU writes will not be flushed to main memory and it should be safe to return that memory back to the system. The BUG_ON(active) is thus overkill and can erroneously fire after a EIO. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 90eb77baaea35c591bd324b31e9eac032bd603c9 Author: Chris Wilson Date: Sat Aug 14 14:41:23 2010 +0100 drm/i915/suspend: s/IS_IRONLAKE/HAS_PCH_SPLIT/ For the shared paths on the next generation chipsets. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 72bcb2690927f04c0479cd0d83825f09f3bf4d4f Author: Chris Wilson Date: Sat Aug 14 14:41:22 2010 +0100 drm/i915/suspend: Flush register writes before busy-waiting. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit d5dd96cb280993a6096b42ab082f9cfd9c7ae0bd Author: Dave Airlie Date: Wed Aug 4 15:52:19 2010 +1000 i915: disable DAC on Ironlake also when doing CRT load detection. Like on Sandybridge, disabling the DAC here when doing CRT load detect avoids forever hangs waiting on the hardware. test procedure on HP 2740p: boot with no VGA plugged in, start X, plug in VGA monitor (1280x1024) chvt 3 machine hangs waiting forever. Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt commit 9d0498a2bf7455159b317f19531a3e5db2ecc9c4 Author: Jesse Barnes Date: Wed Aug 18 13:20:54 2010 -0700 drm/i915: wait for actual vblank, not just 20ms Waiting for a hard coded 20ms isn't always enough to make sure a vblank period has actually occurred, so add code to make sure we really have passed through a vblank period (or that the pipe is off when disabling). This prevents problems with mode setting and link training, and seems to fix a bug like https://bugs.freedesktop.org/show_bug.cgi?id=29278, but on an HP 8440p instead. Hopefully also fixes https://bugs.freedesktop.org/show_bug.cgi?id=29141. Signed-off-by: Jesse Barnes Signed-off-by: Eric Anholt commit e36c886a0f9d624377977fa6cae309cfd7f362fa Author: Arjan van de Ven Date: Sat Aug 21 13:07:26 2010 -0700 workqueue: Add basic tracepoints to track workqueue execution With the introduction of the new unified work queue thread pools, we lost one feature: It's no longer possible to know which worker is causing the CPU to wake out of idle. The result is that PowerTOP now reports a lot of "kworker/a:b" instead of more readable results. This patch adds a pair of tracepoints to the new workqueue code, similar in style to the timer/hrtimer tracepoints. With this pair of tracepoints, the next PowerTOP can correctly report which work item caused the wakeup (and how long it took): Interrupt (43) i915 time 3.51ms wakeups 141 Work ieee80211_iface_work time 0.81ms wakeups 29 Work do_dbs_timer time 0.55ms wakeups 24 Process Xorg time 21.36ms wakeups 4 Timer sched_rt_period_timer time 0.01ms wakeups 1 Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds commit 69b26c7ad00fd5b6129400725e2ffb95134a0e1b Merge: ddb0c5a cfe3fda Author: Linus Torvalds Date: Sat Aug 21 12:47:05 2010 -0700 Merge git://git.infradead.org/mtd-2.6 * git://git.infradead.org/mtd-2.6: mtd: nand: Fix probe of Samsung NAND chips mtd: nand: Fix regression in BBM detection pxa3xx: fix ns2cycle equation commit ddb0c5a689c857bb13a42d9a3f0a7604497b3a29 Author: Samuel Thibault Date: Sat Aug 21 21:32:41 2010 +0200 Replace Configure with Enable in description of MAXSMP The "Configure" word tends to make user believe they have to say 'yes' to be able to choose the number of procs/nodes. "Enable" should be unambiguous enough. Signed-off-by: Samuel Thibault Signed-off-by: Linus Torvalds commit 0e8e50e20c837eeec8323bba7dcd25fe5479194c Author: Linus Torvalds Date: Fri Aug 20 16:49:40 2010 -0700 mm: make stack guard page logic use vm_prev pointer Like the mlock() change previously, this makes the stack guard check code use vma->vm_prev to see what the mapping below the current stack is, rather than have to look it up with find_vma(). Also, accept an abutting stack segment, since that happens naturally if you split the stack with mlock or mprotect. Tested-by: Ian Campbell Signed-off-by: Linus Torvalds commit 7798330ac8114c731cfab83e634c6ecedaa233d7 Author: Linus Torvalds Date: Fri Aug 20 16:39:25 2010 -0700 mm: make the mlock() stack guard page checks stricter If we've split the stack vma, only the lowest one has the guard page. Now that we have a doubly linked list of vma's, checking this is trivial. Tested-by: Ian Campbell Signed-off-by: Linus Torvalds commit 297c5eee372478fc32fec5fe8eed711eedb13f3d Author: Linus Torvalds Date: Fri Aug 20 16:24:55 2010 -0700 mm: make the vma list be doubly linked It's a really simple list, and several of the users want to go backwards in it to find the previous vma. So rather than have to look up the previous entry with 'find_vma_prev()' or something similar, just make it doubly linked instead. Tested-by: Ian Campbell Signed-off-by: Linus Torvalds commit cfe3fdadb16162327773ef01a575a32000b8c7f4 Author: Tilman Sauerbeck Date: Fri Aug 20 14:01:47 2010 -0700 mtd: nand: Fix probe of Samsung NAND chips Apparently, the check for a 6-byte ID string introduced by commit 426c457a3216fac74e3d44dd39729b0689f4c7ab ("mtd: nand: extend NAND flash detection to new MLC chips") is NOT sufficient to determine whether or not a Samsung chip uses their new MLC detection scheme or the old, standard scheme. This adds a condition to check cell type. Signed-off-by: Tilman Sauerbeck Signed-off-by: Brian Norris Signed-off-by: David Woodhouse Cc: stable@kernel.org commit 36423a5ed5e4ea95ceedb68fad52965033e11639 Merge: f6143a9 05e4076 Author: Linus Torvalds Date: Fri Aug 20 14:25:08 2010 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, apic: Fix apic=debug boot crash x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues x86-32: Fix dummy trampoline-related inline stubs x86-32: Separate 1:1 pagetables from swapper_pg_dir x86, cpu: Fix regression in AMD errata checking code commit f6143a9b732977859cb6e04c604d04976aa5ccbd Author: Stephen Rothwell Date: Fri Aug 20 19:56:31 2010 +1000 Documentation: fix ozlabs.org mailing list address This list moved to lists.ozlabs.org quite some time ago. Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit a4724ed6f084fd294b001103a68c3196eb60364c Author: Stephen Rothwell Date: Fri Aug 20 19:52:45 2010 +1000 MAINTAINERS: Fix ozlabs.org mailing list addresses All these lists moved to lists.ozlabs.org quite a while ago. Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit 1ee41680572971e34d90d5f584daf33195ec6dcb Author: Stefan Richter Date: Thu Aug 19 14:13:43 2010 -0700 Documentation: kernel-locking: mutex_trylock cannot be used in interrupt context Chapter 6 is right about mutex_trylock, but chapter 10 wasn't. This error was introduced during semaphore-to-mutex conversion of the Unreliable guide. :-) If user context which performs mutex_lock() or mutex_trylock() is preempted by interrupt context which performs mutex_trylock() on the same mutex instance, a deadlock occurs. This is because these functions do not disable local IRQs when they operate on mutex->wait_lock. Signed-off-by: Stefan Richter Acked-by: Rusty Russell Cc: Matthew Wilcox Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 626115cda9a31d7618cfd5ca8928811e5947d360 Author: Andrew Morton Date: Thu Aug 19 14:13:42 2010 -0700 drivers/scsi/qla4xxx: fix build gcc-4.0.2: drivers/scsi/qla4xxx/ql4_os.c: In function 'qla4_8xxx_error_recovery': drivers/scsi/qla4xxx/ql4_glbl.h:135: sorry, unimplemented: inlining failed in call to 'qla4_8xxx_set_drv_active': function body not available drivers/scsi/qla4xxx/ql4_os.c:2377: sorry, unimplemented: called from here drivers/scsi/qla4xxx/ql4_glbl.h:135: sorry, unimplemented: inlining failed in call to 'qla4_8xxx_set_drv_active': function body not available drivers/scsi/qla4xxx/ql4_os.c:2393: sorry, unimplemented: called from here Cc: Ravi Anand Cc: Vikas Chaudhary Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3c072ad727617f00bffae17dba8cd895f5b7bdb Author: Miklos Szeredi Date: Thu Aug 19 14:13:40 2010 -0700 uml: fix compile error in dma_get_cache_alignment() Fix uml compile error: include/linux/dma-mapping.h:145: error: redefinition of 'dma_get_cache_alignment' arch/um/include/asm/dma-mapping.h:99: note: previous definition of 'dma_get_cache_alignment' was here Introduced by commit 4565f0170dfc ("dma-mapping: unify dma_get_cache_alignment implementations") Signed-off-by: Miklos Szeredi Cc: Jeff Dike Cc: FUJITA Tomonori Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d6c83f0ba5e1bd1e8bb2e3c7de4c276dc247f99 Author: KOSAKI Motohiro Date: Thu Aug 19 14:13:39 2010 -0700 oom: __task_cred() need rcu_read_lock() dump_tasks() needs to hold the RCU read lock around its access of the target task's UID. To this end it should use task_uid() as it only needs that one thing from the creds. The fact that dump_tasks() holds tasklist_lock is insufficient to prevent the target process replacing its credentials on another CPU. Then, this patch change to call rcu_read_lock() explicitly. =================================================== [ INFO: suspicious rcu_dereference_check() usage. ] --------------------------------------------------- mm/oom_kill.c:410 invoked rcu_dereference_check() without protection! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 1 4 locks held by kworker/1:2/651: #0: (events){+.+.+.}, at: [] process_one_work+0x137/0x4a0 #1: (moom_work){+.+...}, at: [] process_one_work+0x137/0x4a0 #2: (tasklist_lock){.+.+..}, at: [] out_of_memory+0x164/0x3f0 #3: (&(&p->alloc_lock)->rlock){+.+...}, at: [] find_lock_task_mm+0x2e/0x70 Signed-off-by: KOSAKI Motohiro Signed-off-by: David Howells Acked-by: Paul E. McKenney Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b52723c5607f7684c2c0c075f86f86da0d7fb6d0 Author: KOSAKI Motohiro Date: Thu Aug 19 14:13:39 2010 -0700 oom: fix tasklist_lock leak Commit 0aad4b3124 ("oom: fold __out_of_memory into out_of_memory") introduced a tasklist_lock leak. Then it caused following obvious danger warnings and panic. ================================================ [ BUG: lock held when returning to user space! ] ------------------------------------------------ rsyslogd/1422 is leaving the kernel with locks still held! 1 lock held by rsyslogd/1422: #0: (tasklist_lock){.+.+.+}, at: [] out_of_memory+0x164/0x3f0 BUG: scheduling while atomic: rsyslogd/1422/0x00000002 INFO: lockdep is turned off. This patch fixes it. Signed-off-by: KOSAKI Motohiro Reviewed-by: Minchan Kim Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be71cf2202971e50ce4953d473649c724799eb8a Author: KOSAKI Motohiro Date: Thu Aug 19 14:13:38 2010 -0700 oom: fix NULL pointer dereference Commit b940fd7035 ("oom: remove unnecessary code and cleanup") added an unnecessary NULL pointer dereference. remove it. Signed-off-by: KOSAKI Motohiro Reviewed-by: Minchan Kim Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f522886e202a34a2191dd5d471b3c4d46410a9a0 Author: Kyungmin Park Date: Thu Aug 19 14:13:37 2010 -0700 drivers/mmc/host/sdhci-s3c.c: use the correct mutex and card detect function There's some merge problem between sdhic core and sdhci-s3c host. After mutex is changed to spinlock. It needs to use use spin lock functions and use the correct card detection function. Signed-off-by: Kyungmin Park Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5193250168ccdf87364e35a11965336dc088578c Author: Kyungmin Park Date: Thu Aug 19 14:13:35 2010 -0700 sdhci: add no hi-speed bit quirk support Some SDHCI controllers like s5pc110 don't have an HISPD bit in the HOSTCTL register. Signed-off-by: Kyungmin Park Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 930a6f70fa3b9c79a57dd6850ef9cb1efa470575 Author: Kyungmin Park Date: Thu Aug 19 14:13:35 2010 -0700 s5pc110: SDHCI-s3c support on s5pc110 s5pc110 (aka s5pv210) uses the same SDHCI IP. Signed-off-by: Kyungmin Park Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 944645c33e4ada914f4c045525a9293610085ccd Author: Kyungmin Park Date: Thu Aug 19 14:13:34 2010 -0700 s5pc110: SDHCI-s3c can override host capabilities Each board can override the default sdhci host capabilities. Some board has broken features by hardwares and support 8-bit bandwidth. Signed-off-by: Kyungmin Park Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5ed3a4af77b851b6271ad3d9abc4c57fa3ce0f5 Author: Jan Kara Date: Thu Aug 19 14:13:33 2010 -0700 lib/radix-tree.c: fix overflow in radix_tree_range_tag_if_tagged() When radix_tree_maxindex() is ~0UL, it can happen that scanning overflows index and tree traversal code goes astray reading memory until it hits unreadable memory. Check for overflow and exit in that case. Signed-off-by: Jan Kara Cc: Christoph Hellwig Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2e41e910320197d55b52e28d99a07130f2ae738 Author: Andrew Morton Date: Thu Aug 19 14:13:31 2010 -0700 revert "hwmon: f71882fg: add support for the Fintek F71808E" Revert commit 7721fea3d0fd93fb4d000eb737b444369358d6d3 ("hwmon: f71882fg: add support for the Fintek F71808E"). Hans said: : A second review after I've received a data sheet for this device from : Fintek has turned up a few bugs. : : Unfortunately Giel (nor I) have time to fix this in time for the 2.6.36 : cycle. Therefor I would like to see this patch reverted as not having any : support for the hwmon function of this superio chip is better then having : unreliable support. Cc: Giel van Schijndel Cc: Jean Delvare Cc: Hans de Goede Cc: Jonathan Cameron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a25effa4d265eb5028c7d4a92a0ddd9267c3c43d Author: Andrea Righi Date: Thu Aug 19 14:13:30 2010 -0700 kfifo: add explicit error checking in all the examples Provide a check in all the kfifo examples to validate the correct execution of each testcase. Signed-off-by: Andrea Righi Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d83a71c4219191a9a881318ae5ca9b39aa1d0540 Author: Andrea Righi Date: Thu Aug 19 14:13:30 2010 -0700 kfifo: fix a memory leak in dma example We use a dynamically allocated kfifo in the dma example, so we need to free it when unloading the module. Signed-off-by: Andrea Righi Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b34d5257a90c419d67c1c3b52f87a679845ef1e Author: Andrea Righi Date: Thu Aug 19 14:13:29 2010 -0700 kfifo: fix kernel BUG in dma example The scatterlist is used uninitialized in kfifo_dma_in_prepare(). This triggers the following bug if CONFIG_DEBUG_SG=y: ------------[ cut here ]------------ kernel BUG at include/linux/scatterlist.h:65! invalid opcode: 0000 [#1] PREEMPT SMP ... Call Trace: [] setup_sgl+0x6b/0xe0 [] ? example_init+0x0/0x265 [dma_example] [] __kfifo_dma_in_prepare+0x21/0x30 [] example_init+0x124/0x265 [dma_example] [] ? trace_module_notify+0x25/0x370 [] ? free_pages_prepare+0x11e/0x1e0 [] ? get_parent_ip+0x11/0x50 [] ? trace_module_notify+0x25/0x370 [] ? trace_hardirqs_on+0xd/0x10 [] ? mutex_unlock+0xe/0x10 [] ? trace_module_notify+0x41/0x370 [] ? __blocking_notifier_call_chain+0x45/0x80 [] ? vfree+0x2a/0x30 [] ? up_read+0x23/0x40 [] ? __blocking_notifier_call_chain+0x65/0x80 [] do_one_initcall+0x43/0x180 [] sys_init_module+0xba/0x200 [] system_call_fastpath+0x16/0x1b RIP [] setup_sgl_buf+0x1a1/0x1b0 RSP ---[ end trace a72b979fd3c1d3a5 ]--- Add the proper initialization to avoid the bug. Signed-off-by: Andrea Righi Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2aaf2092c168fc02df0645415f524b357ee7ec2e Author: Andrea Righi Date: Thu Aug 19 14:13:29 2010 -0700 kfifo: add explicit error checking in byte stream example Provide a static array of expected items that kfifo should contain at the end of the test to validate it. Signed-off-by: Andrea Righi Cc: Stefani Seibold Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ddf83912c8b49a24ab0841f6d77f33781dcf10f Author: Andrea Righi Date: Thu Aug 19 14:13:28 2010 -0700 kfifo: add kfifo_skip() testcase Add a testcase for kfifo_skip() to the byte stream fifo example. Signed-off-by: Andrea Righi Cc: Greg KH Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b35de43b31040828f83046f40fd34ba33146409d Author: Andrea Righi Date: Thu Aug 19 14:13:27 2010 -0700 kfifo: implement missing __kfifo_skip_r() kfifo_skip() is currently broken, due to the missing of the internal helper function. Add it. Signed-off-by: Andrea Righi Cc: Greg KH Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c81476df1b4241aefba4ff83a7701b3a926bd7ce Author: Ondrej Zary Date: Thu Aug 19 14:13:25 2010 -0700 matroxfb: fix incorrect use of memcpy_toio() Screen is completely corrupted since 2.6.34. Bisection revealed that it's caused by commit 6175ddf06b61720 ("x86: Clean up mem*io functions."). H. Peter Anvin explained that memcpy_toio() does not copy data in 32bit chunks anymore on x86. Signed-off-by: Ondrej Zary Cc: Brian Gerst Cc: H. Peter Anvin Cc: Petr Vandrovec Cc: Jean Delvare Cc: [2.6.34.x, 2.6.35.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05e407603e527f9d808dd3866d3a17c2ce4dfcc5 Author: Daniel Kiper Date: Fri Aug 20 00:46:16 2010 +0200 x86, apic: Fix apic=debug boot crash Fix a boot crash when apic=debug is used and the APIC is not properly initialized. This issue appears during Xen Dom0 kernel boot but the fix is generic and the crash could occur on real hardware as well. Signed-off-by: Daniel Kiper Cc: xen-devel@lists.xensource.com Cc: konrad.wilk@oracle.com Cc: jeremy@goop.org Cc: # .35.x, .34.x, .33.x, .32.x LKML-Reference: <20100819224616.GB9967@router-fw-old.local.net-space.pl> Signed-off-by: Ingo Molnar commit d7c53c9e822a4fefa13a0cae76f3190bfd0d5c11 Author: Borislav Petkov Date: Thu Aug 19 20:10:29 2010 +0200 x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues When testing cpu hotplug code on 32-bit we kept hitting the "CPU%d: Stuck ??" message due to multiple cores concurrently accessing the cpu_callin_mask, among others. Since these codepaths are not protected from concurrent access due to the fact that there's no sane reason for making an already complex code unnecessarily more complex - we hit the issue only when insanely switching cores off- and online - serialize hotplugging cores on the sysfs level and be done with it. [ v2.1: fix !HOTPLUG_CPU build ] Cc: Signed-off-by: Borislav Petkov LKML-Reference: <20100819181029.GC17171@aftab> Signed-off-by: H. Peter Anvin commit b3ea36b7a242773d7a05cec6c071a47b6581c178 Merge: 763008c 737480a Author: Linus Torvalds Date: Thu Aug 19 09:06:49 2010 -0700 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: kprobes/x86: Fix the return address of multiple kretprobes perf tools: Fix build error on read only source. perf, x86: Fix Intel-nhm PMU programming errata workaround commit 065a1ed8de85583888b3d4f22c64b534a1fbdaaa Author: Brian Norris Date: Wed Aug 18 11:25:04 2010 -0700 mtd: nand: Fix regression in BBM detection Commit c7b28e25cb9beb943aead770ff14551b55fa8c79 ("mtd: nand: refactor BB marker detection") caused a regression in detection of factory-set bad block markers, especially for certain small-page NAND. This fix removes some unneeded constraints on using NAND_SMALL_BADBLOCK_POS, making the detection code more correct. This regression can be seen, for example, in Hynix HY27US081G1M and similar. Signed-off-by: Brian Norris Tested-by: Michael Guntsche Signed-off-by: David Woodhouse commit 737480a0d525dae13306296da08029dff545bc72 Author: KUMANO Syuhei Date: Sun Aug 15 15:18:04 2010 +0900 kprobes/x86: Fix the return address of multiple kretprobes Fix the return address of subsequent kretprobes when multiple kretprobes are set on the same function. For example: # cd /sys/kernel/debug/tracing # echo "r:event1 sys_symlink" > kprobe_events # echo "r:event2 sys_symlink" >> kprobe_events # echo 1 > events/kprobes/enable # ln -s /tmp/foo /tmp/bar (without this patch) # cat trace ln-897 [000] 20404.133727: event1: (kretprobe_trampoline+0x0/0x4c <- sys_symlink) ln-897 [000] 20404.133747: event2: (system_call_fastpath+0x16/0x1b <- sys_symlink) (with this patch) # cat trace ln-740 [000] 13799.491076: event1: (system_call_fastpath+0x16/0x1b <- sys_symlink) ln-740 [000] 13799.491096: event2: (system_call_fastpath+0x16/0x1b <- sys_symlink) Signed-off-by: KUMANO Syuhei Reviewed-by: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Ananth N Mavinakayanahalli Cc: Peter Zijlstra Cc: YOSHIFUJI Hideaki LKML-Reference: <1281853084.3254.11.camel@camp10-laptop> Signed-off-by: Ingo Molnar commit f2036884400a1d867eae992681ecfd3e6725ece8 Merge: 351af07 ecafda6 Author: Ingo Molnar Date: Thu Aug 19 12:25:29 2010 +0200 Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent commit 763008c4357b73c8d18396dfd8d79dc58fa3f99d Merge: d1126ad 0a377cf Author: Linus Torvalds Date: Wed Aug 18 15:45:23 2010 -0700 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: Fix an Oops in the NFSv4 atomic open code NFS: Fix the selection of security flavours in Kconfig NFS: fix the return value of nfs_file_fsync() rpcrdma: Fix SQ size calculation when memreg is FRMR xprtrdma: Do not truncate iova_start values in frmr registrations. nfs: Remove redundant NULL check upon kfree() nfs: Add "lookupcache" to displayed mount options NFS: allow close-to-open cache semantics to apply to root of NFS filesystem SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494) commit d1126ad907ce197ff45fbc2369fbeaf8ae6f75a8 Merge: 2a55473 83e4491 Author: Linus Torvalds Date: Wed Aug 18 15:29:38 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: USB HID: Add ID for eGalax Multitouch used in JooJoo tablet HID: hiddev: fix memory corruption due to invalid intfdata HID: hiddev: protect against disconnect/NULL-dereference race HID: picolcd: correct ordering of framebuffer freeing HID: picolcd: testing the wrong variable commit 2a554736f0d518b7c4d9939c6a6842bffebc7475 Merge: d15ca32 145e5aa Author: Linus Torvalds Date: Wed Aug 18 13:27:41 2010 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Fix build error: conflicting types for ‘sys_execve’ commit d240f20f545fa4ed78ce48d1eb62ab529f2b1467 Author: Jesse Barnes Date: Fri Aug 13 15:43:26 2010 -0700 drm/i915: make sure eDP PLL is enabled at the right time We need to make sure the eDP PLL is enabled before the pipes or planes, so do it as part of the DP prepare mode set function. Signed-off-by: Jesse Barnes commit 9cce37f4855a30cc7c364edf18522282782f7ddc Author: Jesse Barnes Date: Fri Aug 13 15:11:26 2010 -0700 drm/i915: fix VGA plane disable for Ironlake+ We need to use I/O port instructions to access VGA registers on Ironlake+, and it doesn't hurt on other platforms, so switch the VGA plane disable function over to using them. Move it to init time as well while we're at it, no need to repeatedly disable the VGA plane with every mode set and DPMS event. Signed-off-by: Jesse Barnes commit 7643a7fa16edf180d593f705f4fa5930c40e8d2d Author: Jesse Barnes Date: Wed Aug 11 10:06:44 2010 -0700 drm/i915: eDP mode set sequence corrections We should disable the panel first when shutting down an eDP link. And when turning one on, the panel needs to be enabled before link training or eDP I/O won't be enabled. Signed-off-by: Jesse Barnes commit 37c6c9b0e941fbb7f37a93d36abaf5fcafea87a8 Author: Jesse Barnes Date: Wed Aug 11 10:04:43 2010 -0700 drm/i915: add panel reset workaround Ironlake requires that we clear the reset panel bit during power sequences and restore it afterwards. Uncondtionally add code to do that since it should be harmless on SNB+. Signed-off-by: Jesse Barnes commit 8848a91068c018bc91f597038a0f41462a0f88a4 Author: H. Peter Anvin Date: Wed Aug 18 11:42:23 2010 -0700 x86-32: Fix dummy trampoline-related inline stubs Fix dummy inline stubs for trampoline-related functions when no trampolines exist (until we get rid of the no-trampoline case entirely.) Signed-off-by: H. Peter Anvin Cc: Joerg Roedel Cc: Borislav Petkov LKML-Reference: <4C6C294D.3030404@zytor.com> commit d15ca3203754359cfe5d18910722d3089b204cc4 Author: David Howells Date: Wed Aug 18 18:55:33 2010 +0100 Fix the declaration of sys_execve() in asm-generic/syscalls.h Fix the declaration of sys_execve() in asm-generic/syscalls.h to have various consts applied to its pointers. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 145e5aa269d54e4ea53fdb5e597007bd287fbe49 Author: Tony Luck Date: Wed Aug 18 10:17:44 2010 -0700 [IA64] Fix build error: conflicting types for ‘sys_execve’ arch/ia64/kernel/process.c:636: error: conflicting types for ‘sys_execve’ commit d7627467b7a8dd6944885290a03a07ceb28c10eb Make do_execve() take a const filename pointer Missed the declaration of sys_execve in the ia64 asm/unistd.h (perhaps because there is no reason for it to be there ... it might be a left over from the COMPAT code?). Just delete the conflicting version. Signed-off-by: Tony Luck commit 145c3ae46b37993b0debb0b3da6256daea4a6ec5 Merge: 81ca03a 99b7db7 Author: Linus Torvalds Date: Wed Aug 18 09:35:08 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs: brlock vfsmount_lock fs: scale files_lock lglock: introduce special lglock and brlock spin locks tty: fix fu_list abuse fs: cleanup files_lock locking fs: remove extra lookup in __lookup_hash fs: fs_struct rwlock to spinlock apparmor: use task path helpers fs: dentry allocation consolidation fs: fix do_lookup false negative mbcache: Limit the maximum number of cache entries hostfs ->follow_link() braino hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy remove SWRITE* I/O types kill BH_Ordered flag vfs: update ctime when changing the file's permission by setfacl cramfs: only unlock new inodes fix reiserfs_evict_inode end_writeback second call commit 81ca03a0e2ea0207b2df80e0edcf4c775c07a505 Author: Uwe Kleine-König Date: Wed Aug 18 09:25:38 2010 -0700 mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y This fixes a build breakage introduced by commit 4c2ef25fe0b8 ("mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume") Cc: David Brownell Cc: Alan Stern Cc: linux-mmc@vger.kernel.org Cc: Andrew Morton Signed-off-by: Uwe Kleine-König Acked-by: Kukjin Kim Acked-by: Maxim Levitsky Acked-by: Randy Dunlap Signed-off-by: Linus Torvalds commit ecafda60e88031bcc4271c446f984ee883d69ea8 Author: Kusanagi Kouichi Date: Wed Aug 18 13:32:37 2010 -0300 perf tools: Fix build error on read only source. Parts of the build process were generating files outside the specified O= directory, causing the build to fail on systems where the sources are in a read only file system. Fix it by using $(OUTPUT) on these locations. Also check that $(OUTPUT) actually exists, just like the top level kernel Makefile does. Otherwise the failure message emitted is completely misleading. Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20100817140841.0859362C03A@msa106.auone-net.jp> Signed-off-by: Kusanagi Kouichi Signed-off-by: Arnaldo Carvalho de Melo commit 1ca72feb9343d10a620c3076b0aa6e80d613fcf7 Merge: 7dfb2d4 9d5f371 Author: Linus Torvalds Date: Wed Aug 18 09:32:13 2010 -0700 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf tools: Fix build on POSIX shells latencytop: Fix kconfig dependency warnings perf annotate tui: Fix exit and RIGHT keys handling tracing: Sanitize value returned from write(trace_marker, "...", len) tracing/events: Convert format output to seq_file tracing: Extend recordmcount to better support Blackfin mcount tracing: Fix ring_buffer_read_page reading out of page boundary tracing: Fix an unallocated memory access in function_graph commit 7dfb2d4069cc698da925327e8c2106852a0c77a2 Merge: 6c8bfb7 2ea1ef5 Author: Linus Torvalds Date: Wed Aug 18 09:30:08 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) ALSA: hda - Fix ALC680 base model capture ASoC: Remove DSP mode support for WM8776 ALSA: hda - Add quirk for Dell Vostro 1220 ALSA: riptide - Fix detection / load of firmware files commit 6c8bfb7f7d43602c7f76060253bdaa493cd2e8b8 Merge: d9f5d41 5e1c533 Author: Linus Torvalds Date: Wed Aug 18 09:27:10 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: include sched.h in ColdFire/SPI driver m68knommu: formatting of pointers in printk() m68knommu: arch/m68k/include/asm/ide.h fix for nommu commit d9f5d41569731189e519fcee8578fcef5c916978 Merge: 86ea51d 2c7d46e Author: Linus Torvalds Date: Wed Aug 18 09:26:42 2010 -0700 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: md raid-1/10 Fix bio_rw bit manipulations again md: provide appropriate return value for spare_active functions. md: Notify sysfs when RAID1/5/10 disk is In_sync. Update recovery_offset even when external metadata is used. commit 86ea51d4a27ec79e9da7d2ce0c4a58f1dc4544c0 Merge: 3b89f56 5c79a5a Author: Linus Torvalds Date: Wed Aug 18 09:26:17 2010 -0700 Merge branch 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6 * 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6: spi.h: missing kernel-doc notation, please fix of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers of: Fix missing includes ata: update for of_device to platform_device replacement microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node microblaze: Fix of/address: Merge all of the bus translation code booting-without-of: Remove nonexistent chapters from TOC, fix numbering commit fd89a137924e0710078c3ae855e7cec1c43cb845 Author: Joerg Roedel Date: Mon Aug 16 14:38:33 2010 +0200 x86-32: Separate 1:1 pagetables from swapper_pg_dir This patch fixes machine crashes which occur when heavily exercising the CPU hotplug codepaths on a 32-bit kernel. These crashes are caused by AMD Erratum 383 and result in a fatal machine check exception. Here's the scenario: 1. On 32-bit, the swapper_pg_dir page table is used as the initial page table for booting a secondary CPU. 2. To make this work, swapper_pg_dir needs a direct mapping of physical memory in it (the low mappings). By adding those low, large page (2M) mappings (PAE kernel), we create the necessary conditions for Erratum 383 to occur. 3. Other CPUs which do not participate in the off- and onlining game may use swapper_pg_dir while the low mappings are present (when leave_mm is called). For all steps below, the CPU referred to is a CPU that is using swapper_pg_dir, and not the CPU which is being onlined. 4. The presence of the low mappings in swapper_pg_dir can result in TLB entries for addresses below __PAGE_OFFSET to be established speculatively. These TLB entries are marked global and large. 5. When the CPU with such TLB entry switches to another page table, this TLB entry remains because it is global. 6. The process then generates an access to an address covered by the above TLB entry but there is a permission mismatch - the TLB entry covers a large global page not accessible to userspace. 7. Due to this permission mismatch a new 4kb, user TLB entry gets established. Further, Erratum 383 provides for a small window of time where both TLB entries are present. This results in an uncorrectable machine check exception signalling a TLB multimatch which panics the machine. There are two ways to fix this issue: 1. Always do a global TLB flush when a new cr3 is loaded and the old page table was swapper_pg_dir. I consider this a hack hard to understand and with performance implications 2. Do not use swapper_pg_dir to boot secondary CPUs like 64-bit does. This patch implements solution 2. It introduces a trampoline_pg_dir which has the same layout as swapper_pg_dir with low_mappings. This page table is used as the initial page table of the booting CPU. Later in the bringup process, it switches to swapper_pg_dir and does a global TLB flush. This fixes the crashes in our test cases. -v2: switch to swapper_pg_dir right after entering start_secondary() so that we are able to access percpu data which might not be mapped in the trampoline page table. Signed-off-by: Joerg Roedel LKML-Reference: <20100816123833.GB28147@aftab> Signed-off-by: Borislav Petkov Signed-off-by: H. Peter Anvin commit 07a7795ca2e6e66d00b184efb46bd0e23d90d3fe Author: Hans Rosenfeld Date: Wed Aug 18 16:19:50 2010 +0200 x86, cpu: Fix regression in AMD errata checking code A bug in the family-model-stepping matching code caused the presence of errata to go undetected when OSVW was not used. This causes hangs on some K8 systems because the E400 workaround is not enabled. Signed-off-by: Hans Rosenfeld LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@amd.com> Signed-off-by: H. Peter Anvin commit 1cb0c924fa2d616e5e3b5bc62d97191aac9ff442 Author: Ryusuke Konishi Date: Wed Aug 18 21:11:11 2010 +0900 nilfs2: wait for discard to finish nilfs_discard_segment() doesn't wait for completion of discard requests. This specifies BLKDEV_IFL_WAIT flag when calling blkdev_issue_discard() in order to fix the sync failure. Reported-by: Christoph Hellwig Signed-off-by: Ryusuke Konishi Cc: Christoph Hellwig commit 0a377cff9428af2da2b293d11e07bc4dbf064ee5 Author: Trond Myklebust Date: Wed Aug 18 09:25:42 2010 -0400 NFS: Fix an Oops in the NFSv4 atomic open code Adam Lackorzynski reports: with 2.6.35.2 I'm getting this reproducible Oops: [ 110.825396] BUG: unable to handle kernel NULL pointer dereference at (null) [ 110.828638] IP: [] encode_attrs+0x1a/0x2a4 [ 110.828638] PGD be89f067 PUD bf18f067 PMD 0 [ 110.828638] Oops: 0000 [#1] SMP [ 110.828638] last sysfs file: /sys/class/net/lo/operstate [ 110.828638] CPU 2 [ 110.828638] Modules linked in: rtc_cmos rtc_core rtc_lib amd64_edac_mod i2c_amd756 edac_core i2c_core dm_mirror dm_region_hash dm_log dm_snapshot sg sr_mod usb_storage ohci_hcd mptspi tg3 mptscsih mptbase usbcore nls_base [last unloaded: scsi_wait_scan] [ 110.828638] [ 110.828638] Pid: 11264, comm: setchecksum Not tainted 2.6.35.2 #1 [ 110.828638] RIP: 0010:[] [] encode_attrs+0x1a/0x2a4 [ 110.828638] RSP: 0000:ffff88003bf5b878 EFLAGS: 00010296 [ 110.828638] RAX: ffff8800bddb48a8 RBX: ffff88003bf5bb18 RCX: 0000000000000000 [ 110.828638] RDX: ffff8800be258800 RSI: 0000000000000000 RDI: ffff88003bf5b9f8 [ 110.828638] RBP: 0000000000000000 R08: ffff8800bddb48a8 R09: 0000000000000004 [ 110.828638] R10: 0000000000000003 R11: ffff8800be779000 R12: ffff8800be258800 [ 110.828638] R13: ffff88003bf5b9f8 R14: ffff88003bf5bb20 R15: ffff8800be258800 [ 110.828638] FS: 0000000000000000(0000) GS:ffff880041e00000(0063) knlGS:00000000556bd6b0 [ 110.828638] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b [ 110.828638] CR2: 0000000000000000 CR3: 00000000be8ef000 CR4: 00000000000006e0 [ 110.828638] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 110.828638] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 110.828638] Process setchecksum (pid: 11264, threadinfo ffff88003bf5a000, task ffff88003f232210) [ 110.828638] Stack: [ 110.828638] 0000000000000000 ffff8800bfbcf920 0000000000000000 0000000000000ffe [ 110.828638] <0> 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 110.828638] <0> 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 110.828638] Call Trace: [ 110.828638] [] ? nfs4_xdr_enc_setattr+0x90/0xb4 [ 110.828638] [] ? call_transmit+0x1c3/0x24a [ 110.828638] [] ? __rpc_execute+0x78/0x22a [ 110.828638] [] ? rpc_run_task+0x21/0x2b [ 110.828638] [] ? rpc_call_sync+0x3d/0x5d [ 110.828638] [] ? _nfs4_do_setattr+0x11b/0x147 [ 110.828638] [] ? nfs_init_locked+0x0/0x32 [ 110.828638] [] ? ifind+0x4e/0x90 [ 110.828638] [] ? nfs4_do_setattr+0x4b/0x6e [ 110.828638] [] ? nfs4_do_open+0x291/0x3a6 [ 110.828638] [] ? nfs4_open_revalidate+0x63/0x14a [ 110.828638] [] ? nfs_open_revalidate+0xd7/0x161 [ 110.828638] [] ? do_lookup+0x1a4/0x201 [ 110.828638] [] ? link_path_walk+0x6a/0x9d5 [ 110.828638] [] ? do_last+0x17b/0x58e [ 110.828638] [] ? do_filp_open+0x1bd/0x56e [ 110.828638] [] ? _atomic_dec_and_lock+0x30/0x48 [ 110.828638] [] ? dput+0x37/0x152 [ 110.828638] [] ? alloc_fd+0x69/0x10a [ 110.828638] [] ? do_sys_open+0x56/0x100 [ 110.828638] [] ? ia32_sysret+0x0/0x5 [ 110.828638] Code: 83 f1 01 e8 f5 ca ff ff 48 83 c4 50 5b 5d 41 5c c3 41 57 41 56 41 55 49 89 fd 41 54 49 89 d4 55 48 89 f5 53 48 81 ec 18 01 00 00 <8b> 06 89 c2 83 e2 08 83 fa 01 19 db 83 e3 f8 83 c3 18 a8 01 8d [ 110.828638] RIP [] encode_attrs+0x1a/0x2a4 [ 110.828638] RSP [ 110.828638] CR2: 0000000000000000 [ 112.840396] ---[ end trace 95282e83fd77358f ]--- We need to ensure that the O_EXCL flag is turned off if the user doesn't set O_CREAT. Cc: stable@kernel.org Signed-off-by: Trond Myklebust commit 2ea1ef5789c52dfdff6da81bc0d2eb8b62f73c23 Merge: 76165a3 b2c1e07 Author: Takashi Iwai Date: Wed Aug 18 15:22:18 2010 +0200 Merge branch 'fix/asoc' into for-linus commit 76165a3063356ec898159d942ef4d2c69cc26801 Merge: 56385a1 c69aefa Author: Takashi Iwai Date: Wed Aug 18 15:22:15 2010 +0200 Merge branch 'fix/hda' into for-linus commit 56385a12d9bb9e173751f74b6c430742018cafc0 Author: Jaroslav Kysela Date: Wed Aug 18 14:08:17 2010 +0200 ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) With some hardware combinations, the PCM interrupts are acknowledged before the period boundary from the emu10k1 chip. The midlevel PCM code gets confused and the playback stream is interrupted. It seems that the interrupt processing shift by 2 samples is enough to fix this issue. This default value does not harm other, non-affected hardware. More information: Kernel bugzilla bug#16300 [A copmile warning fixed by tiwai] Signed-off-by: Jaroslav Kysela Cc: Signed-off-by: Takashi Iwai commit 99b7db7b8ffd6bb755eb0a175596421a0b581cb2 Author: Nick Piggin Date: Wed Aug 18 04:37:39 2010 +1000 fs: brlock vfsmount_lock fs: brlock vfsmount_lock Use a brlock for the vfsmount lock. It must be taken for write whenever modifying the mount hash or associated fields, and may be taken for read when performing mount hash lookups. A new lock is added for the mnt-id allocator, so it doesn't need to take the heavy vfsmount write-lock. The number of atomics should remain the same for fastpath rlock cases, though code would be slightly slower due to per-cpu access. Scalability is not not be much improved in common cases yet, due to other locks (ie. dcache_lock) getting in the way. However path lookups crossing mountpoints should be one case where scalability is improved (currently requiring the global lock). The slowpath is slower due to use of brlock. On a 64 core, 64 socket, 32 node Altix system (high latency to remote nodes), a simple umount microbenchmark (mount --bind mnt mnt2 ; umount mnt2 loop 1000 times), before this patch it took 6.8s, afterwards took 7.1s, about 5% slower. Cc: Al Viro Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 6416ccb7899960868f5016751fb81bf25213d24f Author: Nick Piggin Date: Wed Aug 18 04:37:38 2010 +1000 fs: scale files_lock fs: scale files_lock Improve scalability of files_lock by adding per-cpu, per-sb files lists, protected with an lglock. The lglock provides fast access to the per-cpu lists to add and remove files. It also provides a snapshot of all the per-cpu lists (although this is very slow). One difficulty with this approach is that a file can be removed from the list by another CPU. We must track which per-cpu list the file is on with a new variale in the file struct (packed into a hole on 64-bit archs). Scalability could suffer if files are frequently removed from different cpu's list. However loads with frequent removal of files imply short interval between adding and removing the files, and the scheduler attempts to avoid moving processes too far away. Also, even in the case of cross-CPU removal, the hardware has much more opportunity to parallelise cacheline transfers with N cachelines than with 1. A worst-case test of 1 CPU allocating files subsequently being freed by N CPUs degenerates to contending on a single lock, which is no worse than before. When more than one CPU are allocating files, even if they are always freed by different CPUs, there will be more parallelism than the single-lock case. Testing results: On a 2 socket, 8 core opteron, I measure the number of times the lock is taken to remove the file, the number of times it is removed by the same CPU that added it, and the number of times it is removed by the same node that added it. Booting: locks= 25049 cpu-hits= 23174 (92.5%) node-hits= 23945 (95.6%) kbuild -j16 locks=2281913 cpu-hits=2208126 (96.8%) node-hits=2252674 (98.7%) dbench 64 locks=4306582 cpu-hits=4287247 (99.6%) node-hits=4299527 (99.8%) So a file is removed from the same CPU it was added by over 90% of the time. It remains within the same node 95% of the time. Tim Chen ran some numbers for a 64 thread Nehalem system performing a compile. throughput 2.6.34-rc2 24.5 +patch 24.9 us sys idle IO wait (in %) 2.6.34-rc2 51.25 28.25 17.25 3.25 +patch 53.75 18.5 19 8.75 So significantly less CPU time spent in kernel code, higher idle time and slightly higher throughput. Single threaded performance difference was within the noise of microbenchmarks. That is not to say penalty does not exist, the code is larger and more memory accesses required so it will be slightly slower. Cc: linux-kernel@vger.kernel.org Cc: Tim Chen Cc: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 2dc91abe03d8ce6dd7f9251faffafca5f6b9e85d Author: Nick Piggin Date: Wed Aug 18 04:37:37 2010 +1000 lglock: introduce special lglock and brlock spin locks lglock: introduce special lglock and brlock spin locks This patch introduces "local-global" locks (lglocks). These can be used to: - Provide fast exclusive access to per-CPU data, with exclusive access to another CPU's data allowed but possibly subject to contention, and to provide very slow exclusive access to all per-CPU data. - Or to provide very fast and scalable read serialisation, and to provide very slow exclusive serialisation of data (not necessarily per-CPU data). Brlocks are also implemented as a short-hand notation for the latter use case. Thanks to Paul for local/global naming convention. Cc: linux-kernel@vger.kernel.org Cc: Al Viro Cc: "Paul E. McKenney" Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit d996b62a8df1d935b01319bf8defb95b5709f7b8 Author: Nick Piggin Date: Wed Aug 18 04:37:36 2010 +1000 tty: fix fu_list abuse tty: fix fu_list abuse tty code abuses fu_list, which causes a bug in remount,ro handling. If a tty device node is opened on a filesystem, then the last link to the inode removed, the filesystem will be allowed to be remounted readonly. This is because fs_may_remount_ro does not find the 0 link tty inode on the file sb list (because the tty code incorrectly removed it to use for its own purpose). This can result in a filesystem with errors after it is marked "clean". Taking idea from Christoph's initial patch, allocate a tty private struct at file->private_data and put our required list fields in there, linking file and tty. This makes tty nodes behave the same way as other device nodes and avoid meddling with the vfs, and avoids this bug. The error handling is not trivial in the tty code, so for this bugfix, I take the simple approach of using __GFP_NOFAIL and don't worry about memory errors. This is not a problem because our allocator doesn't fail small allocs as a rule anyway. So proper error handling is left as an exercise for tty hackers. [ Arguably filesystem's device inode would ideally be divorced from the driver's pseudo inode when it is opened, but in practice it's not clear whether that will ever be worth implementing. ] Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig Cc: Alan Cox Cc: Greg Kroah-Hartman Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit ee2ffa0dfdd2db19705f2ba1c6a4c0bfe8122dd8 Author: Nick Piggin Date: Wed Aug 18 04:37:35 2010 +1000 fs: cleanup files_lock locking fs: cleanup files_lock locking Lock tty_files with a new spinlock, tty_files_lock; provide helpers to manipulate the per-sb files list; unexport the files_lock spinlock. Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig Cc: Alan Cox Acked-by: Andi Kleen Acked-by: Greg Kroah-Hartman Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit b04f784e5d19ed58892833dae845738972cea260 Author: Nick Piggin Date: Wed Aug 18 04:37:34 2010 +1000 fs: remove extra lookup in __lookup_hash fs: remove extra lookup in __lookup_hash Optimize lookup for create operations, where no dentry should often be common-case. In cases where it is not, such as unlink, the added overhead is much smaller than the removed. Also, move comments about __d_lookup racyness to the __d_lookup call site. d_lookup is intuitive; __d_lookup is what needs commenting. So in that same vein, add kerneldoc comments to __d_lookup and clean up some of the comments: - We are interested in how the RCU lookup works here, particularly with renames. Make that explicit, and point to the document where it is explained in more detail. - RCU is pretty standard now, and macros make implementations pretty mindless. If we want to know about RCU barrier details, we look in RCU code. - Delete some boring legacy comments because we don't care much about how the code used to work, more about the interesting parts of how it works now. So comments about lazy LRU may be interesting, but would better be done in the LRU or refcount management code. Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 2a4419b5b2a77f3f4537c14f7ad7df95770655dd Author: Nick Piggin Date: Wed Aug 18 04:37:33 2010 +1000 fs: fs_struct rwlock to spinlock fs: fs_struct rwlock to spinlock struct fs_struct.lock is an rwlock with the read-side used to protect root and pwd members while taking references to them. Taking a reference to a path typically requires just 2 atomic ops, so the critical section is very small. Parallel read-side operations would have cacheline contention on the lock, the dentry, and the vfsmount cachelines, so the rwlock is unlikely to ever give a real parallelism increase. Replace it with a spinlock to avoid one or two atomic operations in typical path lookup fastpath. Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 44672e4fbd40e2dda8bbce7d0f71d24dbfc7e00e Author: Nick Piggin Date: Wed Aug 18 04:37:32 2010 +1000 apparmor: use task path helpers apparmor: use task path helpers Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit baa0389073eb7beb9d36f6d13df97e16c1bfa626 Author: Nick Piggin Date: Wed Aug 18 04:37:31 2010 +1000 fs: dentry allocation consolidation fs: dentry allocation consolidation There are 2 duplicate copies of code in dentry allocation in path lookup. Consolidate them into a single function. Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 2e2e88ea8c3bd9e1bd6e42faf047a4ac3fbb3b2f Author: Nick Piggin Date: Wed Aug 18 04:37:30 2010 +1000 fs: fix do_lookup false negative fs: fix do_lookup false negative In do_lookup, if we initially find no dentry, we take the directory i_mutex and re-check the lookup. If we find a dentry there, then we revalidate it if needed. However if that revalidate asks for the dentry to be invalidated, we return -ENOENT from do_lookup. What should happen instead is an attempt to allocate and lookup a new dentry. This is probably not noticed because it is rare. It is only reached if a concurrent create races in first (in which case, the dentry probably won't be invalidated anyway), or if the racy __d_lookup has failed due to a false-negative (which is very rare). Fix this by removing code and have it use the normal reval path. Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 93b352fce679945845664b56b0c3afbd655a7a12 Author: Axel Lin Date: Mon Aug 16 16:09:09 2010 +0800 pxa3xx: fix ns2cycle equation Test on a PXA310 platform with Samsung K9F2G08X0B NAND flash, with tCH=5 and clk is 156MHz, ns2cycle(5, 156000000) returns -1. ns2cycle returns negtive value will break NDTR0_tXX macros. After checking the commit log, I found the problem is introduced by commit 5b0d4d7c8a67c5ba3d35e6ceb0c5530cc6846db7 "[MTD] [NAND] pxa3xx: convert from ns to clock ticks more accurately" To get num of clock cycles, we use below equation: num of clock cycles = time (ns) / one clock cycle (ns) + 1 We need to add 1 cycle here because integer division will truncate the result. It is possible the developers set the Min values in SPEC for timing settings. Thus the truncate may cause problem, and it is safe to add an extra cycle here. The various fields in NDTR{01} are in units of clock ticks minus one, thus we should subtract 1 cycle then. Thus the correct equation should be: num of clock cycles = time (ns) / one clock cycle (ns) + 1 - 1 = time (ns) / one clock cycle (ns) Signed-off-by: Axel Lin Signed-off-by: Lei Wen Acked-by: Eric Miao Signed-off-by: David Woodhouse Cc: stable@kernel.org commit 3a48ee8a4ad26c3a538b6fc11a86a8f80c3dce18 Author: Andreas Gruenbacher Date: Mon Aug 16 19:05:23 2010 +0200 mbcache: Limit the maximum number of cache entries Limit the maximum number of mb_cache entries depending on the number of hash buckets: if the only limit to the number of cache entries is the available memory the hash chains can grow very long, taking a long time to search. At least partially solves https://bugzilla.lustre.org/show_bug.cgi?id=22771. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro commit 3b6036d148bad5bb7928b021a49bb9e395361084 Author: Al Viro Date: Wed Aug 18 06:21:10 2010 -0400 hostfs ->follow_link() braino we want the assignment to err done inside the if () to be visible after it, so (re)declaring err inside if () body is wrong. Signed-off-by: Al Viro commit 850a496f969719b494cc972ab1d0e088737358d7 Author: Al Viro Date: Wed Aug 18 06:18:57 2010 -0400 hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy ... not harmless in this case - we have a string in the end of buffer already. Signed-off-by: Al Viro commit 351af0725e5222e35741011d1ea62215c1ed06db Author: Zhang, Yanmin Date: Fri Aug 6 13:39:08 2010 +0800 perf, x86: Fix Intel-nhm PMU programming errata workaround Fix the Errata AAK100/AAP53/BD53 workaround, the officialy documented workaround we implemented in: 11164cd: perf, x86: Add Nehelem PMU programming errata workaround doesn't actually work fully and causes a stuck PMU state under load and non-functioning perf profiling. A functional workaround was found by trial & error. Affects all Nehalem-class Intel PMUs. Signed-off-by: Zhang Yanmin Signed-off-by: Peter Zijlstra LKML-Reference: <1281073148.2125.63.camel@ymzhang.sh.intel.com> Cc: Arjan van de Ven Cc: "H. Peter Anvin" Cc: # .35.x Signed-off-by: Ingo Molnar commit 9d5f3714e4705a66b6be693f7202192f756f498e Merge: 625fdca 033a273 Author: Ingo Molnar Date: Wed Aug 18 09:53:36 2010 +0200 Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent commit 2c7d46ec192e4f2b350f67a0e185b9bce646cd6b Author: NeilBrown Date: Wed Aug 18 16:16:05 2010 +1000 md raid-1/10 Fix bio_rw bit manipulations again commit 7b6d91daee5cac6402186ff224c3af39d79f4a0e changed the behaviour of a few variables in raid1 and raid10 from flags to bit-sets, but left them as type 'bool' so they did not work. Change them (back) to unsigned long. (historical note: see 1ef04fefe2241087d9db7e9615c3f11b516e36cf) Signed-off-by: NeilBrown Reported-by: Jiri Slaby and many others commit 9cb569d601e0b93e01c20a22872270ec663b75f6 Author: Christoph Hellwig Date: Wed Aug 11 17:06:24 2010 +0200 remove SWRITE* I/O types These flags aren't real I/O types, but tell ll_rw_block to always lock the buffer instead of giving up on a failed trylock. Instead add a new write_dirty_buffer helper that implements this semantic and use it from the existing SWRITE* callers. Note that the ll_rw_block code had a bug where it didn't promote WRITE_SYNC_PLUG properly, which this patch fixes. In the ufs code clean up the helper that used to call ll_rw_block to mirror sync_dirty_buffer, which is the function it implements for compound buffers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 87e99511ea54510ffb60b98001d108794d5037f8 Author: Christoph Hellwig Date: Wed Aug 11 17:05:45 2010 +0200 kill BH_Ordered flag Instead of abusing a buffer_head flag just add a variant of sync_dirty_buffer which allows passing the exact type of write flag required. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit dad5eb6daa7eeb63d4fc9d982892c59faa07e797 Author: Jan Kara Date: Tue Aug 17 12:42:13 2010 +0200 vfs: update ctime when changing the file's permission by setfacl generic_acl_set didn't update the ctime of the file when its permission was changed. Steps to reproduce: # touch aaa # stat -c %Z aaa 1275289822 # setfacl -m 'u::x,g::x,o::x' aaa # stat -c %Z aaa 1275289822 <- unchanged But, according to the spec of the ctime, vfs must update it. Port of ext3 patch by Miao Xie . CC: Al Viro Signed-off-by: Jan Kara Signed-off-by: Al Viro commit b845ff8f3ea2988ad5041315e2d35298e85cbc2f Author: Alexander Shishkin Date: Tue Aug 17 17:08:35 2010 +0300 cramfs: only unlock new inodes Commit 77b8a75f5bb introduced a warning at fs/inode.c:692 unlock_new_inode(), caused by unlock_new_inode() being called on existing inodes as well. This patch changes setup_inode() to only call unlock_new_inode() for I_NEW inodes. Signed-off-by: Alexander Shishkin Signed-off-by: Al Viro commit f4ae2faa40199b97b12f508234640bc565d166f8 Author: Sergey Senozhatsky Date: Wed Aug 11 14:07:01 2010 +0300 fix reiserfs_evict_inode end_writeback second call reiserfs_evict_inode calls end_writeback two times hitting kernel BUG at fs/inode.c:298 becase inode->i_state is I_CLEAR already. Signed-off-by: Sergey Senozhatsky Signed-off-by: Al Viro commit 5c79a5ae23e72fa12f1c7c528f62bf3ea35da0dc Author: Ernst Schwab Date: Mon Aug 16 15:10:11 2010 +0200 spi.h: missing kernel-doc notation, please fix Added comments in kernel-doc notation for previously added struct fields. Signed-off-by: Ernst Schwab Acked-by: Randy Dunlap Signed-off-by: Grant Likely commit 5e1c53356d79591b10cdea12e3d5ebace8e7b6fa Author: Greg Ungerer Date: Wed Jul 28 13:32:46 2010 +1000 m68knommu: include sched.h in ColdFire/SPI driver Using the coldfire qspi driver, I get the following error: drivers/spi/coldfire_qspi.c: In function 'mcfqspi_irq_handler': drivers/spi/coldfire_qspi.c:166: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/spi/coldfire_qspi.c:166: error: (Each undeclared identifier is reported only once It is solved by adding the following include to coldfire_sqpi.c: #include Fix suggested by Jate Sujjavanich Signed-off-by: Greg Ungerer commit c7484cf467df44c0d478b0412dc01e71fbec7923 Author: Kulikov Vasiliy Date: Wed Jul 14 22:01:13 2010 +0400 m68knommu: formatting of pointers in printk() arch/m68knommu/kernel/process.c: formatting of pointers in printk() Use %p instead of %08x in printk(). Signed-off-by: Kulikov Vasiliy Signed-off-by: Greg Ungerer commit dc6ae5e471425762122bb93310dd46101ccd840d Author: Jate Sujjavanich Date: Mon Jun 7 11:39:30 2010 -0400 m68knommu: arch/m68k/include/asm/ide.h fix for nommu The arch/m68k/include/asm/ide.h produces errors when the IDE driver is compiled for my 523x uClinux system under kernel. The header makes some redefines of operators not defined in the arch/m68k/include/asm/io_no.h header. There are no separate mmio and iospace defines. Signed-off-by: Jate Sujjavanich Acked-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer commit 6b9656205469269c050963c71fca1998b247a560 Author: NeilBrown Date: Wed Aug 18 11:56:59 2010 +1000 md: provide appropriate return value for spare_active functions. md_check_recovery expects ->spare_active to return 'true' if any spares were activated, but none of them do, so the consequent change in 'degraded' is not notified through sysfs. So count the number of spares activated, subtract it from 'degraded' just once, and return it. Reported-by: Adrian Drzewiecki Signed-off-by: NeilBrown commit e6ffbcb6cd0ac471223df24ae77eb486c1ee68cc Author: Adrian Drzewiecki Date: Wed Aug 18 11:49:02 2010 +1000 md: Notify sysfs when RAID1/5/10 disk is In_sync. When RAID1 is done syncing disks, it'll update the state of synced rdevs to In_sync. But it neglected to notify sysfs that the attribute changed. So any programs that are waiting for an rdev's state to change will not be woken. (raid5/raid10 added by neilb) Signed-off-by: Adrian Drzewiecki Signed-off-by: NeilBrown commit 3a3a5ddb7a0f43c3dd0f98673f3d930a456725f8 Author: NeilBrown Date: Mon Aug 16 18:09:31 2010 +1000 Update recovery_offset even when external metadata is used. The update of ->recovery_offset in sync_sbs is appropriate even then external metadata is in use. However sync_sbs is only called when native metadata is used. So move that update in to the top of md_update_sb (which is the only caller of sync_sbs) before the test on ->external. This moves the update out of ->write_lock protection, but those fields only need ->reconfig_mutex protection which they still have. Also move the test on ->persistent up to where ->external is set as for metadata update purposes they are the same. Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing if ->external is set or ->persistent isn't. Finally move the update of ->utime down as it is only relevent (like the ->events update) for native metadata. Signed-off-by: NeilBrown Reported-by: "Kwolek, Adam" commit 3b89f56783a4ef796190ef1192c25e72e0b986b6 Merge: 392abee 7cb4dc9 Author: Linus Torvalds Date: Tue Aug 17 18:37:03 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: AppArmor: fix task_setrlimit prototype commit 392abeea52db4dc870c0ea41912df8ca60b27d44 Merge: 472db19 beed533 Author: Linus Torvalds Date: Tue Aug 17 18:36:19 2010 -0700 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: vt,console,kdb: preserve console_blanked while in kdb vt: fix regression warnings from KMS merge arm,kgdb: fix GDB_MAX_REGS no longer used kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c kdb: fix compile error without CONFIG_KALLSYMS commit 472db19ff5729cc9d054d6f87ba5147b21ec0787 Merge: 351f13d c3f755e Author: Linus Torvalds Date: Tue Aug 17 18:36:01 2010 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: platform/x86: move rfkill for Dell Mini 1012 to compal-laptop thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards thinkpad-acpi: add support for model-specific keymaps thinkpad-acpi: lock down size of hotkey keymap thinkpad-acpi: untangle ACPI/vendor backlight selection thinkpad-acpi: find ACPI video device by synthetic HID intel_ips: potential null dereference drivers/platform/x86: Adjust confusing if indentation x86: intel_ips: do not use PCI resources before pci_enable_device() commit 351f13d7087d4f633552d0e5491adf049fc9276c Merge: e14f64c ea1a16f Author: Linus Torvalds Date: Tue Aug 17 18:35:39 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: fix false warning saying one of two super blocks is broken nilfs2: fix list corruption after ifile creation failure commit e14f64c2079240082f3c5bf98d9ecf3dc6780338 Merge: 602586a e5093ae Author: Linus Torvalds Date: Tue Aug 17 18:34:37 2010 -0700 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: net: Fix a memmove bug in dev_gro_receive() net sched: fix some kernel memory leaks netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive Revert "netlink: netlink_recvmsg() fix" ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss xfrm: Use GFP_ATOMIC in xfrm_compile_policy ath5k: disable ASPM L0s for all cards ath9k_htc: load proper firmware for device ID 7015 wl1251: fix trigger scan timeout usage ath9k_htc: Fix disconnect issue in HT40 mode. ath9k_htc: fix panic on packet injection using airbase-ng tool. ipw2100: register pm_qos request before registering pci driver commit 602586a83b719df0fbd94196a1359ed35aeb2df3 Author: Hugh Dickins Date: Tue Aug 17 15:23:56 2010 -0700 shmem: put_super must percpu_counter_destroy list_add() corruption messages reported from shmem_fill_super()'s recently introduced percpu_counter_init(): shmem_put_super() needs to remember to percpu_counter_destroy(). And also check error from percpu_counter_init(). Reported-bisected-and-tested-by: Tetsuo Handa Signed-off-by: Hugh Dickins Signed-off-by: Linus Torvalds commit 19147d0eb1472eac690a9a708893d4de096bbfcf Merge: 2a6a432 86fa04b Author: Linus Torvalds Date: Tue Aug 17 18:14:08 2010 -0700 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: Fix atomic64_t routine return values. sparc64: Fix rwsem constant bug leading to hangs. sparc: Hook up new fanotify and prlimit64 syscalls. sparc: Really fix "console=" for serial consoles. commit 2a6a432a9ce55876b92f9ea860d7baa05538de16 Merge: a7c8962 99c796d Author: Linus Torvalds Date: Tue Aug 17 18:11:49 2010 -0700 Merge master.kernel.org:/home/rmk/linux-2.6-arm * master.kernel.org:/home/rmk/linux-2.6-arm: VIDEO: amba clcd: don't disable an already disabled clock ARM: Tighten check for allowable CPSR values ARM: 6329/1: wire up sys_accept4() on ARM ARM: 6328/1: Build with -fno-dwarf2-cfi-asm ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used commit a7c8962bfbc730a9acc0a635bad0f9628b6e816a Author: David Miller Date: Mon Aug 16 21:20:07 2010 -0700 arcmsr_hba: Missing slab.h include Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds commit f362b73244fb16ea4ae127ced1467dd8adaa7733 Author: Daniel J Blueman Date: Tue Aug 17 23:56:55 2010 +0100 Fix unprotected access to task credentials in waitid() Using a program like the following: #include #include #include #include int main() { id_t id; siginfo_t infop; pid_t res; id = fork(); if (id == 0) { sleep(1); exit(0); } kill(id, SIGSTOP); alarm(1); waitid(P_PID, id, &infop, WCONTINUED); return 0; } to call waitid() on a stopped process results in access to the child task's credentials without the RCU read lock being held - which may be replaced in the meantime - eliciting the following warning: =================================================== [ INFO: suspicious rcu_dereference_check() usage. ] --------------------------------------------------- kernel/exit.c:1460 invoked rcu_dereference_check() without protection! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 1 2 locks held by waitid02/22252: #0: (tasklist_lock){.?.?..}, at: [] do_wait+0xc5/0x310 #1: (&(&sighand->siglock)->rlock){-.-...}, at: [] wait_consider_task+0x19a/0xbe0 stack backtrace: Pid: 22252, comm: waitid02 Not tainted 2.6.35-323cd+ #3 Call Trace: [] lockdep_rcu_dereference+0xa4/0xc0 [] wait_consider_task+0xaf1/0xbe0 [] do_wait+0xf5/0x310 [] sys_waitid+0x86/0x1f0 [] ? child_wait_callback+0x0/0x70 [] system_call_fastpath+0x16/0x1b This is fixed by holding the RCU read lock in wait_task_continued() to ensure that the task's current credentials aren't destroyed between us reading the cred pointer and us reading the UID from those credentials. Furthermore, protect wait_task_stopped() in the same way. We don't need to keep holding the RCU read lock once we've read the UID from the credentials as holding the RCU read lock doesn't stop the target task from changing its creds under us - so the credentials may be outdated immediately after we've read the pointer, lock or no lock. Signed-off-by: Daniel J Blueman Signed-off-by: David Howells Acked-by: Paul E. McKenney Acked-by: Oleg Nesterov Signed-off-by: Linus Torvalds commit d7627467b7a8dd6944885290a03a07ceb28c10eb Author: David Howells Date: Tue Aug 17 23:52:56 2010 +0100 Make do_execve() take a const filename pointer Make do_execve() take a const filename pointer so that kernel_execve() compiles correctly on ARM: arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type This also requires the argv and envp arguments to be consted twice, once for the pointer array and once for the strings the array points to. This is because do_execve() passes a pointer to the filename (now const) to copy_strings_kernel(). A simpler alternative would be to cast the filename pointer in do_execve() when it's passed to copy_strings_kernel(). do_execve() may not change any of the strings it is passed as part of the argv or envp lists as they are some of them in .rodata, so marking these strings as const should be fine. Further kernel_execve() and sys_execve() need to be changed to match. This has been test built on x86_64, frv, arm and mips. Signed-off-by: David Howells Tested-by: Ralf Baechle Acked-by: Russell King Signed-off-by: Linus Torvalds commit e5093aec2e6b60c3df2420057ffab9ed4a6d2792 Author: Jarek Poplawski Date: Wed Aug 11 02:02:10 2010 +0000 net: Fix a memmove bug in dev_gro_receive() >Xin Xiaohui wrote: > I looked into the code dev_gro_receive(), found the code here: > if the frags[0] is pulled to 0, then the page will be released, > and memmove() frags left. > Is that right? I'm not sure if memmove do right or not, but > frags[0].size is never set after memove at least. what I think > a simple way is not to do anything if we found frags[0].size == 0. > The patch is as followed. ... This version of the patch fixes the bug directly in memmove. Reported-by: "Xin, Xiaohui" Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller commit 86fa04b8742ac681d470786f55e2403ada0075b2 Author: David S. Miller Date: Tue Aug 17 17:12:04 2010 -0700 sparc64: Fix atomic64_t routine return values. Should return 'long' instead of 'int'. Thanks to Dimitris Michailidis and Tony Luck. Signed-off-by: David S. Miller commit ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58 Author: David S. Miller Date: Tue Aug 17 17:09:53 2010 -0700 sparc64: Fix rwsem constant bug leading to hangs. As noticed by Linus, it is critical that some of the rwsem constants be signed. Yet, hex constants are unsigned unless explicitly casted or negated. The most critical one is RWSEM_WAITING_BIAS. This bug was exacerbated by commit 424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers when writer blocks on active read lock") Signed-off-by: David S. Miller commit 1c40be12f7d8ca1d387510d39787b12e512a7ce8 Author: Eric Dumazet Date: Mon Aug 16 20:04:22 2010 +0000 net sched: fix some kernel memory leaks We leak at least 32bits of kernel memory to user land in tc dump, because we dont init all fields (capab ?) of the dumped structure. Use C99 initializers so that holes and non explicit fields are zeroed. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 001389b9581c13fe5fc357a0f89234f85af4215d Author: Eric Dumazet Date: Mon Aug 16 10:22:10 2010 +0000 netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive After commit 24b36f019 (netfilter: {ip,ip6,arp}_tables: dont block bottom half more than necessary), lockdep can raise a warning because we attempt to lock a spinlock with BH enabled, while the same lock is usually locked by another cpu in a softirq context. Disable again BH to avoid these lockdep warnings. Reported-by: Linus Torvalds Diagnosed-by: David S. Miller Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit df486a25900f4dba9cdc3886c4ac871951c6aef3 Author: Trond Myklebust Date: Tue Aug 17 17:42:45 2010 -0400 NFS: Fix the selection of security flavours in Kconfig Randy Dunlap reports: ERROR: "svc_gss_principal" [fs/nfs/nfs.ko] undefined! because in fs/nfs/Kconfig, NFS_V4 selects RPCSEC_GSS_KRB5 and/or in fs/nfsd/Kconfig, NFSD_V4 selects RPCSEC_GSS_KRB5. RPCSEC_GSS_KRB5 does 5 selects, but none of these is enforced/followed by the fs/nfs[d]/Kconfig configs: select SUNRPC_GSS select CRYPTO select CRYPTO_MD5 select CRYPTO_DES select CRYPTO_CBC Reported-by: Randy Dunlap Cc: J. Bruce Fields Acked-by: Randy Dunlap Signed-off-by: Trond Myklebust commit 99c796df94afca5256860dd4760017f1dbb3480c Author: Russell King Date: Tue Aug 17 22:13:22 2010 +0100 VIDEO: amba clcd: don't disable an already disabled clock Fix the clock enable/disable tracking in the AMBA CLCD driver so that the driver doesn't try to disable an already disabled clock, thereby causing the clock (if shared) to become unbalanced. This resolves a problem with CLCD on LPC32xx ARM platforms. Reported-by: Kevin Wells Signed-off-by: Russell King commit 7a50d06e242614f02004faed2972a8f2c9336d61 Author: Graeme Smecher Date: Tue Aug 17 10:13:44 2010 -0700 of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers The drivers for Xilinx' SystemACE and physically mapped MTDs were missing prototypes for of_address_to_resource(). This patch adds the necessary headers. Signed-off-by: Graeme Smecher Signed-off-by: Grant Likely commit 033a273f9836b592dd568abd0f655be469d66704 Author: Bernd Petrovitsch Date: Tue Aug 17 12:22:08 2010 -0300 perf tools: Fix build on POSIX shells POSIX sh does not specify the brace expansion, so fix it by replacing the global $(shell ...) lines quite at the top creating the output directories with real rules. Cc: Ingo Molnar Cc: Kusanagi Kouichi Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1282046280.5822.4.camel@thorin> Signed-off-by: Bernd Petrovitsch Signed-off-by: Arnaldo Carvalho de Melo commit 6b5d7a9f6f7ff0e096829c1d82f70d5a6066b889 Author: Xiao Guangrong Date: Tue Aug 17 15:02:12 2010 +0800 KVM: PIT: free irq source id in handling error path Free irq source id if create pit workqueue fail Signed-off-by: Xiao Guangrong Signed-off-by: Avi Kivity commit c69aefabe004d24e6eedf83b6f253647f77dfc43 Author: Kailang Yang Date: Tue Aug 17 10:39:22 2010 +0200 ALSA: hda - Fix ALC680 base model capture - Fix capture mixer elements for ALC680 base model - Support auto change ADC for recording from MIC - Cancel capture source assigned in auto mode. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai commit 625fdcaa6d2a3db6a922bbd833450424e906111c Author: Randy Dunlap Date: Thu Aug 12 12:31:21 2010 -0700 latencytop: Fix kconfig dependency warnings warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects SCHED_DEBUG which has unmet direct dependencies (DEBUG_KERNEL && PROC_FS) warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects SCHEDSTATS which has unmet direct dependencies (DEBUG_KERNEL && PROC_FS) Add depends on STACKTRACE_SUPPORT for 'select STACKTRACE'. Add depends on PROC_FS since that is where the output goes. Signed-off-by: Randy Dunlap Cc: Arjan van de Ven LKML-Reference: <20100812123121.a7c99cde.randy.dunlap@oracle.com> Signed-off-by: Ingo Molnar commit f1ca09b2b5c9dd3988c61818a7d621b1400e4f0c Author: Grant Likely Date: Mon Aug 16 23:44:49 2010 -0600 of: Fix missing includes This patch fixes missing includes from a number of .c files because the code (wrongfully) depended on prom.h including them. The include of linux/of_address.h was removed in microblaze prom.h in commit "of/address: Clean up function declarations" (sha1 id 22ae782f8), but not fixed in some callers. This patch fixes them up. Signed-off-by: Grant Likely Tested-by: Michal Simek commit 7cb4dc9fc95f89587f57f287b47e091d7806255e Author: Jiri Slaby Date: Wed Aug 11 11:28:02 2010 +0200 AppArmor: fix task_setrlimit prototype After rlimits tree was merged we get the following errors: security/apparmor/lsm.c:663:2: warning: initialization from incompatible pointer type It is because AppArmor was merged in the meantime, but uses the old prototype. So fix it by adding struct task_struct as a first parameter of apparmor_task_setrlimit. NOTE that this is ONLY a compilation warning fix (and crashes caused by that). It needs proper handling in AppArmor depending on who is the 'task'. Signed-off-by: Jiri Slaby Signed-off-by: John Johansen Signed-off-by: James Morris commit 8e8073a449b2e00641c095ad55bd56f43468daf9 Author: David S. Miller Date: Mon Aug 16 15:04:29 2010 -0700 sparc: Hook up new fanotify and prlimit64 syscalls. The only tricky bit is the compat version of fanotify_mark, which which on 32-bit the 64-bit mark argument is passed in as "high32", "low32". Signed-off-by: David S. Miller commit 60652d07a028595df5c2582e915325d643a3800d Author: Stephen Rothwell Date: Mon Aug 16 12:20:59 2010 +1000 ata: update for of_device to platform_device replacement Signed-off-by: Stephen Rothwell Signed-off-by: Grant Likely commit 300a103d1504134f8c4a7e831f995e917ea9b1e4 Merge: 0a49289 da5cabf Author: David S. Miller Date: Mon Aug 16 14:09:34 2010 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit beed5336eba6a5a70c97e9f4bfff525915a25003 Author: Jason Wessel Date: Mon Aug 16 15:58:31 2010 -0500 vt,console,kdb: preserve console_blanked while in kdb Commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement atomic console enter/leave functions) introduced the ability to atomically change the console mode with kernel mode setting but did not preserve the state of the console_blanked variable. The console_blanked variable must be restored when executing the con_debug_leave() or further kernel mode set changes (such as using chvt X) will fail to correctly set the state of console. Signed-off-by: Jason Wessel Reviewed-by: Jesse Barnes CC: Andrew Morton commit fed891c89bfd8ef898c2289b34e748969bb12798 Author: Jason Wessel Date: Mon Aug 16 15:58:30 2010 -0500 vt: fix regression warnings from KMS merge Fix the following new sparse warnings in vt.c introduced by the commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement atomic console enter/leave functions): drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static? drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static? drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static? drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static? Signed-off-by: Jason Wessel Reviewed-by: Jesse Barnes CC: Andrew Morton commit 787ea1c5811b11124d28c8d85f483c4cd37f5c58 Author: Eric Miao Date: Mon Aug 16 15:58:30 2010 -0500 arm,kgdb: fix GDB_MAX_REGS no longer used According to commit 22eeef4bb2a7fd225089c0044060ed1fbf091958 kgdb,arm: Individual register get/set for arm It's now replaced by DBG_MAX_REG_NUM. Signed-off-by: Eric Miao Signed-off-by: Jason Wessel commit 8c8aefce934dc45de641fe78d48ff1b7722d826a Author: Namhyung Kim Date: Sat Aug 7 11:00:59 2010 -0700 kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c breakinfo->pev is a pointer to percpu pointer but was missing __percpu markup. Add it. Signed-off-by: Namhyung Kim Signed-off-by: Jason Wessel commit b590cddfa6f40447158323b43a13cdae01d9a051 Author: Jason Wessel Date: Mon Aug 16 15:58:29 2010 -0500 kdb: fix compile error without CONFIG_KALLSYMS If CONFIG_KGDB_KDB is set and CONFIG_KALLSYMS is not set the kernel will fail to build with the error: kernel/built-in.o: In function `kallsyms_symbol_next': kernel/debug/kdb/kdb_support.c:237: undefined reference to `kdb_walk_kallsyms' kernel/built-in.o: In function `kallsyms_symbol_complete': kernel/debug/kdb/kdb_support.c:193: undefined reference to `kdb_walk_kallsyms' The kdb_walk_kallsyms needs a #ifdef proper header to match the C implementation. This patch also fixes the compiler warnings in kdb_support.c when compiling without CONFIG_KALLSYMS set. The compiler warnings are a result of the kallsyms_lookup() macro not initializing the two of the pass by reference variables. Signed-off-by: Jason Wessel Reported-by: Michal Simek commit 5ca6f7c85159a5ca7e637b1d9f79f0d9bc56e5dc Merge: daa3766 6ccf15a Author: David S. Miller Date: Mon Aug 16 13:56:01 2010 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit 088ab302f23bfc8abfaada32506d02d64a637b23 Author: Michal Simek Date: Mon Aug 16 10:31:54 2010 +0200 microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node Commit 58f9b0b02414062eaff46716bc04b47d7e79add5 should contain this fix too. Signed-off-by: Michal Simek Signed-off-by: Grant Likely commit a8dcb878b628203f917c50b0268bba7fd146d9c0 Author: Michal Simek Date: Mon Aug 16 10:31:53 2010 +0200 microblaze: Fix of/address: Merge all of the bus translation code Commit dbbdee94734bf6f1db7af42008a53655e77cab8f removed of_irq_pci_swizzle but didn't use pci_swizzle_interrupt_pin instead. Signed-off-by: Michal Simek Signed-off-by: Grant Likely commit b9e0ba8114583b0462cfb18b4ca01fc82894c5c0 Author: Anton Vorontsov Date: Wed Aug 11 20:56:03 2010 +0400 booting-without-of: Remove nonexistent chapters from TOC, fix numbering Marvell and GPIO bindings live in their own files, so the TOC should not mention them. Also fix chapters numbering. Signed-off-by: Anton Vorontsov Signed-off-by: Grant Likely commit 0a492896ac07336c98f37ad7fab4a6387b6ada78 Author: David S. Miller Date: Sun Aug 15 00:26:14 2010 -0700 sparc: Really fix "console=" for serial consoles. If a video head and keyboard are hooked up, specifying "console=ttyS0" or similar to use a serial console will not work properly. The key issue is that we must register all serial console capable devices with register_console(), otherwise the command line specified device won't be found. The sun serial drivers would only register themselves as console devices if the OpenFirmware specified console device node matched. To fix this part we now unconditionally get the serial console register by setting serial_drv->cons always. Secondarily we must not add_preferred_console() using the firmware provided console setting if the user gaven an override on the kernel command line using "console=" The "primary framebuffer" matching logic was always triggering o n openfirmware device node match, make it not when a command line override was given. Reported-by: Frans Pop Tested-by: Frans Pop Signed-off-by: David S. Miller commit f24645a991e6758a4544ed7667cf919fea328a95 Merge: d244b6b e918462 Author: Ingo Molnar Date: Mon Aug 16 19:26:10 2010 +0200 Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent commit c3f755e3842108c1cffe570fe9802239810352b6 Author: Victor van den Elzen Date: Sun Aug 15 01:19:33 2010 +0200 platform/x86: move rfkill for Dell Mini 1012 to compal-laptop Like others in the Mini series, the Dell Mini 1012 does not support the smbios hook required by dell-laptop. Signed-off-by: Victor van den Elzen Cc: stable Signed-off-by: Matthew Garrett commit 2b75426282a8eb29d0a004ef0d289b0491c719be Author: Jens Taprogge Date: Mon Aug 9 23:48:22 2010 -0300 thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards On the T410s and most likely other current models, Fn-F6 is labeled as Camera/Headphone key. Report key presses as KEY_CAMERA. Signed-off-by: Jens Taprogge Acked-by: Jerone Young Acked-by: Henrique de Moraes Holschuh Signed-off-by: Matthew Garrett commit d1e14dca6a18aa40394316c872993ae3bc7e311a Author: Henrique de Moraes Holschuh Date: Mon Aug 9 23:48:21 2010 -0300 thinkpad-acpi: add support for model-specific keymaps Use the quirks engine to select model-specific keymaps, which makes it much easier to extend should we need it. Keycodes are based on the tables at http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Matthew Garrett commit 34a656d22f5539f613b93e7a1d14b4bd53592505 Author: Henrique de Moraes Holschuh Date: Mon Aug 9 23:48:20 2010 -0300 thinkpad-acpi: lock down size of hotkey keymap Use a safer coding style for the hotkey keymap. This does not fix any problems, as the current code is correct. But it might help avoid mistakes in the future. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Matthew Garrett commit 217f09631a420295a9688e18aa4dbad1b385e56c Author: Henrique de Moraes Holschuh Date: Mon Aug 9 23:48:19 2010 -0300 thinkpad-acpi: untangle ACPI/vendor backlight selection acpi_video_backlight_support() already tells us if ACPI is handling backlight control through the generic ACPI handle. It is better to just trust it. While at it, adjust down a printk priority, and test earlier for brightness_enable=0. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Matthew Garrett commit 122f26726b5e16174bf8a707df14be1d93c49d62 Author: Henrique de Moraes Holschuh Date: Mon Aug 9 23:48:18 2010 -0300 thinkpad-acpi: find ACPI video device by synthetic HID The Linux ACPI core locates the ACPI video devices for us and marks them with ACPI_VIDEO_HID. Use that information to locate the video device instead of a half-baked hunt for _BCL. This uncouples the detection of the number of backlight brightness levels on ThinkPads from the ACPI paths in vid_handle. With this change, the driver should be able to always detect whether the ThinkPad uses a 8-level or 16-level brightness scale even on newer models for which the vid_handle paths have not been updated yet. It will skip deactivated devices in the ACPI device tree, which is a change in behaviour. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Matthew Garrett commit 52d7ee558d3babb4918eed6769f593adc1b6616e Author: Dan Carpenter Date: Sun Aug 8 00:01:12 2010 +0200 intel_ips: potential null dereference There is a potential NULL dereference of "limits." We can just return NULL earlier to avoid it. The caller already handles NULL returns. Signed-off-by: Dan Carpenter Reviewed-by: Jesse Barnes Signed-off-by: Matthew Garrett commit 2e0ee69c214a0197e1b081ffec9c409ab2a5f094 Author: Julia Lawall Date: Thu Aug 5 22:24:12 2010 +0200 drivers/platform/x86: Adjust confusing if indentation The assignment of ret to -EIO appears to only make sense if the branch that it is aligned with is executed, so move it into that branch. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // Signed-off-by: Julia Lawall Signed-off-by: Matthew Garrett commit 5629236b31239dbaa182cb7eb39aad4d62278f7c Author: Kulikov Vasiliy Date: Tue Aug 3 19:44:16 2010 +0400 x86: intel_ips: do not use PCI resources before pci_enable_device() IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // Signed-off-by: Kulikov Vasiliy Reviewed-by: Jesse Barnes Signed-off-by: Matthew Garrett commit d244b6bd41e09ecbb09c738cc2c108be227398c8 Merge: da5cabf 1aa54bc Author: Steven Rostedt Date: Mon Aug 16 11:17:30 2010 -0400 Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into trace/tip/perf/urgent-4 Conflicts: kernel/trace/trace_events.c Signed-off-by: Steven Rostedt commit 83e4491818040ae6b2d9fc60434616304a101d39 Author: Chris Ball Date: Mon Aug 16 16:01:28 2010 +0200 USB HID: Add ID for eGalax Multitouch used in JooJoo tablet The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB TouchController", and this patch hooks it up to the egalax-touch driver. Without the patch we don't get any cursor motion, since it comes through Z/RX rather than X/Y. (The egalax-touch driver does not yet generate a correct event sequence for the "serial" protocol used by this device, though -- see the note added to the code, which comes from research by Stéphane Chatty.) Cc: Jiri Kosina Cc: Stéphane Chatty Signed-off-by: Chris Ball Signed-off-by: Jiri Kosina commit e91846213241e3c46da8cbe992bceb1697de8d78 Author: Arnaldo Carvalho de Melo Date: Mon Aug 16 10:43:54 2010 -0300 perf annotate tui: Fix exit and RIGHT keys handling As part of ongoing effort to reduce the coupling with libnewt, browsers are being changed to return the exit key. The annotate browser is not returning it as expected by builtin-annotate when annotating multiple symbols (when 'perf annotate' is called without specifying a symbol name). Fix it by returning the exit key and also adding the RIGHT key as a exit key so that going to the next symbol in the TUI can work again. Cc: Frederic Weisbecker Cc: Peter Zijlstra LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo commit b2c1e07b81a126e5846dfc3d36f559d861df59f4 Author: Mark Brown Date: Mon Aug 16 11:46:57 2010 +0100 ASoC: Remove DSP mode support for WM8776 This is not supported by current hardware revisions. Signed-off-by: Mark Brown Acked-by: Liam Girdwood Cc: stable@kernel.org commit c3e68fad88143fd1fe8fe640207fb19c0f087dbc Author: Takashi Iwai Date: Mon Aug 16 10:15:57 2010 +0200 ALSA: hda - Add quirk for Dell Vostro 1220 model=dell-vostro is needed for Dell Vostro 1220 with Coexnat 5067. Reference: Novell bnc#631066 https://bugzilla.novell.com/show_bug.cgi?id=631066 Cc: Signed-off-by: Takashi Iwai commit daa3766e705c2605bd7f63b80c7742014ef9e04e Author: David S. Miller Date: Sun Aug 15 23:21:50 2010 -0700 Revert "netlink: netlink_recvmsg() fix" This reverts commit 1235f504aaba2ebeabc863fdb3ceac764a317d47. It causes regressions worse than the problem it was trying to fix. Eric will try to solve the problem another way. Signed-off-by: David S. Miller commit a5ba6beb839cfa288960c92cd2668a2601c24dda Author: Takashi Iwai Date: Mon Aug 16 08:08:48 2010 +0200 ALSA: riptide - Fix detection / load of firmware files The detection and loading of firmeware on riptide driver has been broken due to rewrite of some codes, checking the presense wrongly. This patch fixes the logic again. Reference: kernel bug 16596 https://bugzilla.kernel.org/show_bug.cgi?id=16596 Cc: Signed-off-by: Takashi Iwai commit ea1a16f7168ac19d974ac51b47593b92280e7992 Author: Ryusuke Konishi Date: Sun Aug 15 20:16:11 2010 +0900 nilfs2: fix false warning saying one of two super blocks is broken After applying commit b2ac86e1, the following message got appeared after unclean shutdown: > NILFS warning: broken superblock. using spare superblock. This turns out to be a false message due to the change which updates two super blocks alternately. The secondary super block now can be selected if it's newer than the primary one. This kills the false warning by suppressing it if another super block is not actually broken. Signed-off-by: Ryusuke Konishi commit af4e36318edb848fcc0a8d5f75000ca00cdc7595 Author: Ryusuke Konishi Date: Fri Aug 13 12:42:24 2010 +0900 nilfs2: fix list corruption after ifile creation failure If nilfs_attach_checkpoint() gets a memory allocation failure during creation of ifile, it will return without removing nilfs_sb_info struct from ns_supers list. When a concurrently mounted snapshot is unmounted or another new snapshot is mounted after that, this causes kernel oops as below: > BUG: unable to handle kernel NULL pointer dereference at (null) > IP: [] nilfs_find_sbinfo+0x74/0xa4 [nilfs2] > *pde = 00000000 > Oops: 0000 [#1] SMP > Call Trace: > [] ? nilfs_get_sb+0x165/0x532 [nilfs2] > [] ? ida_get_new_above+0x16d/0x187 > [] ? alloc_vfsmnt+0x7e/0x10a > [] ? kstrdup+0x2c/0x40 > [] ? vfs_kern_mount+0x96/0x14e > [] ? do_kern_mount+0x32/0xbd > [] ? do_mount+0x642/0x6a1 > [] ? do_page_fault+0x0/0x2d1 > [] ? copy_mount_options+0x80/0xe2 > [] ? strndup_user+0x48/0x67 > [] ? sys_mount+0x61/0x90 > [] ? sysenter_do_call+0x12/0x22 This fixes the problem. Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: stable@kernel.org commit 41e2e8fd34fff909a0e40129f6ac4233ecfa67a9 Author: Russell King Date: Fri Aug 13 23:33:46 2010 +0100 ARM: Tighten check for allowable CPSR values Reviewed-by: Arve Hjønnevåg Acked-by: Dima Zavin Signed-off-by: Russell King commit 21d93e2e29722d7832f61cc56d73fb953ee6578e Author: Mikael Pettersson Date: Sun Aug 15 10:47:23 2010 +0100 ARM: 6329/1: wire up sys_accept4() on ARM sys_accept4() was added in kernel 2.6.28, but ARM was not updated to include it. The number and types of parameters is such that no ARM-specific processing is needed, so wiring up sys_accept4() just requires defining __NR_accept4 and adding a direct call in the syscall entry table. Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original accept4() test program, modified to define __NR_accept4 for ARM. Using the updated unistd.h also eliminates a warning then building glibc (2.10.2 and newer) about accept4() being unimplemented. Signed-off-by: Mikael Pettersson Signed-off-by: Russell King commit 3185bf8c23149f32d7e7363b84539ea50b26ecb1 Author: Xiaotian Feng Date: Fri Aug 13 16:23:06 2010 +0800 KVM: destroy workqueue on kvm_create_pit() failures kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise after pit is freed, the workqueue is leaked. Signed-off-by: Xiaotian Feng Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Gleb Natapov Cc: "Michael S. Tsirkin" Cc: Gregory Haskins Signed-off-by: Avi Kivity commit f45755b8346f1a089ca7957dce5f4c3c6cb26e6f Author: Xiaotian Feng Date: Fri Aug 13 15:19:11 2010 +0800 KVM: fix poison overwritten caused by using wrong xstate size fpu.state is allocated from task_xstate_cachep, the size of task_xstate_cachep is xstate_size. xstate_size is set from cpuid instruction, which is often smaller than sizeof(struct xsave_struct). kvm is using sizeof(struct xsave_struct) to fill in/out fpu.state.xsave, as what we allocated for fpu.state is xstate_size, kernel will write out of memory and caused poison/redzone/padding overwritten warnings. Signed-off-by: Xiaotian Feng Reviewed-by: Sheng Yang Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Suresh Siddha Cc: Brian Gerst Cc: Avi Kivity Cc: Robert Richter Cc: Sheng Yang Cc: Marcelo Tosatti Cc: Gleb Natapov Cc: Jan Kiszka Signed-off-by: Avi Kivity commit f3d3f616e35db2ceeb11564eafd50759bb5bca8a Author: Min Zhang Date: Sat Aug 14 22:42:51 2010 -0700 ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss sysctl output ipv6 gc_elasticity and min_adv_mss as values divided by HZ. However, they are not in unit of jiffies, since ip6_rt_min_advmss refers to packet size and ip6_rt_fc_elasticity is used as scaler as in expire>>ip6_rt_gc_elasticity, so replace the jiffies conversion handler will regular handler for them. This has impact on scripts that are currently working assuming the divide by HZ, will yield different results with this patch in place. Signed-off-by: Min Zhang Signed-off-by: David S. Miller commit 2f09a4d5daaa36690d506fafda9c24f2be866f6b Author: Herbert Xu Date: Sat Aug 14 22:38:09 2010 -0700 xfrm: Use GFP_ATOMIC in xfrm_compile_policy As xfrm_compile_policy runs within a read_lock, we cannot use GFP_KERNEL for memory allocations. Reported-by: Luca Tettamanti Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit bd365591dfb942d1447b8043e21e8ff112630db4 Author: Michal Marek Date: Sat Aug 14 23:56:21 2010 +0100 ARM: 6328/1: Build with -fno-dwarf2-cfi-asm Commit d0679c7 restricted this workaround to powerpc only, but it turns out that ARM needs it as well. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16310 . Reported-and-Tested-by: Robert Nelson Acked-by: Mikael Pettersson Signed-off-by: Michal Marek Signed-off-by: Russell King commit 2f174847b0fdd4eb9f482030a284db24aef7a97f Author: eric miao Date: Thu Aug 12 16:43:00 2010 +0100 ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used According to commit 22eeef4bb2a7fd225089c0044060ed1fbf091958 kgdb,arm: Individual register get/set for arm It's now replaced by DBG_MAX_REG_NUM. Cc: Jason Wessel Signed-off-by: Eric Miao Signed-off-by: Russell King commit 1aa54bca6ee0d07ebcafb8ca8074b624d80724aa Author: Marcin Slusarz Date: Wed Jul 28 01:18:01 2010 +0200 tracing: Sanitize value returned from write(trace_marker, "...", len) When userspace code writes non-new-line-terminated string to trace_marker file, write handler appends new-line and returns number of bytes written to trace buffer, so write(fd, "abc", 3) will return 4 That's unexpected and unfortunately it confuses glibc's fprintf function. Example: int main() { fprintf(stderr, "abc"); return 0; } $ gcc test.c -o test $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer $ ./test 2>/sys/kernel/debug/tracing/trace_marker results in infinite loop: write(fd, "abc", 3) = 4 write(fd, "", 1) = 0 write(fd, "", 1) = 0 write(fd, "", 1) = 0 write(fd, "", 1) = 0 write(fd, "", 1) = 0 write(fd, "", 1) = 0 write(fd, "", 1) = 0 (...) ...and kernel trace buffer full of empty markers. Fix it by sanitizing write return value. Signed-off-by: Marcin Slusarz LKML-Reference: <20100727231801.GB2826@joi.lan> Cc: Frederic Weisbecker Cc: Ingo Molnar Signed-off-by: Steven Rostedt commit 6ccf15a1a76d2ff915cdef6ae4d12d0170087118 Author: Maxim Levitsky Date: Fri Aug 13 11:27:28 2010 -0400 ath5k: disable ASPM L0s for all cards Atheros PCIe wireless cards handled by ath5k do require L0s disabled. For distributions shipping with CONFIG_PCIEASPM (this will be enabled by default in the future in 2.6.36) this will also mean both L1 and L0s will be disabled when a pre 1.1 PCIe device is detected. We do know L1 works correctly even for all ath5k pre 1.1 PCIe devices though but cannot currently undue the effect of a blacklist, for details you can read pcie_aspm_sanity_check() and see how it adjusts the device link capability. It may be possible in the future to implement some PCI API to allow drivers to override blacklists for pre 1.1 PCIe but for now it is best to accept that both L0s and L1 will be disabled completely for distributions shipping with CONFIG_PCIEASPM rather than having this issue present. Motivation for adding this new API will be to help with power consumption for some of these devices. Example of issues you'd see: - On the Acer Aspire One (AOA150, Atheros Communications Inc. AR5001 Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM enabled, the card will eventually stall on heavy traffic with often 'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes these problems. - On the same card you would see a storm of RXORN interrupts even though medium is idle. Credit for root causing and fixing the bug goes to Jussi Kivilinna. Cc: David Quan Cc: Matthew Garrett Cc: Tim Gardner Cc: Jussi Kivilinna Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: Maxim Levitsky Signed-off-by: John W. Linville commit ca6cff1f80f30cc6313a943339361ad6f9e76548 Author: Rajkumar Manoharan Date: Fri Aug 13 18:36:40 2010 +0530 ath9k_htc: load proper firmware for device ID 7015 This patch handles the firmware loading properly for device ID 7015. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit fe0dbcc9d2e941328b3269dab102b94ad697ade5 Author: Yuri Kululin Date: Fri Aug 13 13:46:12 2010 +0400 wl1251: fix trigger scan timeout usage Use appropriate command (CMD_TRIGGER_SCAN_TO) instead of scan command (CMD_SCAN) to configure trigger scan timeout. This was broken in commit 3a98c30f3e8bb1f32b5bcb74a39647b3670de275. This fix address the bug reported here: https://bugzilla.kernel.org/show_bug.cgi?id=16554 Cc: stable@kernel.org Signed-off-by: Yuri Ershov Signed-off-by: Yuri Kululin Acked-by: Kalle Valo Signed-off-by: John W. Linville commit 71ba186c123630ddab17667ec9ecf7e2ef211295 Author: Vivek Natarajan Date: Thu Aug 12 14:23:28 2010 +0530 ath9k_htc: Fix disconnect issue in HT40 mode. Some APs advertise that they may be HT40 capable in the capabilites but the current operating channel configuration may be only HT20. This causes disconnection as ath9k_htc sets WLAN_RC_40_FLAG despite the AP operating in HT20 mode. Hence set this flag only if the current channel configuration is HT40 enabled. Cc: stable@kernel.org Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit 9c9e54a8df0be48aa359744f412377cc55c3b7d2 Author: Jiri Kosina Date: Fri Aug 13 12:19:45 2010 +0200 HID: hiddev: fix memory corruption due to invalid intfdata Commit bd25f4dd6972755579d0 ("HID: hiddev: use usb_find_interface, get rid of BKL") introduced using of private intfdata in hiddev for purpose of storing hiddev pointer. This is a problem, because intf pointer is already being set to struct hid_device pointer by HID core. This obviously lead to memory corruptions at device disconnect time, such as WARNING: at lib/kobject.c:595 kobject_put+0x37/0x4b() kobject: '(null)' (ffff88011e9cd898): is not initialized, yet kobject_put() is being called. Convert hiddev into accessing hiddev through struct hid_device which is in intfdata already. Reported-and-tested-by: Markus Trippelsdorf Reported-and-tested-by: Heinz Diehl Reported-and-tested-by: Alan Ott Signed-off-by: Jiri Kosina commit 7032269e87ade34cc12891675371fa2ac150a620 Author: Chris Ball Date: Thu Aug 12 19:07:40 2010 -0400 HID: hiddev: protect against disconnect/NULL-dereference race One of our users reports consistently hitting a NULL dereference that resolves to the "hid_to_usb_dev(hid);" call in hiddev_ioctl(), when disconnecting a Lego WeDo USB HID device from an OLPC XO running Scratch software. There's a FIXME comment and a guard against the dereference, but that happens farther down the function than the initial dereference does. This patch moves the call to be below the guard, and the user reports that it fixes the problem for him. OLPC bug report: http://dev.laptop.org/ticket/10174 Signed-off-by: Chris Ball Signed-off-by: Jiri Kosina commit 2a37a3df57c44e947271758a1aa4bea7bff9feab Author: Steven Rostedt Date: Thu Jun 3 15:21:34 2010 -0400 tracing/events: Convert format output to seq_file Two new events were added that broke the current format output. Both from the SCSI system: scsi_dispatch_cmd_done and scsi_dispatch_cmd_timeout The reason is that their print_fmt exceeded a page size. Since the output of the format used simple_read_from_buffer and trace_seq, it was limited to a page size in output. This patch converts the printing of the format of an event into seq_file, which allows greater than a page size to be shown. I diffed all event formats comparing the output with and without this patch. All matched except for the above two, which showed just: FORMAT TOO BIG without this patch, but now properly displays the output with this patch. v2: Remove updating *pos in seq start function. [ Thanks to Li Zefan for pointing that out ] Reviewed-by: Li Zefan Cc: Martin K. Petersen Cc: Kei Tokunaga Cc: James Bottomley Cc: Tomohiro Kusumi Cc: Xiao Guangrong Signed-off-by: Steven Rostedt commit 465c6cca2668a2db2a4ffce3dca5714017873f2b Author: Mike Frysinger Date: Fri Aug 6 03:26:24 2010 -0400 tracing: Extend recordmcount to better support Blackfin mcount The mcount call on Blackfin systems includes some stack manipulation around the actual call site, so extend the build time perl script to support this. This way we can avoid doing the calculation at runtime. Signed-off-by: Mike Frysinger LKML-Reference: <1281079584-21205-1-git-send-email-vapier@gentoo.org> Signed-off-by: Steven Rostedt commit da93f10684bfba2983a70c10b5d417232b6a5245 Author: Rajkumar Manoharan Date: Wed Aug 11 20:27:43 2010 +0530 ath9k_htc: fix panic on packet injection using airbase-ng tool. This should fix the oops which occurs during the packet injection on monitor interface. EIP is at ath9k_htc_tx_start+0x69/0x220 [ath9k_htc] [] ? invoke_tx_handlers+0xa5a/0xee0 [mac80211] [] ? ath9k_htc_tx+0x44/0xe0 [ath9k_htc] [] ? __ieee80211_tx+0xf8/0x190 [mac80211] [] ? ieee80211_tx+0x9d/0x1a0 [mac80211] [] ? ieee80211_xmit+0x9c/0x1c0 [mac80211] [] ? ieee80211_monitor_start_xmit+0x85/0xb0 [mac80211] [] ? dev_hard_start_xmit+0x1ad/0x210 [] ? __alloc_skb+0x52/0x130 [] ? sch_direct_xmit+0x105/0x170 [] ? dev_queue_xmit+0x37f/0x4b0 [] ? packet_snd+0x21e/0x250 [] ? packet_sendmsg+0x32/0x40 [] ? sock_aio_write+0x113/0x130 [] ? do_sync_write+0xc4/0x100 [] ? autoremove_wake_function+0x0/0x50 [] ? security_file_permission+0x14/0x20 [] ? rw_verify_area+0x64/0xe0 [] ? handle_mm_fault+0x338/0x390 [] ? vfs_write+0x185/0x1a0 [] ? do_page_fault+0x160/0x3a0 [] ? sys_write+0x42/0x70 [] ? syscall_call+0x7/0xb Signed-off-by: Rajkumar Manoharan Cc: stable@kernel.org Signed-off-by: John W. Linville commit 2f81b47135a971a22ccad9f3cc8c68a583b93ea4 Author: John W. Linville Date: Wed Aug 11 16:11:00 2010 -0400 ipw2100: register pm_qos request before registering pci driver It is necessary to call pm_qos_add_request prior to calling pm_qos_update_request. It was revealed that ipw2100 has been doing this wrong since "pm_qos: Get rid of the allocation in pm_qos_add_request()" (commit 82f682514a5df89ffb3890627eebf0897b7a84ec) added a WARN that results in the following backtrace: WARNING: at kernel/pm_qos_params.c:264 pm_qos_update_request+0x5e/0x70() pm_qos_update_request() called for unknown object Call Trace: [] ? warn_slowpath_common+0x78/0xb0 [] ? pm_qos_update_request+0x5e/0x70 [] ? pm_qos_update_request+0x5e/0x70 [] ? warn_slowpath_fmt+0x33/0x40 [] ? pm_qos_update_request+0x5e/0x70 [] ? ipw2100_up+0x3f/0xf10 [ipw2100] [] ? vsnprintf+0xc9/0x530 [] ? ipw2100_net_init+0x2c/0x1c0 [ipw2100] [] ? register_netdevice+0x7d/0x3c0 [] ? ipw2100_irq_tasklet+0x910/0x9a0 [ipw2100] [] ? register_netdev+0x2f/0x40 [] ? ipw2100_pci_init_one+0xd21/0x1060 [ipw2100] [] ? local_pci_probe+0xb/0x10 [] ? pci_device_probe+0x69/0x90 [] ? driver_probe_device+0x74/0x180 [] ? sysfs_create_dir+0x6a/0xb0 [] ? __driver_attach+0x79/0x80 [] ? __driver_attach+0x0/0x80 [] ? bus_for_each_dev+0x52/0x80 [] ? driver_attach+0x16/0x20 [] ? __driver_attach+0x0/0x80 [] ? bus_add_driver+0x17f/0x250 [] ? pci_device_shutdown+0x0/0x20 [] ? pci_device_remove+0x0/0x40 [] ? driver_register+0x63/0x120 [] ? __pci_register_driver+0x36/0xa0 [] ? ipw2100_init+0x48/0x67 [ipw2100] [] ? do_one_initcall+0x32/0x170 [] ? __vunmap+0xb8/0xf0 [] ? ipw2100_init+0x0/0x67 [ipw2100] [] ? sys_init_module+0x161/0x1000 [] ? sys_close+0x67/0xe0 [] ? syscall_call+0x7/0xb This patch moves pm_qos_add_request prior to pci_register_driver in ipw2100 in order to avoid this problem. Reported-by: Christoph Fritz Signed-off-by: John W. Linville commit 0702099bd86c33c2dcdbd3963433a61f3f503901 Author: J. R. Okajima Date: Wed Aug 11 13:10:16 2010 -0400 NFS: fix the return value of nfs_file_fsync() By the commit af7fa16 2010-08-03 NFS: Fix up the fsync code close(2) became returning the non-zero value even if it went well. nfs_file_fsync() should return 0 when "status" is positive. Signed-off-by: J. R. Okajima Signed-off-by: Trond Myklebust commit 15cdc644b268a9a9ce73ce0b153129222c254b7b Author: Tom Tucker Date: Wed Aug 11 12:47:24 2010 -0400 rpcrdma: Fix SQ size calculation when memreg is FRMR This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ. Signed-off-by: Tom Tucker Signed-off-by: Trond Myklebust commit 7a8b80eb38b248cfdf84048dad12073d5cfba3e6 Author: Steve Wise Date: Wed Aug 11 12:47:08 2010 -0400 xprtrdma: Do not truncate iova_start values in frmr registrations. A bad cast causes the iova_start, which in this case is a 64b DMA bus address, to be truncated on 32b systems. This breaks frmrs on 32b systems. No cast is needed. Signed-off-by: Steve Wise Signed-off-by: Trond Myklebust commit 5d7ca35a182a626f8ed5596023ad42eb219a332e Author: Davidlohr Bueso Date: Wed Aug 11 12:42:15 2010 -0400 nfs: Remove redundant NULL check upon kfree() Signed-off-by: Davidlohr Bueso Signed-off-by: Trond Myklebust commit 9b00c64318cc337846a7a08a5678f5f19aeff188 Author: Patrick J. LoPresti Date: Tue Aug 10 17:28:01 2010 -0400 nfs: Add "lookupcache" to displayed mount options Running "cat /proc/mounts" fails to display the "lookupcache" option. This oversight cost me a bunch of wasted time recently. The following simple patch fixes it. CC: stable Signed-off-by: Patrick LoPresti Signed-off-by: Trond Myklebust commit f5a73672d1811f2fb1dcb62ca90ceb12b2050ae7 Author: Neil Brown Date: Tue Aug 10 10:20:05 2010 -0400 NFS: allow close-to-open cache semantics to apply to root of NFS filesystem To obey NFS cache semantics, the client must verify the cached attributes when a file is opened. In most cases this is done by a call to d_validate as one of the last steps in path_walk. However for the root of a filesystem, d_validate is only ever called on the mounted-on filesystem (except when the path ends '.' or '..'). So NFS has no chance to validate the attributes. So, in nfs_opendir, we revalidate the attributes if the opened directory is the mountpoint. This may cause double-validation for "." and ".." lookups, but that is better than missing regular /path/name lookups completely. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust commit 669502ff31d7dba1849aec7ee2450a3c61f57d39 Author: Andy Chittenden Date: Tue Aug 10 10:19:53 2010 -0400 SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494) When reusing a TCP connection, ensure that it's aborted if a previous shutdown attempt has been made on that connection so that the RPC over TCP recovery mechanism succeeds. Signed-off-by: Andy Chittenden Signed-off-by: Trond Myklebust commit ce17178094f368d9e3f39b2cb4303da5ed633dd4 Author: Zou Nan hai Date: Fri Jun 25 13:40:22 2010 +0800 drm/i915: Enable RC6 on Ironlake. RC6 allows the GPU to enter a lower power state when the GPU is idle. Signed-off-by: Zou Nan hai [anholt: Fixed the !renderctx error path to actually not enable RC6.] Signed-off-by: Eric Anholt commit 8545423a912cf500009cbadfae57f706cf2b28e8 Author: Chris Wilson Date: Sun Aug 8 14:28:23 2010 +0100 drm/i915/sdvo: Only set is_lvds if we have a valid fixed mode. If we have failed to ascertain the fixed mode for the LVDS panel, then trust the pixel clock ranges reported for the connection when determing valid modes. This makes intel_sdvo_mode_valid() consistent with intel_lvds_mode_valid() which is also a no-op is there is no fixed mode defined. (Since the mode is both validated by SDVO and LVDS, why are checking against an LVDS fixed mode in SDVO...) By only defining is_lvds to be true when we actually have an LVDS output with a fixed mode, we avoid various potential NULL deferences where the assumption is made that all LVDS outputs have a fixed mode. References: Bug 29449 - [Q35] failure to read EDID/vbios for LVDS, no mode => no output https://bugs.freedesktop.org/show_bug.cgi?id=29449 The primary failure in this bug is not finding the EDID and determining the correct fixed panel mode. However, this patch should fix the secondary issue of not enabling any of the standard modes for the panel either. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit aa40d6bbb9cf88f3fb296a57e046a52e9a68ab72 Author: Zou Nan hai Date: Fri Jun 25 13:40:23 2010 +0800 drm/i915: Set up a render context on Ironlake RC6 power state requires a logical render context in place for saving render context. Signed-off-by: Zou Nan hai Signed-off-by: Eric Anholt commit 1cafd34731cd14e5a72edaf0f41717c8126cfce9 Author: Zou Nan hai Date: Fri Jun 25 13:40:24 2010 +0800 drm/i915 invalidate indirect state pointers at end of ring exec This is required by the spec, and without this some 3D programs will hang after resume from RC6 we enable that. Signed-off-by: Zou Nan hai Signed-off-by: Eric Anholt commit e78d73b16bcde921c9cf458d2e4de8e4fc2518f3 Author: Chris Wilson Date: Sat Aug 7 14:18:47 2010 +0100 drm/i915: Wake-up wait_request() from elapsed hang-check (v2) If our watchdog fires and we see that the GPU is idle, but that we are still waiting on an interrupt, forcibly wake-up the waiter. i915_do_wait_request() should not be racy, yet there are persistent reports that 945GM hangs whilst the GPU is idle. This implies that the hardware is not quite as coherent as the documentation claims - a write followed by a flush is supposed to be coherent in main memory before the flush is retired and the irq is emitted. This seems to be a sensible and elegant guard to force the wait to timeout. v2: Daniel Vetter pointed out that a warning would be useful to explain why the machine appeared to stall. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 6eeefaf3c86b8937db8ad930c48bfb592fc5e32e Author: Chris Wilson Date: Sat Aug 7 11:01:39 2010 +0100 drm/i915: Apply i830 errata for cursor alignment i830 requires 32bpp cursors to be aligned to 16KB, so we have to expose the alignment parameter to i915_gem_attach_phys_object(). Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 560b85bb750c3c539641993dd508b61260c9e874 Author: Chris Wilson Date: Sat Aug 7 11:01:38 2010 +0100 drm/i915: Only update i845/i865 CURBASE when disabled (v2) The i845 and i865 have a peculiarlity in that CURBASE is not the trigger for the vsync update of the cursor registers but instead the modification of that register is prohibited whilst the cursor is enabled. Reorder the write sequence for CURPOS, CURCNTR and CURBASE on i845 to i865 to match. v2: Remove the checks for i845/i865 from within i9xx_cursor_update() Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit c27ba48e629d2a845f26489fcddc9912673711e7 Author: Chris Wilson Date: Sat Aug 7 11:01:37 2010 +0100 drm/i915: FBC is updated within set_base() so remove second call in mode_set() The FBC is dependent upon a few details of the framebuffer so it is required to be updated within set_base(), so remove the redundant call from mode_set(). Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 5ddb954b9ee50824977d2931e0ff58b3050b337d Author: Chris Wilson Date: Sat Aug 7 11:01:36 2010 +0100 drm/i915/edp: Flush the write before waiting for PLLs Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 913d8d110078788c14812dce8bb62c37946821d2 Author: Chris Wilson Date: Sat Aug 7 11:01:35 2010 +0100 drm/i915: Ensure that while(INREG()) are bounded (v2) Add a new macro, wait_for, to simplify the act of waiting on a register to change state. wait_for() takes three arguments, the condition to inspect on every loop, the maximum amount of time to wait and whether to yield the cpu for a length of time after each check. v2: Upgrade failure messages to DRM_ERROR on the suggestion of Eric Anholt. We do not expect to hit these conditions as they reflect programming errors, so if we do we want to be notified. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit dd785e35cb3c430c2290d351e67715864f7e5db5 Author: Chris Wilson Date: Sat Aug 7 11:01:34 2010 +0100 drm/i915/ringbuffer: Set ring->gem_buffer = NULL on init unwind The cleanup path for early abort failed to nullify the gem_buffer. The likely consequence of this is zero, since a failure here should mean aborting the module load. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit debcaddcbd92387137b87f2c1c640571753915e0 Author: Chris Wilson Date: Sat Aug 7 11:01:33 2010 +0100 drm/i915: Update watermarks for Ironlake after dpms changes Previously, we only remembered to update the watermarks for i9xx, and incorrectly assumed that the crtc->enabled flag was valid at that point in the dpms cycle. Note that on my x201s this makes a SR bug on pipe 1 much easier to hit. (Since before this patch when disabling pipe 0, we either didn't update the watermarks at all, or when we did we still thought we had two pipes enabled and so disabled SR.) References: Bug 28969 - [Arrandale] Screen flickers, suspect Self-Refresh https://bugs.freedesktop.org/show_bug.cgi?id=28969 Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 862daefcc9a1eb9ff3e4c3d8076c31535f710cf9 Author: Chris Wilson Date: Sat Aug 7 11:01:32 2010 +0100 drm/i915/opregion: Use ASLE response codes defined in 0.1 Within i915_opregion.c there are two blocks of semantically identical ASLE response codes defined. Only one of those matches the ACPI IGD OpRegion Specification 0.1, use those. Signed-off-by: Chris Wilson Acked-by: Matthew Garrett Signed-off-by: Eric Anholt commit 868dc58fbfda73493d62eae353b6b13649550e10 Author: Chris Wilson Date: Sat Aug 7 11:01:31 2010 +0100 drm/i915/display: Add pipe/plane information to dpms debugging Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit ae9fed6b601821d70928797c56da0e2008ef840d Author: Chris Wilson Date: Sat Aug 7 11:01:30 2010 +0100 drm/i915: Truncate the shmem backing pages on purge shmfs doesn't actually implement i_ops->truncate() so we were not immedatiately releasing the backing pages when shrinking the gfx cache under OOM. Instead use a combination of truncate_inode_pages() and i_ops->truncate_range() as is used by shmem_delete_inode(). Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 20a0945951705246278f43641bb13611c030e112 Author: Chris Wilson Date: Sat Aug 7 11:01:29 2010 +0100 drm/i915: Write to display base last. Writing to the DSPBASE register triggers the double-buffered update to all the control registers, so always write it last in the update sequence. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 1d8e1c75ffa84400758aef9cc59298920b8801f9 Author: Chris Wilson Date: Sat Aug 7 11:01:28 2010 +0100 drm/i915: Enable aspect/centering panel fitting for Ironlake. v2: Hook in DP paths to keep FULLSCREEN panel fitting on eDP. Signed-off-by: Chris Wilson Reviewed-by: Zhenyu Wang Signed-off-by: Eric Anholt commit 2e88e40bed136a7b7cb1c77d8dc6bd181d0d2732 Author: Chris Wilson Date: Sat Aug 7 11:01:27 2010 +0100 drm/i915/sdvo: Markup a few constant strings. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit e56660ddfb48ccc6777f31cb235db218e0cf5b83 Author: Chris Wilson Date: Sat Aug 7 11:01:26 2010 +0100 drm/i915: Record error batch buffers using iomem Directly read the GTT mapping for the contents of the batch buffers rather than relying on possibly stale CPU caches. Also for completeness scan the flushing/inactive lists for the current buffers - we are collecting error state after all. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 7d1c4804ae98cdee572d7d10d8a5deaa2e686285 Author: Chris Wilson Date: Sat Aug 7 21:45:03 2010 +0100 drm/i915: Maintain LRU order of inactive objects upon access by CPU (v2) In order to reduce the penalty of fallbacks under memory pressure and to avoid a potential immediate ping-pong of evicting a mmaped buffer, we move the object to the tail of the inactive list when a page is freshly faulted or the object is moved into the CPU domain. We choose not to protect the CPU objects from casual eviction, preferring to keep the GPU active for as long as possible. v2: Daniel Vetter found a bug where I forgot that pinned objects are kept off the inactive list. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit cd377ea93f34cbd6ec49c868b66a5a7ab184775c Author: Chris Wilson Date: Sat Aug 7 11:01:24 2010 +0100 drm/i915: Implement fair lru eviction across both rings. (v2) Based in a large part upon Daniel Vetter's implementation and adapted for handling multiple rings in a single pass. This should lead to better gtt usage and fixes the page-fault-of-doom triggered. The fairness is provided by scanning through the GTT space amalgamating space in rendering order. As soon as we have a contiguous space in the GTT large enough for the new object (and its alignment), evict any object which lies within that space. This should keep more objects resident in the GTT. Doing throughput testing on a PineView machine with cairo-perf-trace indicates that there is very little difference with the new LRU scan, perhaps a small improvement... Except oddly for the poppler trace. Reference: Bug 15911 - Intermittent X crash (freeze) https://bugzilla.kernel.org/show_bug.cgi?id=15911 Bug 20152 - cannot view JPG in firefox when running UXA https://bugs.freedesktop.org/show_bug.cgi?id=20152 Bug 24369 - Hang when scrolling firefox page with window in front https://bugs.freedesktop.org/show_bug.cgi?id=24369 Bug 28478 - Intermittent graphics lockups due to overflow/loop https://bugs.freedesktop.org/show_bug.cgi?id=28478 v2: Attempt to clarify the logic and order of eviction through the use of comments and macros. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Signed-off-by: Eric Anholt commit b47eb4a2b302f33adaed2a27d2b3bfc74fe35ac5 Author: Chris Wilson Date: Sat Aug 7 11:01:23 2010 +0100 drm/i915: Move the eviction logic to its own file. The eviction code is the gnarly underbelly of memory management, and is clearer if kept separated from the normal domain management in GEM. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 6f392d548658a17600da7faaf8a5df25ee5f01f6 Author: Chris Wilson Date: Sat Aug 7 11:01:22 2010 +0100 drm/i915: Use a common seqno for all rings. This will be used by the eviction logic to maintain fairness between the rings. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 0108a3edd5c2e3b150a550d565b6aa1a67c0edbe Author: Daniel Vetter Date: Sat Aug 7 11:01:21 2010 +0100 drm/i915: prepare for fair lru eviction This does two little changes: - Add an alignment parameter for evict_something. It's not really great to whack a carefully sized hole into the gtt with the wrong alignment. Especially since the fallback path is a full evict. - With the inactive scan stuff we need to evict more that one object, so move the unbind call into the helper function that scans for the object to be evicted, too. And adjust its name. No functional changes in this patch, just preparation. Signed-Off-by: Daniel Vetter Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit bf1a10923920f56da23a118de2511a72af341d61 Author: Chris Wilson Date: Sat Aug 7 11:01:20 2010 +0100 drm/i915: Append the object onto the inactive list on binding. In order to properly track bound objects, they need to exist on one of the inactive/active lists or be pinned. As this is a requirement, do the work inside i915_gem_bind_to_gtt() rather than dotted around the callsites. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 6ef3d4278034982c13df87c4a51e0445f762d316 Author: Chris Wilson Date: Wed Aug 4 20:26:07 2010 +0100 drm/i915: Capture the overlay status upon a GPU hang. v2: Add the interrupt status and address. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Signed-off-by: Eric Anholt commit dbd7ac9661ba321fe9c1f1b7cb5f4471a6e59570 Author: Chris Wilson Date: Wed Aug 4 15:18:15 2010 +0100 drm/i915: Use an uncommon name for the local dev_priv in macros Using dev_priv__ avoids sparse complaining about shadowed variables in the *LP_RING() macros. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit e898cd221db65273bfc102fa20e4e228e0b8c7e1 Author: Chris Wilson Date: Wed Aug 4 15:18:14 2010 +0100 drm/i915: Inline ringbuffer_emit() As the function has been reduced to a store plus increment, the body is now smaller than the call so inline it. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit d97ed3396399126cfca1e12e2b2e2d8bbc4924e5 Author: Chris Wilson Date: Wed Aug 4 15:18:13 2010 +0100 drm/i915: Move ringbuffer accounting to begin/advance. As we check that the ringbuffer will not wrap upon emission, we do not need to check that incrementing the tail wrapped every time. However, we do upon advancing just in case the tail is now pointing at the very end of the ring. Likewise we can account for the space used during emission in begin() and avoid decrementing it for every emit. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 1741dd4aa7552055659bf74ab829a21579407f10 Author: Chris Wilson Date: Wed Aug 4 15:18:12 2010 +0100 drm/i915: Unroll wrapping of the ringbuffer. The tail is quadword aligned, so we can add two MI_NOOP as a time. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit ae7d49d879fd196bded306e9465e0aa5a203e971 Author: Chris Wilson Date: Wed Aug 4 12:37:41 2010 +0100 drm/i915: Emit a backtrace if we attempt to rebind a pinned buffer This debugging trace was useful for finding the fbcon regression on i965, and it may prove useful again in future. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 87f8ebf309b2df69b57be96bf36d2d61009fd296 Author: Chris Wilson Date: Wed Aug 4 12:24:42 2010 +0100 drm/i915: Disable the cursor for DPMS_OFF The comments have long desired that we should switch off the cursor along with the display plane, make it so. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 6146b3d61925116e3fecce36c2fd873665bd6614 Author: Daniel Vetter Date: Wed Aug 4 21:22:10 2010 +0200 drm/i915: i8xx also doesn't like multiple oustanding pageflips My i855GM suffers from a 80k/s interrupt storm without this. So add 2nd gen to the list of things that don't like more than one outstanding pageflip request. Furthermore I've changed the busy loop into a ringbuffer wait. Busy-loops that don't check whether the chip died are simply evil. And performance should actually improve, because there's usually a decent amount of rendering queued on the gpu, hopefully rendering that MI_WAIT into a noop by the time it's executed. The current code holds dev->struct_mutex while executing this loop, hence stalling all other gem activity anyway. Signed-off-by: Daniel Vetter Cc: stable@kernel.org Reviewed-by: Jesse Barnes [anholt: resolved against conflict] Signed-off-by: Eric Anholt commit 69d0b96c095468526009cb3104eee561c9252a84 Author: Daniel Vetter Date: Wed Aug 4 21:22:09 2010 +0200 drm/i915: fixup pageflip ringbuffer commands for i8xx Add a new path for 2nd gen chips that uses the commands for i81x chips (where public docs do exist) augmented with the plane bits from i915. It seems to work and doesn't result in a black screen like before. Signed-off-by: Daniel Vetter Cc: stable@kernel.org [anholt: resolved against conflict] Reviewed-by: Jesse Barnes Signed-off-by: Eric Anholt commit 0be555b66a871d711a89c301b37e763058d34d33 Author: Chris Wilson Date: Wed Aug 4 15:36:30 2010 +0100 drm/i915: report all active objects as busy Incorporates a similar patch by Daniel Vetter, the alteration being to report the current busy state after retiring. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter Signed-off-by: Eric Anholt commit 403c89ff3960c540ac4d203035078f82082411cb Author: Chris Wilson Date: Wed Aug 4 15:25:31 2010 +0100 drm/i915: Mark the static memory latency tables const. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 88f356b725c8a18c4da3ee0b6dcbc647418268f2 Author: Chris Wilson Date: Wed Aug 4 13:55:32 2010 +0100 drm/i915: Only emit flushes on active rings. This avoids the excess flush and requests on idle rings (and spamming the debug log ;-) Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit e044218a8ecb560b6fad65912a4e7e509db40414 Author: Chris Wilson Date: Wed Aug 4 13:50:29 2010 +0100 drm/i915/sdvo: Add dot crawl property This property is slightly unusual in that it is a boolean and so has no GET_MAX command. Reference: Bug 28636 - missing TV parameter "Dot Crawl freeze" https://bugs.freedesktop.org/show_bug.cgi?id=28636 Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit c55217064eb728fc9348de781979b533e7cc116c Author: Chris Wilson Date: Wed Aug 4 13:50:28 2010 +0100 drm/i915/sdvo: Add missing TV filters Reference: Bug 28634 - missing TV parameter "Flicker Filter" https://bugs.freedesktop.org/show_bug.cgi?id=28634 Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit fcc8d6721cef2158398139d66cc99b5e843126a0 Author: Chris Wilson Date: Wed Aug 4 13:50:27 2010 +0100 drm/i915/sdvo: Check for allocation failure when constructing properties Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 400397506f96466a7f57911b33b4b9c075880994 Author: Chris Wilson Date: Wed Aug 4 13:50:26 2010 +0100 drm/i915/sdvo: Use an integer mapping for supported tv format modes Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 32aad86fe88e7323d4fc5e9e423abcee0d55a03d Author: Chris Wilson Date: Wed Aug 4 13:50:25 2010 +0100 drm/i915/sdvo: Propagate errors from reading/writing control bus. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 615fb93f6d99cce2ab36dcf09986e321e17c356f Author: Chris Wilson Date: Wed Aug 4 13:50:24 2010 +0100 drm/i915: Subclass intel_connector. Make the code that tiny bit clearer by reducing the pointer dance. 2 files changed, 130 insertions(+), 147 deletions(-) Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit ea5b213ad4b161463e76b63dbb115ea20e2200f0 Author: Chris Wilson Date: Wed Aug 4 13:50:23 2010 +0100 drm/i915: Subclass intel_encoder. Subclass intel_encoder to reduce the pointer dance through intel_encoder->dev_priv. 10 files changed, 896 insertions(+), 997 deletions(-) Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 94113cecaea5067a0f7e1135abbd92cf2c297d42 Author: Chris Wilson Date: Wed Aug 4 11:25:21 2010 +0100 drm/i915: Do not clobber the contents of TRANS_DP_CTL when enabling. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 3e33d94df7f5c94adb09139b5d816a248d703a36 Author: Chris Wilson Date: Wed Aug 4 11:17:25 2010 +0100 drm/i915: Remove useless message when disabling "Big FIFO" on PineView As we already have appropriate debug and warnings when we activate and deactivate the self-refresh FIFO, having a further INFO is just annoying. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt commit 1ab335d8f85792e3b107ff8237d53cf64db714df Author: Carsten Otte Date: Fri Aug 6 18:19:22 2010 +0200 slab: fix object alignment This patch fixes alignment of slab objects in case CONFIG_DEBUG_PAGEALLOC is active. Before this spot in kmem_cache_create, we have this situation: - align contains the required alignment of the object - cachep->obj_offset is 0 or equals align in case of CONFIG_DEBUG_SLAB - size equals the size of the object, or object plus trailing redzone in case of CONFIG_DEBUG_SLAB This spot tries to fill one page per object if the object is in certain size limits, however setting obj_offset to PAGE_SIZE - size does break the object alignment since size may not be aligned with the required alignment. This patch simply adds an ALIGN(size, align) to the equation and fixes the object size detection accordingly. This code in drivers/s390/cio/qdio_setup_init has lead to incorrectly aligned slab objects (sizeof(struct qdio_q) equals 1792): qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q), 256, 0, NULL); Acked-by: Christoph Lameter Signed-off-by: Carsten Otte Signed-off-by: Pekka Enberg commit 1b5ad24878b7e5a543b98c5d2f8c0d8c0dd3088f Author: Namhyung Kim Date: Sat Aug 7 14:29:22 2010 +0200 slub: add missing __percpu markup in mm/slub_def.h kmem_cache->cpu_slab is a percpu pointer but was missing __percpu markup. Add it. Signed-off-by: Namhyung Kim Acked-by: Tejun Heo Signed-off-by: Pekka Enberg commit 18fab912d4fa70133df164d2dcf3310be0c38c34 Author: Huang Ying Date: Wed Jul 28 14:14:01 2010 +0800 tracing: Fix ring_buffer_read_page reading out of page boundary With the configuration: CONFIG_DEBUG_PAGEALLOC=y and Shaohua's patch: [PATCH]x86: make spurious_fault check correct pte bit Function call graph trace with the following will trigger a page fault. # cd /sys/kernel/debug/tracing/ # echo function_graph > current_tracer # cat per_cpu/cpu1/trace_pipe_raw > /dev/null BUG: unable to handle kernel paging request at ffff880006e99000 IP: [] rb_event_length+0x1/0x3f PGD 1b19063 PUD 1b1d063 PMD 3f067 PTE 6e99160 Oops: 0000 [#1] SMP DEBUG_PAGEALLOC last sysfs file: /sys/devices/virtual/net/lo/operstate CPU 1 Modules linked in: Pid: 1982, comm: cat Not tainted 2.6.35-rc6-aes+ #300 /Bochs RIP: 0010:[] [] rb_event_length+0x1/0x3f RSP: 0018:ffff880006475e38 EFLAGS: 00010006 RAX: 0000000000000ff0 RBX: ffff88000786c630 RCX: 000000000000001d RDX: ffff880006e98000 RSI: 0000000000000ff0 RDI: ffff880006e99000 RBP: ffff880006475eb8 R08: 000000145d7008bd R09: 0000000000000000 R10: 0000000000008000 R11: ffffffff815d9336 R12: ffff880006d08000 R13: ffff880006e605d8 R14: 0000000000000000 R15: 0000000000000018 FS: 00007f2b83e456f0(0000) GS:ffff880002100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: ffff880006e99000 CR3: 00000000064a8000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process cat (pid: 1982, threadinfo ffff880006474000, task ffff880006e40770) Stack: ffff880006475eb8 ffffffff8108730f 0000000000000ff0 000000145d7008bd <0> ffff880006e98010 ffff880006d08010 0000000000000296 ffff88000786c640 <0> ffffffff81002956 0000000000000000 ffff8800071f4680 ffff8800071f4680 Call Trace: [] ? ring_buffer_read_page+0x15a/0x24a [] ? return_to_handler+0x15/0x2f [] tracing_buffers_read+0xb9/0x164 [] vfs_read+0xaf/0x150 [] return_to_handler+0x0/0x2f [] __bad_area_nosemaphore+0x17e/0x1a1 [] return_to_handler+0x0/0x2f [] bad_area_nosemaphore+0x13/0x15 Code: 80 25 b2 16 b3 00 fe c9 c3 55 48 89 e5 f0 80 0d a4 16 b3 00 02 c9 c3 55 31 c0 48 89 e5 48 83 3d 94 16 b3 00 01 c9 0f 94 c0 c3 55 <8a> 0f 48 89 e5 83 e1 1f b8 08 00 00 00 0f b6 d1 83 fa 1e 74 27 RIP [] rb_event_length+0x1/0x3f RSP CR2: ffff880006e99000 ---[ end trace a6877bb92ccb36bb ]--- The root cause is that ring_buffer_read_page() may read out of page boundary, because the boundary checking is done after reading. This is fixed via doing boundary checking before reading. Reported-by: Shaohua Li Cc: Signed-off-by: Huang Ying LKML-Reference: <1280297641.2771.307.camel@yhuang-dev> Signed-off-by: Steven Rostedt commit 575570f02761bd680ba5731c1dfd4701062e7fb2 Author: Shaohua Li Date: Tue Jul 27 16:06:34 2010 +0800 tracing: Fix an unallocated memory access in function_graph With CONFIG_DEBUG_PAGEALLOC, I observed an unallocated memory access in function_graph trace. It appears we find a small size entry in ring buffer, but we access it as a big size entry. The access overflows the page size and touches an unallocated page. Cc: Signed-off-by: Shaohua Li LKML-Reference: <1280217994.32400.76.camel@sli10-desk.sh.intel.com> [ Added a comment to explain the problem - SDR ] Signed-off-by: Steven Rostedt commit 1778ca298b06ec86af5fc9603447c379cbfb477b Author: Bruno Prémont Date: Fri Aug 6 10:08:04 2010 +0200 HID: picolcd: correct ordering of framebuffer freeing Fix the free() ordering (which was never reached due to wrong check). Signed-off-by: Bruno Prémont Signed-off-by: Jiri Kosina commit a106025015c8d24af6518aba3ac19c4dc9098b7c Author: Dan Carpenter Date: Fri Aug 6 14:51:10 2010 +0200 HID: picolcd: testing the wrong variable "ref_cnt" is a point to the reference count and it's non-null. We really want to test the reference count itself. Signed-off-by: Dan Carpenter Signed-off-by: Jiri Kosina