1. 17 Mar, 2009 6 commits
  2. 16 Mar, 2009 8 commits
    • Frederic Weisbecker's avatar
      tracing/core: fix early free of cpumasks · 2fc1dfbe
      Frederic Weisbecker authored
      Impact: fix crashes when tracing cpumasks
      
      While ring-buffer allocation, the cpumasks are allocated too,
      including the tracing cpumask and the per-cpu file mask handler.
      But these cpumasks are freed accidentally just after.
      Fix it.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237164303-11476-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2fc1dfbe
    • Frederic Weisbecker's avatar
      tracing/ftrace: fix double calls to tracing_start() · ac1d52d0
      Frederic Weisbecker authored
      Impact: fix a warning during preemptirqsoff selftests
      
      When the preemptirqsoff selftest fails, we see the following
      warning:
      
      [    6.050000] Testing tracer preemptirqsoff: .. no entries found ..
      ------------[ cut here ]------------
      [    6.060000] WARNING: at kernel/trace/trace.c:688 tracing_start+0x67/0xd3()
      [    6.060000] Modules linked in:
      [    6.060000] Pid: 1, comm: swapper Tainted: G
      [    6.060000] Call Trace:
      [    6.060000]  [<ffffffff802460ff>] warn_slowpath+0xb1/0x100
      [    6.060000]  [<ffffffff802a8f5b>] ? trace_preempt_on+0x35/0x4b
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff80271e0b>] ? __lock_acquired+0xe6/0x1f2
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff802a3831>] tracing_start+0x67/0xd3
      [    6.060000]  [<ffffffff802a8ace>] ? irqsoff_tracer_reset+0x2d/0x57
      [    6.060000]  [<ffffffff802a4d1c>] trace_selftest_startup_preemptirqsoff+0x1c8/0x1f1
      [    6.060000]  [<ffffffff802a4798>] register_tracer+0x12f/0x241
      [    6.060000]  [<ffffffff810250d0>] ? init_irqsoff_tracer+0x0/0x53
      [    6.060000]  [<ffffffff8102510b>] init_irqsoff_tracer+0x3b/0x53
      
      This is because in fail case, the preemptirqsoff tracer selftest calls twice
      the tracing_start() function:
      
      int
      trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array *tr)
      {
              if (!ret && !count) {
                      printk(KERN_CONT ".. no entries found ..");
                      ret = -1;
                      tracing_start(); <-----
                      goto out;
              }
              [...]
      out:
              trace->reset(tr);
              tracing_start(); <------
              tracing_max_latency = save_max;
      
              return ret;
      }
      
      Since it is well handled in the out path, we don't need the conditional one.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237159961-7447-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ac1d52d0
    • Frederic Weisbecker's avatar
      tracing/core: fix missing mutex unlock on tracing_set_tracer() · 59f586db
      Frederic Weisbecker authored
      Impact: fix possible locking imbalance
      
      In case of ring buffer resize failure, tracing_set_tracer forgot to
      release trace_types_lock. Fix it.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-5-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      59f586db
    • Frederic Weisbecker's avatar
      tracing/syscalls: select kallsysms · 0ea1c415
      Frederic Weisbecker authored
      Syscall tracing must select kallsysms.
      
      The arch code builds a table to find the syscall metadata by syscall
      number. It needs the syscalls names resolution from the symbol table
      to know which name found on the syscalls metadatas match a function
      pointer from the arch sys_call_table.
      Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-4-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0ea1c415
    • Frederic Weisbecker's avatar
      tracing/syscalls: protect thread flag toggling from races · 5be71b61
      Frederic Weisbecker authored
      Impact: fix syscall tracer enable/disable race
      
      The current thread flag toggling is racy as shown in the following
      scenario:
      
      - task A is the last user of syscall tracing, it releases the
        TIF_SYSCALL_FTRACE on each tasks
      
      - at the same time task B start syscall tracing. refcount == 0 so
        it sets up TIF_SYSCALL_FTRACE on each tasks.
      
      The effect of the mixup is unpredictable.
      So this fix adds a mutex on {start,stop}_syscall_tracing().
      Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      LKML-Reference: <1237151439-6755-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5be71b61
    • Frederic Weisbecker's avatar
      tracing/syscalls: various cleanups · 64044345
      Frederic Weisbecker authored
      Impact: cleanup
      
      - Drop unused cpu variable
      - Fix some errors on comments
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      64044345
    • Frederic Weisbecker's avatar
      tracing/syscalls: fix missing release of tracing · ac99c58c
      Frederic Weisbecker authored
      Impact: fix 'stuck' syscall tracer
      
      The syscall tracer uses a refcounter to enable several users
      simultaneously.
      
      But the refcounter did not behave correctly and always restored
      its value to 0 after calling start_syscall_tracing(). Therefore,
      stop_syscall_tracing() couldn't release correctly the tasks from
      tracing.
      
      Also the tracer forgot to reset the buffer when it is released.
      
      Drop the pointless refcount decrement on start_syscall_tracing()
      and reset the buffer when we release the tracer.
      
      This fixes two reported issue:
      
      - when we switch from syscall tracer to another tracer, syscall
        tracing continued.
      
      - incorrect use of the refcount.
      Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ac99c58c
    • Ingo Molnar's avatar
      Merge branches 'tracing/ftrace', 'tracing/syscalls' and 'linus' into tracing/core · 7243f214
      Ingo Molnar authored
      Conflicts:
      	arch/parisc/kernel/irq.c
      7243f214
  3. 15 Mar, 2009 2 commits
    • Kyle McMartin's avatar
      parisc: sba_iommu: fix build bug when CONFIG_PARISC_AGP=y · 5bee17f1
      Kyle McMartin authored
      CC      drivers/parisc/sba_iommu.o
      drivers/parisc/sba_iommu.c:1373: error: expected identifier or '('
      before '}' token
      make[2]: *** [drivers/parisc/sba_iommu.o] Error 1
      make[1]: *** [drivers/parisc] Error 2
      make: *** [drivers] Error 2
      
      Don't know how this has gone missed for so long... clearly I need
      to do builds on my C8000 more often.
      Signed-off-by: default avatarKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5bee17f1
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · fbd8104c
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
        [ARM] Fix virtual to physical translation macro corner cases
        [ARM] update mach-types
        [ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
        MX1 fix include
        [ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
        [ARM] 5418/1: restore lr before leaving mcount
        ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz
        ARM: OMAP: Allow I2C bus driver to be compiled as a module
        ARM: OMAP: sched_clock() corrected
        ARM: OMAP: Fix compile error if pm.h is included
        [ARM] orion5x: pass dram mbus data to xor driver
        [ARM] S3C64XX: Fix s3c64xx_setrate_clksrc
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/irq.c
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/s3c6400-clock.c
        [ARM] S3C64XX: Fix USB host clock mux list
        [ARM] S3C64XX: Fix name of USB host clock.
        [ARM] S3C64XX: Rename IRQ_UHOST to IRQ_USBH
        [ARM] S3C64XX: Do gpiolib configuration earlier
        [ARM] S3C64XX: Staticise s3c64xx_init_irq_eint()
        [ARM] SMDK6410: Declare iodesc table static
        ...
      fbd8104c
  4. 14 Mar, 2009 19 commits
  5. 13 Mar, 2009 5 commits