1. 07 8月, 2017 1 次提交
  2. 15 7月, 2017 2 次提交
  3. 13 7月, 2017 17 次提交
  4. 12 7月, 2017 8 次提交
    • D
      ftrace: Fix uninitialized variable in match_records() · 2e028c4f
      Dan Carpenter 提交于
      My static checker complains that if "func" is NULL then "clear_filter"
      is uninitialized.  This seems like it could be true, although it's
      possible something subtle is happening that I haven't seen.
      
          kernel/trace/ftrace.c:3844 match_records()
          error: uninitialized symbol 'clear_filter'.
      
      Link: http://lkml.kernel.org/r/20170712073556.h6tkpjcdzjaozozs@mwanda
      
      Cc: stable@vger.kernel.org
      Fixes: f0a3b154 ("ftrace: Clarify code for mod command")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      2e028c4f
    • D
      ftrace: Remove an unneeded NULL check · 44925dff
      Dan Carpenter 提交于
      "func" can't be NULL and it doesn't make sense to check because we've
      already derefenced it.
      
      Link: http://lkml.kernel.org/r/20170712073340.4enzeojeoupuds5a@mwandaSigned-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      44925dff
    • V
      cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race · ab2f7cf1
      Vikram Mulukutla 提交于
      With a shared policy in place, when one of the CPUs in the policy is
      hotplugged out and then brought back online, sugov_stop() and
      sugov_start() are called in order.
      
      sugov_stop() removes utilization hooks for each CPU in the policy and
      does nothing else in the for_each_cpu() loop. sugov_start() on the
      other hand iterates through the CPUs in the policy and re-initializes
      the per-cpu structure _and_ adds the utilization hook.  This implies
      that the scheduler is allowed to invoke a CPU's utilization update
      hook when the rest of the per-cpu structures have yet to be
      re-inited.
      
      Apart from some strange values in tracepoints this doesn't cause a
      problem, but if we do end up accessing a pointer from the per-cpu
      sugov_cpu structure somewhere in the sugov_update_shared() path,
      we will likely see crashes since the memset for another CPU in the
      policy is free to race with sugov_update_shared from the CPU that is
      ready to go.  So let's fix this now to first init all per-cpu
      structures, and then add the per-cpu utilization update hooks all at
      once.
      Signed-off-by: NVikram Mulukutla <markivx@codeaurora.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ab2f7cf1
    • T
      genirq: Keep chip buslock across irq_request/release_resources() · 19d39a38
      Thomas Gleixner 提交于
      Moving the irq_request/release_resources() callbacks out of the spinlocked,
      irq disabled and bus locked region, unearthed an interesting abuse of the
      irq_bus_lock/irq_bus_sync_unlock() callbacks.
      
      The OMAP GPIO driver does merily power management inside of them. The
      irq_request_resources() callback of this GPIO irqchip calls a function
      which reads a GPIO register. That read aborts now because the clock of the
      GPIO block is not magically enabled via the irq_bus_lock() callback.
      
      Move the callbacks under the bus lock again to prevent this. In the
      free_irq() path this requires to drop the bus_lock before calling
      synchronize_irq() and reaquiring it before calling the
      irq_release_resources() callback.
      
      The bus lock can't be held because:
      
         1) The data which has been changed between bus_lock/un_lock is cached in
            the irq chip driver private data and needs to go out to the irq chip
            via the slow bus (usually SPI or I2C) before calling
            synchronize_irq().
      
            That's the reason why this bus_lock/unlock magic exists in the first
            place, as you cannot do SPI/I2C transactions while holding desc->lock
            with interrupts disabled.
      
         2) synchronize_irq() will actually deadlock, if there is a handler on
            flight. These chips use threaded handlers for obvious reasons, as
            they allow to do SPI/I2C communication. When the threaded handler
            returns then bus_lock needs to be taken in irq_finalize_oneshot() as
            we need to talk to the actual irq chip once more. After that the
            threaded handler is marked done, which makes synchronize_irq() return.
      
            So if we hold bus_lock accross the synchronize_irq() call, the
            handler cannot mark itself done because it blocks on the bus
            lock. That in turn makes synchronize_irq() wait forever on the
            threaded handler to complete....
      
      Add the missing unlock of desc->request_mutex in the error path of
      __free_irq() and add a bunch of comments to explain the locking and
      protection rules.
      
      Fixes: 46e48e25 ("genirq: Move irq resource handling out of spinlocked region")
      Reported-and-tested-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk>
      Reported-and-tested-by: NTony Lindgren <tony@atomide.com>
      Reported-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Not-longer-ranted-at-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      19d39a38
    • A
      ftrace: Hide cached module code for !CONFIG_MODULES · 69449bbd
      Arnd Bergmann 提交于
      When modules are disabled, we get a harmless build warning:
      
      kernel/trace/ftrace.c:4051:13: error: 'process_cached_mods' defined but not used [-Werror=unused-function]
      
      This adds the same #ifdef around the new code that exists around
      its caller.
      
      Link: http://lkml.kernel.org/r/20170710084413.1820568-1-arnd@arndb.de
      
      Fixes: d7fbf8df ("ftrace: Implement cached modules tracing on module load")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      69449bbd
    • S
      tracing: Do note expose stack_trace_filter without DYNAMIC_FTRACE · bbd1d27d
      Steven Rostedt (VMware) 提交于
      The "stack_trace_filter" file only makes sense if DYNAMIC_FTRACE is
      configured in. If it is not, then the user can not filter any functions.
      
      Not only that, the open function causes warnings when DYNAMIC_FTRACE is not
      set.
      
      Link: http://lkml.kernel.org/r/20170710110521.600806-1-arnd@arndb.deReported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      bbd1d27d
    • S
      tracing: Fixup trace file header alignment · b11fb737
      Steven Rostedt (VMware) 提交于
      The addition of TGID to the tracing header added a check to see if TGID
      shoudl be displayed or not, and updated the header accordingly.
      Unfortunately, it broke the default header.
      
      Also add constant strings to use for spacing. This does remove the
      visibility of the header a bit, but cuts it down from the extended lines
      much greater than 80 characters.
      
      Before this change:
      
       # tracer: function
       #
       #                            _-----=> irqs-off
       #                           / _----=> need-resched
       #                          | / _---=> hardirq/softirq
       #                          || / _--=> preempt-depth
       #                          ||| /     delay
       #           TASK-PID   CPU#||||    TIMESTAMP  FUNCTION
       #              | |       | ||||       |         |
              swapper/0-1     [000] ....     0.277830: migration_init <-do_one_initcall
              swapper/0-1     [002] d...    13.861967: Unknown type 1201
              swapper/0-1     [002] d..1    13.861970: Unknown type 1202
      
      After this change:
      
       # tracer: function
       #
       #                              _-----=> irqs-off
       #                             / _----=> need-resched
       #                            | / _---=> hardirq/softirq
       #                            || / _--=> preempt-depth
       #                            ||| /     delay
       #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
       #              | |       |   ||||       |         |
              swapper/0-1     [000] ....     0.278245: migration_init <-do_one_initcall
              swapper/0-1     [003] d...    13.861189: Unknown type 1201
              swapper/0-1     [003] d..1    13.861192: Unknown type 1202
      
      Cc: Joel Fernandes <joelaf@google.com>
      Fixes: 441dae8f ("tracing: Add support for display of tgid in trace output")
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      b11fb737
    • T
      smp/hotplug: Replace BUG_ON and react useful · dea1d0f5
      Thomas Gleixner 提交于
      The move of the unpark functions to the control thread moved the BUG_ON()
      there as well. While it made some sense in the idle thread of the upcoming
      CPU, it's bogus to crash the control thread on the already online CPU,
      especially as the function has a return value and the callsite is prepared
      to handle an error return.
      
      Replace it with a WARN_ON_ONCE() and return a proper error code.
      
      Fixes: 9cd4f1a4 ("smp/hotplug: Move unparking of percpu threads to the control CPU")
      Rightfully-ranted-at-by: NLinux Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      dea1d0f5
  5. 11 7月, 2017 8 次提交
  6. 09 7月, 2017 1 次提交
  7. 08 7月, 2017 3 次提交