1. 13 Mar, 2010 22 commits
    • Linus Torvalds's avatar
      Merge branch 'core-fixes-for-linus' of... · 4e3eaddd
      Linus Torvalds authored
      Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        locking: Make sparse work with inline spinlocks and rwlocks
        x86/mce: Fix RCU lockdep splats
        rcu: Increase RCU CPU stall timeouts if PROVE_RCU
        ftrace: Replace read_barrier_depends() with rcu_dereference_raw()
        rcu: Suppress RCU lockdep warnings during early boot
        rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
        rcu: Suppress __mpol_dup() false positive from RCU lockdep
        rcu: Make rcu_read_lock_sched_held() handle !PREEMPT
        rcu: Add control variables to lockdep_rcu_dereference() diagnostics
        rcu, cgroup: Relax the check in task_subsys_state() as early boot is now handled by lockdep-RCU
        rcu: Use wrapper function instead of exporting tasklist_lock
        sched, rcu: Fix rcu_dereference() for RCU-lockdep
        rcu: Make task_subsys_state() RCU-lockdep checks handle boot-time use
        rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
        x86/gart: Unexport gart_iommu_aperture
      
      Fix trivial conflicts in kernel/trace/ftrace.c
      4e3eaddd
    • Linus Torvalds's avatar
      Merge branch 'tracing-fixes-for-linus' of... · 8655e7e3
      Linus Torvalds authored
      Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        tracing: Do not record user stack trace from NMI context
        tracing: Disable buffer switching when starting or stopping trace
        tracing: Use same local variable when resetting the ring buffer
        function-graph: Init curr_ret_stack with ret_stack
        ring-buffer: Move disabled check into preempt disable section
        function-graph: Add tracing_thresh support to function_graph tracer
        tracing: Update the comm field in the right variable in update_max_tr
        function-graph: Use comment notation for func names of dangling '}'
        function-graph: Fix unused reference to ftrace_set_func()
        tracing: Fix warning in s_next of trace file ops
        tracing: Include irqflags headers from trace clock
      8655e7e3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 461d208c
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55
        sound: fix opti92x-ad1848 build
        ALSA: hda - Fix input source elements of secondary ADCs on Realtek
        ALSA: hda - Fix wrong model range check for ALC268
      461d208c
    • Linus Torvalds's avatar
      Merge branch 'perf-fixes-for-linus' of... · 9fdfbc2b
      Linus Torvalds authored
      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: Provide generic perf_sample_data initialization
        MAINTAINERS: Add Arnaldo as tools/perf/ co-maintainer
        perf trace: Don't use pager if scripting
        perf trace/scripting: Remove extraneous header read
        perf, ARM: Modify kuser rmb() call to compile for Thumb-2
        x86/stacktrace: Don't dereference bad frame pointers
        perf archive: Don't try to collect files without a build-id
        perf_events, x86: Fixup fixed counter constraints
        perf, x86: Restrict the ANY flag
        perf, x86: rename macro in ARCH_PERFMON_EVENTSEL_ENABLE
        perf, x86: add some IBS macros to perf_event.h
        perf, x86: make IBS macros available in perf_event.h
        hw-breakpoints: Remove stub unthrottle callback
        x86/hw-breakpoints: Remove the name field
        perf: Remove pointless breakpoint union
        perf lock: Drop the buffers multiplexing dependency
        perf lock: Fix and add misc documentally things
        percpu: Add __percpu sparse annotations to hw_breakpoint
      9fdfbc2b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes · 8cea4eb6
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
        GFS2: Skip check for mandatory locks when unlocking
        GFS2: Allow the number of committed revokes to temporarily be negative
        GFS2: do not select QUOTA
      8cea4eb6
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · 122ce878
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        RDMA/nes: Fix CX4 link problem in back-to-back configuration
        RDMA/nes: Clear stall bit before destroying NIC QP
        RDMA/nes: Set assume_aligned_header bit
        RDMA/cxgb3: Wait at least one schedule cycle during device removal
        IB/mad: Ignore iWARP devices on device removal
        IPoIB: Include return code in trace message for ib_post_send() failures
        IPoIB: Fix TX queue lockup with mixed UD/CM traffic
      122ce878
    • Steven Rostedt's avatar
      tracing: Do not record user stack trace from NMI context · b6345879
      Steven Rostedt authored
      A bug was found with Li Zefan's ftrace_stress_test that caused applications
      to segfault during the test.
      
      Placing a tracing_off() in the segfault code, and examining several
      traces, I found that the following was always the case. The lock tracer
      was enabled (lockdep being required) and userstack was enabled. Testing
      this out, I just enabled the two, but that was not good enough. I needed
      to run something else that could trigger it. Running a load like hackbench
      did not work, but executing a new program would. The following would
      trigger the segfault within seconds:
      
        # echo 1 > /debug/tracing/options/userstacktrace
        # echo 1 > /debug/tracing/events/lock/enable
        # while :; do ls > /dev/null ; done
      
      Enabling the function graph tracer and looking at what was happening
      I finally noticed that all cashes happened just after an NMI.
      
       1)               |    copy_user_handle_tail() {
       1)               |      bad_area_nosemaphore() {
       1)               |        __bad_area_nosemaphore() {
       1)               |          no_context() {
       1)               |            fixup_exception() {
       1)   0.319 us    |              search_exception_tables();
       1)   0.873 us    |            }
      [...]
       1)   0.314 us    |  __rcu_read_unlock();
       1)   0.325 us    |    native_apic_mem_write();
       1)   0.943 us    |  }
       1)   0.304 us    |  rcu_nmi_exit();
      [...]
       1)   0.479 us    |  find_vma();
       1)               |  bad_area() {
       1)               |    __bad_area() {
      
      After capturing several traces of failures, all of them happened
      after an NMI. Curious about this, I added a trace_printk() to the NMI
      handler to read the regs->ip to see where the NMI happened. In which I
      found out it was here:
      
      ffffffff8135b660 <page_fault>:
      ffffffff8135b660:       48 83 ec 78             sub    $0x78,%rsp
      ffffffff8135b664:       e8 97 01 00 00          callq  ffffffff8135b800 <error_entry>
      
      What was happening is that the NMI would happen at the place that a page
      fault occurred. It would call rcu_read_lock() which was traced by
      the lock events, and the user_stack_trace would run. This would trigger
      a page fault inside the NMI. I do not see where the CR2 register is
      saved or restored in NMI handling. This means that it would corrupt
      the page fault handling that the NMI interrupted.
      
      The reason the while loop of ls helped trigger the bug, was that
      each execution of ls would cause lots of pages to be faulted in, and
      increase the chances of the race happening.
      
      The simple solution is to not allow user stack traces in NMI context.
      After this patch, I ran the above "ls" test for a couple of hours
      without any issues. Without this patch, the bug would trigger in less
      than a minute.
      
      Cc: stable@kernel.org
      Reported-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      b6345879
    • Steven Rostedt's avatar
      tracing: Disable buffer switching when starting or stopping trace · a2f80714
      Steven Rostedt authored
      When the trace iterator is read, tracing_start() and tracing_stop()
      is called to stop tracing while the iterator is processing the trace
      output.
      
      These functions disable both the standard buffer and the max latency
      buffer. But if the wakeup tracer is running, it can switch these
      buffers between the two disables:
      
        buffer = global_trace.buffer;
        if (buffer)
            ring_buffer_record_disable(buffer);
      
            <<<--------- swap happens here
      
        buffer = max_tr.buffer;
        if (buffer)
            ring_buffer_record_disable(buffer);
      
      What happens is that we disabled the same buffer twice. On tracing_start()
      we can enable the same buffer twice. All ring_buffer_record_disable()
      must be matched with a ring_buffer_record_enable() or the buffer
      can be disable permanently, or enable prematurely, and cause a bug
      where a reset happens while a trace is commiting.
      
      This patch protects these two by taking the ftrace_max_lock to prevent
      a switch from occurring.
      
      Found with Li Zefan's ftrace_stress_test.
      
      Cc: stable@kernel.org
      Reported-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a2f80714
    • Steven Rostedt's avatar
      tracing: Use same local variable when resetting the ring buffer · 283740c6
      Steven Rostedt authored
      In the ftrace code that resets the ring buffer it references the
      buffer with a local variable, but then uses the tr->buffer as the
      parameter to reset. If the wakeup tracer is running, which can
      switch the tr->buffer with the max saved buffer, this can break
      the requirement of disabling the buffer before the reset.
      
         buffer = tr->buffer;
         ring_buffer_record_disable(buffer);
         synchronize_sched();
         __tracing_reset(tr->buffer, cpu);
      
      If the tr->buffer is swapped, then the reset is not happening to the
      buffer that was disabled. This will cause the ring buffer to fail.
      
      Found with Li Zefan's ftrace_stress_test.
      
      Cc: stable@kernel.org
      Reported-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      283740c6
    • Steven Rostedt's avatar
      function-graph: Init curr_ret_stack with ret_stack · ea14eb71
      Steven Rostedt authored
      If the graph tracer is active, and a task is forked but the allocating of
      the processes graph stack fails, it can cause crash later on.
      
      This is due to the temporary stack being NULL, but the curr_ret_stack
      variable is copied from the parent. If it is not -1, then in
      ftrace_graph_probe_sched_switch() the following:
      
      	for (index = next->curr_ret_stack; index >= 0; index--)
      		next->ret_stack[index].calltime += timestamp;
      
      Will cause a kernel OOPS.
      
      Found with Li Zefan's ftrace_stress_test.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ea14eb71
    • Lai Jiangshan's avatar
      ring-buffer: Move disabled check into preempt disable section · 52fbe9cd
      Lai Jiangshan authored
      The ring buffer resizing and resetting relies on a schedule RCU
      action. The buffers are disabled, a synchronize_sched() is called
      and then the resize or reset takes place.
      
      But this only works if the disabling of the buffers are within the
      preempt disabled section, otherwise a window exists that the buffers
      can be written to while a reset or resize takes place.
      
      Cc: stable@kernel.org
      Reported-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <4B949E43.2010906@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      52fbe9cd
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · daf9fe2e
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Several MFD drivers should depend on GENERIC_HARDIRQS
        mfd: Fix sm501 requested region size
      daf9fe2e
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      Fix up .gitignore for top-level file patterns · 6db823cf
      Linus Torvalds authored
      Some of the gitignore file patters were explicitly meant to be only for
      the top level, but weren't marked that way, so they would trigger
      recursively in subdirectories too.  Normally that was harmless, but at
      least "linux" happened to trigger elsewhere too. Fix it up.
      
      And other patterns in that section weren't necessarily top-level at all.
      Reported-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6db823cf
    • Linus Torvalds's avatar
      Merge branch 'timers-fixes-for-linus' of... · 64d5aea3
      Linus Torvalds authored
      Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        timekeeping: Prevent oops when GENERIC_TIME=n
      64d5aea3
    • Eric Paris's avatar
      anon_inodes: mark the anon inode private · 3836a03d
      Eric Paris authored
      Inotify was switched to use anon_inode instead of its own private filesystem
      which only had one inode in commit c44dcc56 "switch inotify_user to
      anon_inode"
      
      The problem with this is that now the inotify inode is not a distinct inode
      which can be managed by LSMs.  userspace tools which use inotify were allowed
      to use the inotify inode but may not have had permission to do read/write type
      operations on the anon_inode.  After looking at the anon_inode and its users
      it looks like the best solution is to just mark the anon_inode as S_PRIVATE
      so the security system will ignore it.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarJames Morris <jmorris@namei.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3836a03d
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6 · 83c0fb65
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
        udf: use ext2_find_next_bit
        udf: Do not read inode before writing it
        udf: Fix unalloc space handling in udf_update_inode
      83c0fb65
    • Linus Torvalds's avatar
      Merge branch 'msm-mmc_sdcc' of git://codeaurora.org/quic/kernel/dwalker/linux-msm · 11bfe2ea
      Linus Torvalds authored
      * 'msm-mmc_sdcc' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
        msm_sdcc.c: missing brackets in msmsdcc_resume()
      11bfe2ea
    • Luca Barbieri's avatar
      locking: Make sparse work with inline spinlocks and rwlocks · b97c4bc1
      Luca Barbieri authored
      Currently sparse does not work with inline spinlock and rwlock functions. 
      The problem is that they do not use the __acquires/__releases out-of-line
      functions, but use inline functions with no sparse annotations.
      
      This patch adds the appropriate annotations to make it work properly.
      Signed-off-by: default avatarLuca Barbieri <luca@luca-barbieri.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      b97c4bc1
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · b6fedfd2
      Linus Torvalds authored
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/booke: Fix breakpoint/watchpoint one-shot behavior
        powerpc: Reduce printk from pseries_mach_cpu_die()
        powerpc: Move checks in pseries_mach_cpu_die()
        powerpc: Reset kernel stack on cpu online from cede state
        powerpc: Fix G5 thermal shutdown
        powerpc/pseries: Pass CPPR value to H_XIRR hcall
        powerpc/booke: Fix a couple typos in the advanced ptrace code
        powerpc: Fix SMP build with disabled CPU hotplugging.
        powerpc: Dynamically allocate pacas
        powerpc/perf: e500 support
        powerpc/perf: Build callchain code regardless of hardware event support.
        powerpc/cpm2: Checkpatch cleanup
        powerpc/86xx: Renaming following split of GE Fanuc joint venture
        powerpc/86xx: Convert gef_pic_lock to raw_spinlock
        powerpc/qe: Convert qe_ic_lock to raw_spinlock
        powerpc/82xx: Convert pci_pic_lock to raw_spinlock
        powerpc/85xx: Convert socrates_fpga_pic_lock to raw_spinlock
      b6fedfd2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · c32da023
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
        doc: fix typo in comment explaining rb_tree usage
        Remove fs/ntfs/ChangeLog
        doc: fix console doc typo
        doc: cpuset: Update the cpuset flag file
        Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
        Remove drivers/parport/ChangeLog
        Remove drivers/char/ChangeLog
        doc: typo - Table 1-2 should refer to "status", not "statm"
        tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
        No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
        devres/irq: Fix devm_irq_match comment
        Remove reference to kthread_create_on_cpu
        tree-wide: Assorted spelling fixes
        tree-wide: fix 'lenght' typo in comments and code
        drm/kms: fix spelling in error message
        doc: capitalization and other minor fixes in pnp doc
        devres: typo fix s/dev/devm/
        Remove redundant trailing semicolons from macros
        fix typo "definetly" -> "definitely" in comment
        tree-wide: s/widht/width/g typo in comments
        ...
      
      Fix trivial conflict in Documentation/laptops/00-INDEX
      c32da023
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm · dca1d9f6
      Linus Torvalds authored
      * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (370 commits)
        ARM: S3C2443: Add set_rate and round_rate calls for armdiv clock
        ARM: S3C2443: Remove #if 0 for clk_mpll
        ARM: S3C2443: Update notes on MPLLREF clock
        ARM: S3C2443: Further clksrc-clk conversions
        ARM: S3C2443: Change to using plat-samsung clksrc-clk implementation
        USB: Fix s3c-hsotg build following Samsung platform header moves
        ARM: S3C64XX: Reintroduce unconditional build of audio device
        ARM: 5961/1: ux500: fix CLKRST addresses
        ARM: 5977/1: arm: Enable backtrace printing on oops when PC is corrupted
        ASoC: Fix S3C64xx IIS driver for Samsung header reorg
        ARM: S3C2440: Fix plat-s3c24xx move of s3c2440/s3c2442 support
        [ARM] pxa: fix typo in mxm8x10.h
        [ARM] pxa/raumfeld: set GPIO drive bits for LED pins
        [ARM] pxa/zeus: Add support for mcp2515 CAN bus
        [ARM] pxa/zeus: Add support for onboard max6369 watchdog
        [ARM] pxa/zeus: Add Eurotech as the manufacturer
        [ARM] pxa/zeus: Correct the USB host initialisation flags
        [ARM] pxa/zeus: Allow usage of 8250-compatible UART in uncompress
        [ARM] pxa: refactor uncompress.h for non-PXA uarts
        [ARM] mmp2: fix incorrect calling of chip->mask_ack() for 2nd level cascaded IRQs
        ...
      dca1d9f6
  2. 12 Mar, 2010 18 commits