17 Oct, 2012

9 commits

  • The only place irq_finalize_oneshot() is called with force parameter set
    is the threaded handler error exit path. But IRQTF_RUNTHREAD is dropped
    at this point and irq_wake_thread() is not going to set it again,
    since PF_EXITING is set for this thread already. So irq_finalize_oneshot()
    will drop the threads bit in threads_oneshot anyway and hence the force
    parameter is superfluous.

    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120321162234.GP24806@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Alexander Gordeev
     
  • Alexander pointed out that the warnons in the regular exit path are
    bogus and the thread_mask one actually could be triggered when
    __setup_irq() hands out that thread_mask again after __free_irq()
    dropped irq_desc->lock.

    Thinking more about it, neither IRQTF_RUNTHREAD nor the bit in
    thread_mask can be set as this is the regular exit path. We come here
    due to:
    __free_irq()
    remove action from desc
    synchronize_irq()
    kthread_stop()

    So synchronize_irq() makes sure that the thread finished running and
    cleaned up both the thread_active count and thread_mask. After that
    point nothing can set IRQTF_RUNTHREAD on this action. So the warnons
    and the cleanups are pointless.

    Reported-by: Alexander Gordeev
    Cc: Ido Yariv
    Link: http://lkml.kernel.org/r/20120315190755.GA6732@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Thomas Gleixner
     
  • The current implementation does not always flush the threaded handler
    when disabling the irq. In case the irq handler was called, but the
    threaded handler hasn't started running yet, the interrupt will be
    flagged as pending, and the handler will not run. This implementation
    has some issues:

    First, if the interrupt is a wake source and flagged as pending, the
    system will not be able to suspend.

    Second, when quickly disabling and re-enabling the irq, the threaded
    handler might continue to run after the irq is re-enabled without the
    irq handler being called first. This might be an unexpected behavior.

    In addition, it might be counter-intuitive that the threaded handler
    will not be called even though the irq handler was called and returned
    IRQ_WAKE_THREAD.

    Fix this by always waiting for the threaded handler to complete in
    synchronize_irq().

    [ tglx: Massaged comments, added WARN_ONs and the missing
    IRQTF_RUNTHREAD check in exit_irq_thread() ]

    Signed-off-by: Ido Yariv
    Link: http://lkml.kernel.org/r/1322843052-7166-1-git-send-email-ido@wizery.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Ido Yariv
     
  • Currently IRQTF_DIED flag is set when a IRQ thread handler calls do_exit()
    But also PF_EXITING per process flag gets set when a thread exits. This
    fix eliminates the duplicate by using PF_EXITING flag.

    Also, there is a race condition in exit_irq_thread(). In case a thread's
    bit is cleared in desc->threads_oneshot (and the IRQ line gets unmasked),
    but before IRQTF_DIED flag is set, a new interrupt might come in and set
    just cleared bit again, this time forever. This fix throws IRQTF_DIED flag
    away, eliminating the race as a result.

    [ tglx: Test THREAD_EXITING first as suggested by Oleg ]

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135958.GD2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Alexander Gordeev
     
  • Since 63706172f332fd3f6e7458ebfb35fa6de9c21dc5 kthread_stop() is not
    afraid of dead kernel threads. So no need to check if a thread is
    alive before stopping it. These checks still were racy.

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135939.GC2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Alexander Gordeev
     
  • When a new thread handler is created, an irqaction is passed to it as
    data. Not only that irqaction is stored in task_struct by the handler
    for later use, but also a structure associated with the kernel thread
    keeps this value as long as the thread exists.

    This fix kicks irqaction out off task_struct. Yes, I introduce new bit
    field. But it allows not only to eliminate the duplicate, but also
    shortens size of task_struct.

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135925.GB2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Alexander Gordeev
     
  • We do not want a bitwise AND between boolean operands

    Signed-off-by: Alexander Gordeev
    Cc: Oleg Nesterov
    Link: http://lkml.kernel.org/r/20120309135912.GA2114@dhcp-26-207.brq.redhat.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Alexander Gordeev
     
  • Xommit ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
    fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
    handle_level_irq.

    This happens because thread_mask is or'ed unconditionally in
    irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared. So
    the check for !desc->thread_active fails and keeps the interrupt
    disabled.

    Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

    Document the thread_mask magic while at it.

    Reported-and-tested-by: Sven Joachim
    Reported-and-tested-by: Stefan Lippers-Hollmann
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Thomas Gleixner
     
  • An interrupt might be pending when irq_startup() is called, but the
    startup code does not invoke the resend logic. In some cases this
    prevents the device from issuing another interrupt which renders the
    device non functional.

    Call the resend function in irq_startup() to keep things going.

    Reported-and-tested-by: Russell King
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner
    [vaibhav.bedia@ti.com: Pull in for v3.2 to address issue with threaded irqs]
    Signed-off-by: Vaibhav Bedia

    Thomas Gleixner
     

