Skip to content
  1. Jan 17, 2015
    • Wang Nan's avatar
      perf test: Fix dwarf unwind using libunwind. · b93b0967
      Wang Nan authored
      
      
      Perf tool fails to unwind user stack if the event raises in a shared
      object. This patch improves tests/dwarf-unwind.c to demonstrate the
      problem by utilizing commonly used glibc function "bsearch". If perf is
      not statically linked, the testcase will try to unwind a mixed call
      trace.
      
      By debugging libunwind I found that there is a bug in unwind-libunwind:
      it always passes 0 as segbase to libunwind, cause libunwind unable to
      locate debug_frame entry fir first level ip address (I add some more
      debugging output into libunwind to make things clear):
      
                     >_Uarm_dwarf_find_debug_frame: start_ip = 10be98, end_ip = 10c2a4
                     >_Uarm_dwarf_find_debug_frame: found debug_frame table `/lib/libc-2.18.so': segbase=0x0, len=7, gp=0x0, table_data=0x449388
                     >_Uarm_dwarf_search_unwind_table: call lookup:ip = b6cd3bcc, segbase = 0, rel_ip = b6cd3bcc
                     >lookup: e->start_ip_offset = bcf18 (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 6d314 (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 33d0c (rel_ip = b6cd3bcc)
                      ...
                     >lookup: e->start_ip_offset = 15d0c (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 15c40 (rel_ip = b6cd3bcc)
       >_Uarm_dwarf_search_unwind_table: IP b6cd3bcc inside range b6c12000-b6d4c000, but no explicit unwind info found
                      >put_rs_cache: unmasking signals/interrupts and releasing lock
                     >_Uarm_dwarf_step: returning -10
       >_Uarm_step: dwarf_step()=-10
      
      This patch passes map->start as segbase to dwarf_find_debug_frame(), so
      di will be initialized correctly.
      
      In addition, dso and executable are different when setting segbase. This
      patch first check whether the elf is executable, and pass segbase only
      for shared object.
      
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1421203007-75799-1-git-send-email-wangnan0@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b93b0967
    • Vineet Gupta's avatar
      perf tools: Avoid build splat for syscall numbers with uclibc · ea1fe3a8
      Vineet Gupta authored
      
      
      This is due to duplicated unistd inclusion (via uClibc headers + kernel headers)
      Also seen on ARM uClibc based tools
      
         ------- ARC build ---------->8-------------
      
        CC       util/evlist.o
      In file included from
      ~/arc/k.org/arch/arc/include/uapi/asm/unistd.h:25:0,
                       from util/../perf-sys.h:10,
                       from util/../perf.h:15,
                       from util/event.h:7,
                       from util/event.c:3:
      ~/arc/k.org/include/uapi/asm-generic/unistd.h:906:0:
      warning: "__NR_fcntl64" redefined [enabled by default]
       #define __NR_fcntl64 __NR3264_fcntl
       ^
      In file included from
      ~/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/sys/syscall.h:24:0,
                       from util/../perf-sys.h:6,
         ----------------->8-------------------
      
         ------- ARM build ---------->8-------------
      
        CC FPIC  plugin_scsi.o
      In file included from util/../perf-sys.h:9:0,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/arc/k.org/arch/arm/include/uapi/asm/unistd.h:28:0:
      warning: "__NR_restart_syscall" redefined [enabled by default]
      In file included from
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/syscall.h:25:0,
                       from util/../perf-sys.h:6,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/sysnum.h:17:0:
      note: this is the location of the previous definition
         ----------------->8-------------------
      
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421156604-30603-4-git-send-email-vgupta@synopsys.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ea1fe3a8
    • Vineet Gupta's avatar
      perf tools: Elide strlcpy warning with uclibc · a83d869f
      Vineet Gupta authored
      
      
         ----------------->8------------------
        CC       bench/sched-pipe.o
      In file included from builtin-annotate.c:13:0:
      util/cache.h:76:15: warning: redundant redeclaration of 'strlcpy'
      [-Wredundant-decls]
       extern size_t strlcpy(char *dest, const char *src, size_t size);
                     ^
      In file included from util/util.h:55:0,
                       from builtin.h:4,
                       from builtin-annotate.c:8:
      ~/vineetg/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/string.h:396:15:
      note: previous declaration of 'strlcpy' was here
       extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
         ----------------->8------------------
      
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421156604-30603-3-git-send-email-vgupta@synopsys.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a83d869f
    • Alexey Brodkin's avatar
      perf tools: Fix statfs.f_type data type mismatch build error with uclibc · db1806ed
      Alexey Brodkin authored
      
      
      ARC Linux uses the no legacy syscalls abi and corresponding uClibc headers
      statfs defines f_type to be U32 which causes perf build breakage
      
      http://git.uclibc.org/uClibc/tree/libc/sysdeps/linux/common-generic/bits/statfs.h
      
        ----------->8---------------
          CC       fs/fs.o
        fs/fs.c: In function 'fs__valid_mount':
        fs/fs.c:82:24: error: comparison between signed and unsigned integer
        expressions [-Werror=sign-compare]
          else if (st_fs.f_type != magic)
                                ^
        cc1: all warnings being treated as errors
        ----------->8---------------
      
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Cody P Schafer <dev@codyps.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Link: http://lkml.kernel.org/r/1420888254-17504-2-git-send-email-vgupta@synopsys.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      db1806ed
    • Arnaldo Carvalho de Melo's avatar
      tools: Remove bitops/hweight usage of bits in tools/perf · 25cd480e
      Arnaldo Carvalho de Melo authored
      
      
      We need to use lib/hweight.c for that, just like we do for lib/rbtree.c,
      so tools need to link hweight.o. For now do it directly, but we need to
      have a tools/lib/lk.a or .so that collects these goodies...
      
      Reported-by: default avatarJan Beulich <JBeulich@suse.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-a1e91dx3apzqw5kbdt7ut21s@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      25cd480e
    • Namhyung Kim's avatar
      perf machine: Fix __machine__findnew_thread() error path · 260d819e
      Namhyung Kim authored
      
      
      When thread__init_map_groups() fails, a new thread should be removed
      from the rbtree since it's gonna be freed.  Also update last match cache
      only if the function succeeded.
      
      Reported-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420763892-15535-1-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      260d819e
    • Namhyung Kim's avatar
      perf tools: Fix building error in x86_64 when dwarf unwind is on · c6e5e9fb
      Namhyung Kim authored
      
      
      When build with 'make ARCH=x86' and dwarf unwind is on, there is a
      compiling error:
      
         CC       /home/wn/perf/arch/x86/util/unwind-libdw.o
         CC       /home/wn/perf/arch/x86/tests/regs_load.o
       arch/x86/tests/regs_load.S: Assembler messages:
       arch/x86/tests/regs_load.S:65: Error: operand type mismatch for `push'
       arch/x86/tests/regs_load.S:72: Error: operand type mismatch for `pop'
       make[1]: *** [/home/wn/perf/arch/x86/tests/regs_load.o] Error 1
       make[1]: INTERNAL: Exiting with 25 jobserver tokens available; should be 24!
       make: *** [all] Error 2
       ...
      
      Which is caused by incorrectly undefine macro HAVE_ARCH_X86_64_SUPPORT.
      'config/Makefile.arch' tests __x86_64__ only when 'ARCH=x86_64'.
      However, when building x86_64 kernel, ARCH=x86 is valid and commonly
      used. Build systems, such as yocto, uses x86_64 compiler with 'ARCH=x86'
      to build x86_64 perf, which causes mismatching.
      
      As __LP64__ is defined for x86_64 as well, we can consolidate the
      __x86_64__ check to the __LP64__ check and get rid of the IS_X86_64
      IMHO.
      
      (This patch is made by Namhyung Kim when replying my v1 patch:
      
      https://lkml.org/lkml/2015/1/7/17
      
      I modified the code to remove dependency on RAW_ARCH:
      
      https://lkml.org/lkml/2015/1/7/865
      
      Namhyung Kim didn't provide his SOB in his original email. I add
      mine only for my modification.)
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1421029255-23039-1-git-send-email-wangnan0@huawei.com
      [ Namhyung provided his S-o-B on a followup to this patch thread on lkml ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c6e5e9fb
    • Namhyung Kim's avatar
      perf probe: Propagate error code when write(2) failed · 7949ba1f
      Namhyung Kim authored
      
      
      When it failed to write probe commands to the probe_event file in
      debugfs, it needs to propagate the error code properly.  Current code
      blindly uses the return value of the write(2) so it always uses
      -1 (-EPERM) and it might confuse users.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420886028-15135-4-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7949ba1f
  2. Jan 16, 2015
    • Kan Liang's avatar
      perf/x86/intel: Fix bug for "cycles:p" and "cycles:pp" on SLM · 33636732
      Kan Liang authored
      cycles:p and cycles:pp do not work on SLM since commit:
      
         86a04461
      
       ("perf/x86: Revamp PEBS event selection")
      
      UOPS_RETIRED.ALL is not a PEBS capable event, so it should not be used
      to count cycle number.
      
      Actually SLM calls intel_pebs_aliases_core2() which uses INST_RETIRED.ANY_P
      to count the number of cycles. It's a PEBS capable event. But inv and
      cmask must be set to count cycles.
      
      Considering SLM allows all events as PEBS with no flags, only
      INST_RETIRED.ANY_P, inv=1, cmask=16 needs to handled specially.
      
      Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421084541-31639-1-git-send-email-kan.liang@intel.com
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      33636732
    • Stephane Eranian's avatar
      perf/rapl: Fix sysfs_show() initialization for RAPL PMU · 433678bd
      Stephane Eranian authored
      
      
      This patch fixes a problem with the initialization of the
      sysfs_show() routine for the RAPL PMU.
      
      The current code was wrongly relying on the EVENT_ATTR_STR()
      macro which uses the events_sysfs_show() function in the x86
      PMU code. That function itself was relying on the x86_pmu data
      structure. Yet RAPL and the core PMU (x86_pmu) have nothing to
      do with each other. They should therefore not interact with
      each other.
      
      The x86_pmu structure is initialized at boot time based on
      the host CPU model. When the host CPU is not supported, the
      x86_pmu remains uninitialized and some of the callbacks it
      contains are NULL.
      
      The false dependency with x86_pmu could potentially cause crashes
      in case the x86_pmu is not initialized while the RAPL PMU is. This
      may, for instance, be the case in virtualized environments.
      
      This patch fixes the problem by using a private sysfs_show()
      routine for exporting the RAPL PMU events.
      
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150113225953.GA21525@thinkpad
      Cc: vincent.weaver@maine.edu
      Cc: jolsa@redhat.com
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      433678bd
  3. Jan 15, 2015
  4. Jan 14, 2015
    • Zhang Rui's avatar
      Merge branch 'fixes' of... · a4378cc6
      Zhang Rui authored
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc
      a4378cc6
    • Jean-Francois Remy's avatar
      neighbour: fix base_reachable_time(_ms) not effective immediatly when changed · 4bf6980d
      Jean-Francois Remy authored
      
      
      When setting base_reachable_time or base_reachable_time_ms on a
      specific interface through sysctl or netlink, the reachable_time
      value is not updated.
      
      This means that neighbour entries will continue to be updated using the
      old value until it is recomputed in neigh_period_work (which
          recomputes the value every 300*HZ).
      On systems with HZ equal to 1000 for instance, it means 5mins before
      the change is effective.
      
      This patch changes this behavior by recomputing reachable_time after
      each set on base_reachable_time or base_reachable_time_ms.
      The new value will become effective the next time the neighbour's timer
      is triggered.
      
      Changes are made in two places: the netlink code for set and the sysctl
      handling code. For sysctl, I use a proc_handler. The ipv6 network
      code does provide its own handler but it already refreshes
      reachable_time correctly so it's not an issue.
      Any other user of neighbour which provide its own handlers must
      refresh reachable_time.
      
      Signed-off-by: default avatarJean-Francois Remy <jeff@melix.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4bf6980d
    • Stefan Agner's avatar
      net: fec: fix MDIO bus assignement for dual fec SoC's · 3d125f9c
      Stefan Agner authored
      
      
      On i.MX28, the MDIO bus is shared between the two FEC instances.
      The driver makes sure that the second FEC uses the MDIO bus of the
      first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set.
      However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC
      has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC
      is not an option since other logic, triggered by this quirk, is
      still needed.
      
      Furthermore, there are board designs which use the same MDIO bus
      for both PHY's even though the second bus would be available on the
      SoC side. Such layout are popular since it saves pins on SoC side.
      Due to the above quirk, those boards currently do work fine. The
      boards in the mainline tree with such a layout are:
      - Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts)
      - Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts)
      
      This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which
      makes sure that the MDIO bus of the first FEC is used in any case.
      
      However, the boards above do have a SoC with a MDIO bus for each FEC
      instance. But the PHY's are not connected in a 1:1 configuration. A
      proper device tree description is needed to allow the driver to
      figure out where to find its PHY. This patch fixes that shortcoming
      by adding a MDIO bus child node to the first FEC instance, along
      with the two PHY's on that bus, and making use of the phy-handle
      property to add a reference to the PHY's.
      
      Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d125f9c
    • Linus Torvalds's avatar
      Merge branch 'leds-fixes-for-3.19' of... · 188c9019
      Linus Torvalds authored
      Merge branch 'leds-fixes-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
      
      Pull LED fix from Bryan Wu.
      
      * 'leds-fixes-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: netxbig: fix oops at probe time
      188c9019
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux · 0c133dd0
      Linus Torvalds authored
      Pull WRITE_ONCE argument order change from Christian Borntraeger:
       "As discussed on LKML[1] it was agreed that WRITE_ONCE(x, val) is
        better than ASSIGN_ONCE(val, x)
      
        Lets change that for 3.19 as 3.19 has no user yet, but the first users
        will hit linux-next soon"
      
      [1] http://marc.info/?l=linux-kernel&m=142081181707596
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux:
        kernel: Change ASSIGN_ONCE(val, x) to WRITE_ONCE(x, val)
      0c133dd0
    • David Vrabel's avatar
      xen-netfront: use different locks for Rx and Tx stats · 900e1833
      David Vrabel authored
      
      
      In netfront the Rx and Tx path are independent and use different
      locks.  The Tx lock is held with hard irqs disabled, but Rx lock is
      held with only BH disabled.  Since both sides use the same stats lock,
      a deadlock may occur.
      
        [ INFO: possible irq lock inversion dependency detected ]
        3.16.2 #16 Not tainted
        ---------------------------------------------------------
        swapper/0/0 just changed the state of lock:
         (&(&queue->tx_lock)->rlock){-.....}, at: [<c03adec8>]
        xennet_tx_interrupt+0x14/0x34
        but this lock took another, HARDIRQ-unsafe lock in the past:
         (&stat->syncp.seq#2){+.-...}
        and interrupts could create inverse lock ordering between them.
        other info that might help us debug this:
         Possible interrupt unsafe locking scenario:
      
               CPU0                    CPU1
               ----                    ----
          lock(&stat->syncp.seq#2);
                                       local_irq_disable();
                                       lock(&(&queue->tx_lock)->rlock);
                                       lock(&stat->syncp.seq#2);
          <Interrupt>
            lock(&(&queue->tx_lock)->rlock);
      
      Using separate locks for the Rx and Tx stats fixes this deadlock.
      
      Reported-by: default avatarDmitry Piotrovsky <piotrovskydmitry@gmail.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      900e1833
    • Mugunthan V N's avatar
      drivers: net: cpsw: fix multicast flush in dual emac mode · 25906052
      Mugunthan V N authored
      Since ALE table is a common resource for both the interfaces in Dual EMAC
      mode and while bringing up the second interface in cpsw_ndo_set_rx_mode()
      all the multicast entries added by the first interface is flushed out and
      only second interface multicast addresses are added. Fixing this by
      flushing multicast addresses based on dual EMAC port vlans which will not
      affect the other emac port multicast addresses.
      
      Fixes: d9ba8f9e
      
       (driver: net: ethernet: cpsw: dual emac interface implementation)
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25906052
    • Simon Guinot's avatar
      leds: netxbig: fix oops at probe time · 0c86ac2c
      Simon Guinot authored
      This patch fixes a NULL pointer dereference on led_dat->mode_val. Due to
      this bug, a kernel oops can be observed at probe time on the LaCie 2Big
      and 5Big v2 boards:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000008
      [...]
      [<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c)
      [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c)
      [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90)
      [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94)
      [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc)
      [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8)
      [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc)
      [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4)
      [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec)
      [<c058db9c>] (...
      0c86ac2c
    • Hariprasad Shenai's avatar
      cxgb4vf: Initialize mdio_addr before using it · fd48e639
      Hariprasad Shenai authored
      In commit 5ad24def
      
       ("cxgb4vf: Fix ethtool get_settings for VF driver")
      mdio_addr of port_info structure was used unininitialzed. Fixing it.
      
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd48e639
    • Christian Borntraeger's avatar
      kernel: Change ASSIGN_ONCE(val, x) to WRITE_ONCE(x, val) · 43239cbe
      Christian Borntraeger authored
      
      
      Feedback has shown that WRITE_ONCE(x, val) is easier to use than
      ASSIGN_ONCE(val,x).
      There are no in-tree users yet, so lets change it for 3.19.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Acked-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      43239cbe
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-3.19-rc-5' of... · e7a823be
      Linus Torvalds authored
      Merge tag 'linux-kselftest-3.19-rc-5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This update contains three patches to fix one compile error, and two
        run-time bugs.  One of them fixes infinite loop on ARM"
      
      * tag 'linux-kselftest-3.19-rc-5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/vm: fix link error for transhuge-stress test
        tools: testing: selftests: mq_perf_tests: Fix infinite loop on ARM
        selftests/exec: allow shell return code of 126
      e7a823be
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.19-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 613d4cef
      Linus Torvalds authored
      Pull xen bug fixes from David Vrabel:
       "Several critical linear p2m fixes that prevented some hosts from
        booting"
      
      * tag 'stable/for-linus-3.19-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/xen: properly retrieve NMI reason
        xen: check for zero sized area when invalidating memory
        xen: use correct type for physical addresses
        xen: correct race in alloc_p2m_pmd()
        xen: correct error for building p2m list on 32 bits
        x86/xen: avoid freeing static 'name' when kasprintf() fails
        x86/xen: add extra memory for remapped frames during setup
        x86/xen: don't count how many PFNs are identity mapped
        x86/xen: Free bootmem in free_p2m_page() during early boot
        x86/xen: Remove unnecessary BUG_ON(preemptible()) in xen_setup_timer()
      613d4cef
    • B Viswanath's avatar
      net: Corrected the comment describing the ndo operations to reflect the actual... · 5d632cb7
      B Viswanath authored
      
      net: Corrected the comment describing the ndo operations to reflect the actual prototype for couple of operations
      
      Corrected the comment describing the ndo operations to
      reflect the actual prototype for couple of operations
      
      Signed-off-by: default avatarB Viswanath <marichika4@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d632cb7
    • Linus Torvalds's avatar
      Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 4f7a42de
      Linus Torvalds authored
      Pull thermal management fixes from Zhang Rui:
       "Specifics:
      
         - Fix a problem that Intel SoC DTS thermal driver does not work when
           CONFIG_THERMAL_INT340X is not set.
      
         - Fix a NULL pointer dereference when processor_thermal_device driver
           is loaded on a platform without ACPI support"
      
      * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        int340x_thermal/processor_thermal_device: return failure when
        ACPI/int340x_thermal: enumerate INT3401 for Intel SoC DTS thermal driver
        ACPI/int340x_thermal: enumerate INT340X devices even if they're not in _ART/_TRT
      4f7a42de