05 Jan, 2012

2 commits

  • This is the temporary simple fix for 3.2, we need more changes in this
    area.

    1. do_signal_stop() assumes that the running untraced thread in the
    stopped thread group is not possible. This was our goal but it is
    not yet achieved: a stopped-but-resumed tracee can clone the running
    thread which can initiate another group-stop.

    Remove WARN_ON_ONCE(!current->ptrace).

    2. A new thread always starts with ->jobctl = 0. If it is auto-attached
    and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING
    but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)
    in do_jobctl_trap() if another debugger attaches.

    Change __ptrace_unlink() to set the artificial SIGSTOP for report.

    Alternatively we could change ptrace_init_task() to copy signr from
    current, but this means we can copy it for no reason and hide the
    possible similar problems.

    Acked-by: Tejun Heo
    Cc: [3.1]
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Test-case:

    int main(void)
    {
    int pid, status;

    pid = fork();
    if (!pid) {
    for (;;) {
    if (!fork())
    return 0;
    if (waitpid(-1, &status, 0) < 0) {
    printf("ERR!! wait: %m\n");
    return 0;
    }
    }
    }

    assert(ptrace(PTRACE_ATTACH, pid, 0,0) == 0);
    assert(waitpid(-1, NULL, 0) == pid);

    assert(ptrace(PTRACE_SETOPTIONS, pid, 0,
    PTRACE_O_TRACEFORK) == 0);

    do {
    ptrace(PTRACE_CONT, pid, 0, 0);
    pid = waitpid(-1, NULL, 0);
    } while (pid > 0);

    return 1;
    }

    It fails because ->real_parent sees its child in EXIT_DEAD state
    while the tracer is going to change the state back to EXIT_ZOMBIE
    in wait_task_zombie().

    The offending commit is 823b018e which moved the EXIT_DEAD check,
    but in fact we should not blame it. The original code was not
    correct as well because it didn't take ptrace_reparented() into
    account and because we can't really trust ->ptrace.

    This patch adds the additional check to close this particular
    race but it doesn't solve the whole problem. We simply can't
    rely on ->ptrace in this case, it can be cleared if the tracer
    is multithreaded by the exiting ->parent.

    I think we should kill EXIT_DEAD altogether, we should always
    remove the soon-to-be-reaped child from ->children or at least
    we should never do the DEAD->ZOMBIE transition. But this is too
    complex for 3.2.

    Reported-and-tested-by: Denys Vlasenko
    Tested-by: Lukasz Michalik
    Acked-by: Tejun Heo
    Cc: [3.0+]
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

04 Jan, 2012

1 commit

  • vfork parent uninterruptibly and unkillably waits for its child to
    exec/exit. This wait is of unbounded length. Ignore such waits
    in the hung_task detector.

    Signed-off-by: Mandeep Singh Baines
    Reported-by: Sasha Levin
    LKML-Reference:
    Cc: Linus Torvalds
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Cc: John Kacur
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Mandeep Singh Baines
     

01 Jan, 2012

1 commit

  • It was found (by Sasha) that if you use a futex located in the gate
    area we get stuck in an uninterruptible infinite loop, much like the
    ZERO_PAGE issue.

    While looking at this problem, PeterZ realized you'll get into similar
    trouble when hitting any install_special_pages() mapping. And are there
    still drivers setting up their own special mmaps without page->mapping,
    and without special VM or pte flags to make get_user_pages fail?

    In most cases, if page->mapping is NULL, we do not need to retry at all:
    Linus points out that even /proc/sys/vm/drop_caches poses no problem,
    because it ends up using remove_mapping(), which takes care not to
    interfere when the page reference count is raised.

    But there is still one case which does need a retry: if memory pressure
    called shmem_writepage in between get_user_pages_fast dropping page
    table lock and our acquiring page lock, then the page gets switched from
    filecache to swapcache (and ->mapping set to NULL) whatever the refcount.
    Fault it back in to get the page->mapping needed for key->shared.inode.

    Reported-by: Sasha Levin
    Signed-off-by: Hugh Dickins
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

31 Dec, 2011

1 commit

  • This reverts commit de28f25e8244c7353abed8de0c7792f5f883588c.

    It results in resume problems for various people. See for example

    http://thread.gmane.org/gmane.linux.kernel/1233033
    http://thread.gmane.org/gmane.linux.kernel/1233389
    http://thread.gmane.org/gmane.linux.kernel/1233159
    http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877

    and the fedora and ubuntu bug reports

    https://bugzilla.redhat.com/show_bug.cgi?id=767248
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/904569

    which got bisected down to the stable version of this commit.

    Reported-by: Jonathan Nieder
    Reported-by: Phil Miller
    Reported-by: Philip Langdale
    Reported-by: Tim Gardner
    Cc: Thomas Gleixner
    Cc: Greg KH
    Cc: stable@kernel.org # for stable kernels that applied the original
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

21 Dec, 2011

4 commits

  • * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroups: fix a css_set not found bug in cgroup_attach_proc

    Linus Torvalds
     
  • * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    time/clocksource: Fix kernel-doc warnings
    rtc: m41t80: Workaround broken alarm functionality
    rtc: Expire alarms after the time is set.

    Linus Torvalds
     
  • binary_sysctl() calls sysctl_getname() which allocates from names_cache
    slab usin __getname()

    The matching function to free the name is __putname(), and not putname()
    which should be used only to match getname() allocations.

    This is because when auditing is enabled, putname() calls audit_putname
    *instead* (not in addition) to __putname(). Then, if a syscall is in
    progress, audit_putname does not release the name - instead, it expects
    the name to get released when the syscall completes, but that will happen
    only if audit_getname() was called previously, i.e. if the name was
    allocated with getname() rather than the naked __getname(). So,
    __getname() followed by putname() ends up leaking memory.

    Signed-off-by: Michel Lespinasse
    Acked-by: Al Viro
    Cc: Christoph Hellwig
    Cc: Eric Paris
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     
  • Kernels where MAX_NUMNODES > BITS_PER_LONG may temporarily see an empty
    nodemask in a tsk's mempolicy if its previous nodemask is remapped onto a
    new set of allowed cpuset nodes where the two nodemasks, as a result of
    the remap, are now disjoint.

    c0ff7453bb5c ("cpuset,mm: fix no node to alloc memory when changing
    cpuset's mems") adds get_mems_allowed() to prevent the set of allowed
    nodes from changing for a thread. This causes any update to a set of
    allowed nodes to stall until put_mems_allowed() is called.

    This stall is unncessary, however, if at least one node remains unchanged
    in the update to the set of allowed nodes. This was addressed by
    89e8a244b97e ("cpusets: avoid looping when storing to mems_allowed if one
    node remains set"), but it's still possible that an empty nodemask may be
    read from a mempolicy because the old nodemask may be remapped to the new
    nodemask during rebind. To prevent this, only avoid the stall if there is
    no mempolicy for the thread being changed.

    This is a temporary solution until all reads from mempolicy nodemasks can
    be guaranteed to not be empty without the get_mems_allowed()
    synchronization.

    Also moves the check for nodemask intersection inside task_lock() so that
    tsk->mems_allowed cannot change. This ensures that nothing can set this
    tsk's mems_allowed out from under us and also protects tsk->mempolicy.

    Reported-by: Miao Xie
    Signed-off-by: David Rientjes
    Cc: KOSAKI Motohiro
    Cc: Paul Menage
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

20 Dec, 2011

1 commit

  • There is a BUG when migrating a PF_EXITING proc. Since css_set_prefetch()
    is not called for the PF_EXITING case, find_existing_css_set() will return
    NULL inside cgroup_task_migrate() causing a BUG.

    This bug is easy to reproduce. Create a zombie and echo its pid to
    cgroup.procs.

    $ cat zombie.c
    \#include

    int main()
    {
    if (fork())
    pause();
    return 0;
    }
    $

    We are hitting this bug pretty regularly on ChromeOS.

    This bug is already fixed by Tejun Heo's cgroup patchset which is
    targetted for the next merge window:

    https://lkml.org/lkml/2011/11/1/356

    I've create a smaller patch here which just fixes this bug so that a
    fix can be merged into the current release and stable.

    Signed-off-by: Mandeep Singh Baines
    Downstream-Bug-Report: http://crosbug.com/23953
    Reviewed-by: Li Zefan
    Signed-off-by: Tejun Heo
    Cc: containers@lists.linux-foundation.org
    Cc: cgroups@vger.kernel.org
    Cc: stable@kernel.org
    Cc: KAMEZAWA Hiroyuki
    Cc: Frederic Weisbecker
    Cc: Oleg Nesterov
    Cc: Andrew Morton
    Cc: Paul Menage
    Cc: Olof Johansson

    Mandeep Singh Baines
     

19 Dec, 2011

1 commit


18 Dec, 2011

1 commit


16 Dec, 2011

1 commit

  • Mike Galbraith reported that this recent commit:

    commit 4dcfe1025b513c2c1da5bf5586adb0e80148f612
    Author: Peter Zijlstra
    Date: Thu Nov 10 13:01:10 2011 +0100

    sched: Avoid SMT siblings in select_idle_sibling() if possible

    stopped selecting an idle SMT sibling when there are no idle
    cores in a single socket system.

    Intent of the select_idle_sibling() was to fallback to an idle
    SMT sibling, if it fails to identify an idle core. But this
    fallback was not happening on systems where all the scheduler
    domains had `SD_SHARE_PKG_RESOURCES' flag set.

    Fix it. Slightly bigger patch of cleaning all these goto's etc
    is queued up for the next release.

    Reported-by: Mike Galbraith
    Reported-by: Alex Shi
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Suresh Siddha
    Link: http://lkml.kernel.org/r/1323978421.1984.244.camel@sbsiddha-desk.sc.intel.com
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

14 Dec, 2011

1 commit

  • Commit 10c6db11 ("perf: Fix loss of notification with multi-event")
    seems to unconditionally dereference event->rb in the wakeup handler,
    this is wrong, there might not be a buffer attached.

    Signed-off-by: Will Deacon
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111213152651.GP20297@mudshark.cambridge.arm.com
    [ minor edits ]
    Signed-off-by: Ingo Molnar

    Will Deacon
     

10 Dec, 2011

1 commit


09 Dec, 2011

3 commits


07 Dec, 2011

3 commits

  • perf_event_sched_in() shouldn't try to schedule task events if there
    are none otherwise task's ctx->is_active will be set and will not be
    cleared during sched_out. This will prevent newly added events from
    being scheduled into the task context.

    Fixes a boo-boo in commit 1d5f003f5a9 ("perf: Do not set task_ctx
    pointer in cpuctx if there are no events in the context").

    Signed-off-by: Gleb Natapov
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111122140821.GF2557@redhat.com
    Signed-off-by: Ingo Molnar

    Gleb Natapov
     
  • * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    ftrace: Fix hash record accounting bug
    perf: Fix parsing of __print_flags() in TP_printk()
    jump_label: jump_label_inc may return before the code is patched
    ftrace: Remove force undef config value left for testing
    tracing: Restore system filter behavior
    tracing: fix event_subsystem ref counting

    Linus Torvalds
     
  • Since commit f59de89 ("lockdep: Clear whole lockdep_map on initialization"),
    lockdep_init_map() will clear all the struct. But it will break
    lock_set_class()/lock_set_subclass(). A typical race condition
    is like below:

    CPU A CPU B
    lock_set_subclass(lockA);
    lock_set_class(lockA);
    lockdep_init_map(lockA);
    /* lockA->name is cleared */
    memset(lockA);
    __lock_acquire(lockA);
    /* lockA->class_cache[] is cleared */
    register_lock_class(lockA);
    look_up_lock_class(lockA);
    WARN_ON_ONCE(class->name !=
    lock->name);

    lock->name = name;

    So restore to what we have done before commit f59de89 but annotate
    ->lock with kmemcheck_mark_initialized() to suppress the kmemcheck
    warning reported in commit f59de89.

    Reported-by: Sergey Senozhatsky
    Reported-by: Borislav Petkov
    Suggested-by: Vegard Nossum
    Signed-off-by: Yong Zhang
    Cc: Tejun Heo
    Cc: David Rientjes
    Cc:
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111109080451.GB8124@zhy
    Signed-off-by: Ingo Molnar

    Yong Zhang
     

06 Dec, 2011

10 commits

  • The expiry function compares the timer against current time and does
    not expire the timer when the expiry time is >= now. That's wrong. If
    the timer is set for now, then it must expire.

    Make the condition expiry > now for breaking out the loop.

    Signed-off-by: Thomas Gleixner
    Acked-by: John Stultz
    Cc: stable@kernel.org

    Thomas Gleixner
     
  • * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf: Fix loss of notification with multi-event
    perf, x86: Force IBS LVT offset assignment for family 10h
    perf, x86: Disable PEBS on SandyBridge chips
    trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter
    perf session: Fix crash with invalid CPU list
    perf python: Fix undefined symbol problem
    perf/x86: Enable raw event access to Intel offcore events
    perf: Don't use -ENOSPC for out of PMU resources
    perf: Do not set task_ctx pointer in cpuctx if there are no events in the context
    perf/x86: Fix PEBS instruction unwind
    oprofile, x86: Fix crash when unloading module (nmi timer mode)
    oprofile: Fix crash when unloading module (hr timer mode)

    Linus Torvalds
     
  • * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    clockevents: Set noop handler in clockevents_exchange_device()
    tick-broadcast: Stop active broadcast device when replacing it
    clocksource: Fix bug with max_deferment margin calculation
    rtc: Fix some bugs that allowed accumulating time drift in suspend/resume
    rtc: Disable the alarm in the hardware

    Linus Torvalds
     
  • …ernel.org/pub/scm/linux/kernel/git/tip/tip

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    slab, lockdep: Fix silly bug

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Fix race condition when stopping the irq thread

    Linus Torvalds
     
  • * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched, x86: Avoid unnecessary overflow in sched_clock
    sched: Fix buglet in return_cfs_rq_runtime()
    sched: Avoid SMT siblings in select_idle_sibling() if possible
    sched: Set the command name of the idle tasks in SMP kernels
    sched, rt: Provide means of disabling cross-cpu bandwidth sharing
    sched: Document wait_for_completion_*() return values
    sched_fair: Fix a typo in the comment describing update_sd_lb_stats
    sched: Add a comment to effective_load() since it's a pain

    Linus Torvalds
     
  • If the set_ftrace_filter is cleared by writing just whitespace to
    it, then the filter hash refcounts will be decremented but not
    updated. This causes two bugs:

    1) No functions will be enabled for tracing when they all should be

    2) If the users clears the set_ftrace_filter twice, it will crash ftrace:

    ------------[ cut here ]------------
    WARNING: at /home/rostedt/work/git/linux-trace.git/kernel/trace/ftrace.c:1384 __ftrace_hash_rec_update.part.27+0x157/0x1a7()
    Modules linked in:
    Pid: 2330, comm: bash Not tainted 3.1.0-test+ #32
    Call Trace:
    [] warn_slowpath_common+0x83/0x9b
    [] warn_slowpath_null+0x1a/0x1c
    [] __ftrace_hash_rec_update.part.27+0x157/0x1a7
    [] ? ftrace_regex_release+0xa7/0x10f
    [] ? kfree+0xe5/0x115
    [] ftrace_hash_move+0x2e/0x151
    [] ftrace_regex_release+0xba/0x10f
    [] fput+0xfd/0x1c2
    [] filp_close+0x6d/0x78
    [] sys_dup3+0x197/0x1c1
    [] sys_dup2+0x4f/0x54
    [] system_call_fastpath+0x16/0x1b
    ---[ end trace 77a3a7ee73794a02 ]---

    Link: http://lkml.kernel.org/r/20111101141420.GA4918@debian

    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • If cpu A calls jump_label_inc() just after atomic_add_return() is
    called by cpu B, atomic_inc_not_zero() will return value greater then
    zero and jump_label_inc() will return to a caller before jump_label_update()
    finishes its job on cpu B.

    Link: http://lkml.kernel.org/r/20111018175551.GH17571@redhat.com

    Cc: stable@vger.kernel.org
    Cc: Peter Zijlstra
    Acked-by: Jason Baron
    Signed-off-by: Gleb Natapov
    Signed-off-by: Steven Rostedt

    Gleb Natapov
     
  • A forced undef of a config value was used for testing and was
    accidently left in during the final commit. This causes x86 to
    run slower than needed while running function tracing as well
    as causes the function graph selftest to fail when DYNMAIC_FTRACE
    is not set. This is because the code in MCOUNT expects the ftrace
    code to be processed with the config value set that happened to
    be forced not set.

    The forced config option was left in by:
    commit 6331c28c962561aee59e5a493b7556a4bb585957
    ftrace: Fix dynamic selftest failure on some archs

    Link: http://lkml.kernel.org/r/20111102150255.GA6973@debian

    Cc: stable@vger.kernel.org
    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Though not all events have field 'prev_pid', it was allowed to do this:

    # echo 'prev_pid == 100' > events/sched/filter

    but commit 75b8e98263fdb0bfbdeba60d4db463259f1fe8a2 (tracing/filter: Swap
    entire filter of events) broke it without any reason.

    Link: http://lkml.kernel.org/r/4EAF46CF.8040408@cn.fujitsu.com

    Signed-off-by: Li Zefan
    Signed-off-by: Steven Rostedt

    Li Zefan
     
  • Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
    ever being released.

    Ref_count was added to keep track of subsystem users, not for counting
    events. Subsystem is created with ref_count = 1, so there is no need to
    increment it for every event, we have nr_events for that. Fix this by
    touching ref_count only when we actually have a new user -
    subsystem_open().

    Cc: stable@vger.kernel.org
    Signed-off-by: Ilya Dryomov
    Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
    Signed-off-by: Steven Rostedt

    Ilya Dryomov