09 Jan, 2015

3 commits

  • On x86_64, at least, task_pt_regs may be only partially initialized
    in many contexts, so x86_64 should not use it without extra care
    from interrupt context, let alone NMI context.

    This will allow x86_64 to override the logic and will supply some
    scratch space to use to make a cleaner copy of user regs.

    Tested-by: Jiri Olsa
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Stephane Eranian
    Cc: chenggang.qcg@taobao.com
    Cc: Wu Fengguang
    Cc: Namhyung Kim
    Cc: Mike Galbraith
    Cc: Arjan van de Ven
    Cc: David Ahern
    Cc: Arnaldo Carvalho de Melo
    Cc: Catalin Marinas
    Cc: Jean Pihet
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Russell King
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/e431cd4c18c2e1c44c774f10758527fb2d1025c4.1420396372.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • Stephane reported that the PEBS fixup was broken by the recent commit to
    the instruction decoder. The thing had an off-by-one which resulted in
    not being able to decode the last instruction and always bail.

    Reported-by: Stephane Eranian
    Fixes: 6ba48ff46f76 ("x86: Remove arbitrary instruction size limit in instruction decoder")
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: stable@vger.kernel.org # 3.18
    Cc:
    Cc: Jiri Olsa
    Cc: Liang Kan
    Cc: Arnaldo Carvalho de Melo
    Cc: Dave Hansen
    Cc: Jim Keniston
    Cc: Linus Torvalds
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/20141216104614.GV3337@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    - Free callchains when hist entries are deleted, plugging a massive leak in
    'top -g', where hist_entries (and its callchains) are decayed over time. (Namhyung Kim)

    - Fix segfault when showing callchain in the hists browser (report & top) (Namhyung Kim)

    - Fix children sort key behavior, and also the 'perf test 32' test that
    was failing due to reliance on undefined behaviour (Namhyung Kim)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

08 Jan, 2015

4 commits

  • When perf report on TUI shows callchain it checks first node has
    siblings to determine whether it needs to print percentage value.

    But it missed a case that first node is NULL. So sometimes it segfaults
    like below:

    $ perf top -g
    perf: Segmentation fault
    -------- backtrace --------
    perf[0x4fcefb]
    /usr/lib/libc.so.6(+0x33b20)[0x7f2a35839b20]
    perf(rb_next+0x8)[0x47d3d8]
    perf[0x4f6058]
    perf[0x4f833b]
    perf[0x4f8610]
    perf[0x4f209e]
    perf(ui_browser__run+0x3a)[0x4f2e6a]
    perf[0x4f94ee]
    perf(perf_evlist__tui_browse_hists+0x94)[0x4fbbf4]
    perf[0x444d10]
    /usr/lib/libpthread.so.0(+0x7314)[0x7f2a37070314]
    /usr/lib/libc.so.6(clone+0x6d)[0x7f2a358ee5bd]

    $ addr2line -e `which perf` 0x4f6058
    /home/namhyung/project/linux/tools/perf/ui/browsers/hists.c:553

    I don't know why the backtrace didn't print some symbols..

    Signed-off-by: Namhyung Kim
    Fixes: 4087d11cd945 ("perf hists browser: Print overhead percent value for first-level callchain")
    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1419401076-21700-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Markus reported that "perf top -g" can leak ~300MB per second on his
    machine. This is partly because it missed to free callchains when hist
    entries are deleted. Fix it.

    Reported-by: Markus Trippelsdorf
    Signed-off-by: Namhyung Kim
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Markus Trippelsdorf
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20141230053813.GD6081@sejong
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • When perf report --children resorts output fields, it tries to put
    caller above the callee. But this was only meaningful for a same thread
    and doing this requires callchain enabled. So fix its check before
    comparing the callchain depth.

    This also changes the hist accumulation tests: In test 3, xmalloc in
    bash thread should be above than other perf threads due to alphabetical
    order of comm string. Also it's under page_fault in bash thread since
    alphabetical order of dso name. The sys_perf_event_open in perf thread
    is put on the last line since it's self overhead is 0.

    In test 4, the sys_perf_event_open is put above other perf entries that
    have same children overhead since its callchain depth is smaller.

    Signed-off-by: Namhyung Kim
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1419309381-2593-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    "
    - 'perf probe' should fall back to find probe point in symbols when failing
    to do so in a debuginfo file (Masami Hiramatsu)

    - Fix 'perf probe' crash in dwarf_getcfi_elf (Namhyung Kim)

    - Fix shell completion with 'perf list' --raw-dump option (Taesoo Kim)

    - Fix 'perf diff' to sort by baseline field by default (Namhyung Kim)
    "

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

03 Jan, 2015

2 commits

  • The currently perf diff didn't add the baseline and delta (or other
    compute) fields to the sort list so output will be sorted by other
    fields like alphabetical order of DSO or symbol as below example.

    Fix it by adding hpp formats for the fields and provides default compare
    functions.

    Before:

    $ perf diff
    # Event 'cycles'
    #
    # Baseline Delta Shared Object Symbol
    # ........ ....... .................. ...............................
    #
    [bridge] [k] ip_sabotage_in
    [btrfs] [k] __etree_search.constprop.47
    0.01% [btrfs] [k] btrfs_file_mmap
    0.01% -0.01% [btrfs] [k] btrfs_getattr
    [e1000e] [k] e1000_watchdog
    0.00% [kernel.vmlinux] [k] PageHuge
    0.00% [kernel.vmlinux] [k] __acct_update_integrals
    0.00% [kernel.vmlinux] [k] __activate_page
    [kernel.vmlinux] [k] __alloc_fd
    0.02% +0.02% [kernel.vmlinux] [k] __alloc_pages_nodemask
    ...

    After:

    # Baseline Delta Shared Object Symbol
    # ........ ....... .................. ................................
    #
    24.73% -4.62% perf [.] append_chain_children
    7.96% -1.29% perf [.] dso__find_symbol
    6.97% -2.07% libc-2.20.so [.] vfprintf
    4.61% +0.88% libc-2.20.so [.] __fprintf_chk
    4.41% +2.43% perf [.] sort__comm_cmp
    4.10% -0.16% perf [.] comm__str
    4.03% -0.93% perf [.] machine__findnew_thread_time
    3.82% +3.09% perf [.] __hists__add_entry
    2.95% -0.18% perf [.] sort__dso_cmp
    ...

    Signed-off-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1419656793-32756-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Currently, 'perf list --raw-dump' requires extra arguments
    (e.g., hw) to invoke, which breaks bash/zsh completion
    (perf-completion.sh).

    $ perf list --raw-dump
    Error: unknown option `raw-dump'

    usage: perf list [hw|sw|cache|tracepoint|pmu|event_glob]

    After,

    $ perf list --raw-dump
    cpu-cycles instructions cache-references cache-misses ...

    Signed-off-by: Taesoo Kim
    Acked-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Taesoo kim
    Link: http://lkml.kernel.org/r/1419997015-11071-1-git-send-email-tsgatesv@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Taesoo Kim
     

02 Jan, 2015

3 commits

  • David reported that perf can segfault when adding an uprobe event like
    this:

    $ perf probe -x /lib64/libc-2.14.90.so -a 'malloc size=%di'

    (gdb) bt
    #0 parse_eh_frame_hdr (hdr=0x0, hdr_size=2596, hdr_vaddr=71788,
    ehdr=0x7fffffffd390, eh_frame_vaddr=
    0x7fffffffd378, table_entries=0x8808d8, table_encoding=0x8808e0 "") at
    dwarf_getcfi_elf.c:79
    #1 0x000000385f81615a in getcfi_scn_eh_frame (hdr_vaddr=71788,
    hdr_scn=0x8839b0, shdr=0x7fffffffd2f0, scn=,
    ehdr=0x7fffffffd390, elf=0x882b30) at dwarf_getcfi_elf.c:231
    #2 getcfi_shdr (ehdr=0x7fffffffd390, elf=0x882b30) at dwarf_getcfi_elf.c:283
    #3 dwarf_getcfi_elf (elf=0x882b30) at dwarf_getcfi_elf.c:309
    #4 0x00000000004d5bac in debuginfo__find_probes (pf=0x7fffffffd4f0,
    dbg=Unhandled dwarf expression opcode 0xfa) at util/probe-finder.c:993
    #5 0x00000000004d634a in debuginfo__find_trace_events (dbg=0x880840,
    pev=, tevs=0x880f88, max_tevs=) at
    util/probe-finder.c:1200
    #6 0x00000000004aed6b in try_to_find_probe_trace_events (target=0x881b20
    "/lib64/libpthread-2.14.90.so",
    max_tevs=128, tevs=0x880f88, pev=0x859b30) at util/probe-event.c:482
    #7 convert_to_probe_trace_events (target=0x881b20
    "/lib64/libpthread-2.14.90.so", max_tevs=128, tevs=0x880f88,
    pev=0x859b30) at util/probe-event.c:2356
    #8 add_perf_probe_events (pevs=, npevs=1, max_tevs=128,
    target=0x881b20 "/lib64/libpthread-2.14.90.so", force_add=false) at
    util/probe-event.c:2391
    #9 0x000000000044014f in __cmd_probe (argc=,
    argv=0x7fffffffe2f0, prefix=Unhandled dwarf expression opcode 0xfa) at
    at builtin-probe.c:488
    #10 0x0000000000440313 in cmd_probe (argc=5, argv=0x7fffffffe2f0,
    prefix=) at builtin-probe.c:506
    #11 0x000000000041d133 in run_builtin (p=0x805680, argc=5,
    argv=0x7fffffffe2f0) at perf.c:341
    #12 0x000000000041c8b2 in handle_internal_command (argv=,
    argc=) at perf.c:400
    #13 run_argv (argv=, argcp=) at perf.c:444
    #14 main (argc=5, argv=0x7fffffffe2f0) at perf.c:559

    And I found a related commit (5704c8c4fa71 "getcfi_scn_eh_frame: Don't
    crash and burn when .eh_frame bits aren't there.") in elfutils that can
    lead to a unexpected crash like this. To safely use the function, it
    needs to check the .eh_frame section is a PROGBITS type.

    Reported-by: David Ahern
    Tested-by: David Ahern
    Signed-off-by: Namhyung Kim
    Acked-by: Masami Hiramatsu
    Cc: David Ahern
    Cc: Mark Wielaard
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/20141230090533.GH6081@sejong
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Fix to fall back to find a probe point in symbols if perf fails to find
    it in debuginfo.

    This can happen when the target function is an alias of another
    function. Such alias doesn't have an entry in debuginfo but in symbols.

    David Ahern reported this problem in https://lkml.org/lkml/2014/12/29/355

    I ensured the problem and deeper investigation discovers it.
    -----
    eu-readelf --debug-dump=info /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so | grep \"malloc\" -A6
    name (strp) "malloc"
    decl_file (data1) 25
    decl_line (data2) 466
    prototyped (flag_present)
    type (ref4) [ 81b5]
    declaration (flag_present)
    [ 8f58] formal_parameter
    --
    name (strp) "malloc"
    decl_file (data1) 23
    decl_line (data2) 466
    prototyped (flag_present)
    type (ref4) [ 9f4a]
    declaration (flag_present)
    sibling (ref4) [ bb29]
    ...
    -----
    All these entires have no instances (all of them are declarations)
    This is why the perf probe failed to find it in debuginfo.

    However, there are some malloc instances in symbols.
    -----
    eu-readelf --symbols /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so | grep malloc$
    1181: 0000000000080700 5332 FUNC LOCAL DEFAULT 12 _int_malloc
    4537: 00000000000831d0 339 FUNC LOCAL DEFAULT 12 __GI___libc_malloc
    5545: 00000000000831d0 339 FUNC LOCAL DEFAULT 12 __malloc
    6063: 00000000000831d0 339 FUNC GLOBAL DEFAULT 12 malloc
    7302: 00000000000831d0 339 FUNC GLOBAL DEFAULT 12 __libc_malloc
    -----
    As you an see, malloc and __libc_malloc have same address, and actually
    __libc_malloc has an entry in debuginfo. So you can set up a probe on
    __libc_malloc.

    To fix this problem shortly, perf probe simply falls back to find probe
    point(malloc) in symbols if it is not found in debuginfo.

    Reported-by: David Ahern
    Signed-off-by: Masami Hiramatsu
    Acked-by: Namhyung Kim
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: yrl.pp-manager.tt@hitachi.com
    Link: http://lkml.kernel.org/r/20141231062747.2087.80961.stgit@localhost.localdomain
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu
     
  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    User visible fixes:

    - Show progress bar in more places while doing histogram processing
    in the hists browser (Namhyung Kim)

    - Print backtrace symbols when segfault occurs in 'report' (Namhyung Kim)

    Infrastructure fixes:

    - Append callchains only when requested (Namhyung Kim)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

01 Jan, 2015

4 commits


31 Dec, 2014

8 commits

  • Follow aa0d53260596 ("ia64: Use preempt_schedule_irq") and use
    preempt_schedule_irq instead of enabling/disabling interrupts and
    messing around with PREEMPT_ACTIVE in the nios2 low-level preemption
    code ourselves. Also get rid of the now needless re-check for
    TIF_NEED_RESCHED, preempt_schedule_irq will already take care of
    rescheduling.

    This also fixes the following build error when building with
    CONFIG_PREEMPT:

    arch/nios2/kernel/built-in.o: In function `need_resched':
    arch/nios2/kernel/entry.S:374: undefined reference to `PREEMPT_ACTIVE'

    Cc: Thomas Gleixner
    Signed-off-by: Tobias Klauser
    Acked-by: Ley Foon Tan

    Tobias Klauser
     
  • This patch initializes the mmu field of the cpuinfo structure to the
    value supplied by the devicetree.

    Signed-off-by: Walter Goossens
    Acked-by: Ley Foon Tan

    Walter Goossens
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "A very small set of fixes for 3.19, as everyone was out.

    The clocksource patch was something I missed for the merge window
    after the change that broke arm64 was merged through arm-soc. The
    other two patches are a fix for an undetected merge problem in mvebu
    and a defconfig change to make some exynos boards work with the normal
    multi_v7_defconfig"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    Add USB_EHCI_EXYNOS to multi_v7_defconfig
    ARM: mvebu: Fix pinctrl configuration for Armada 370 DB
    clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64

    Linus Torvalds
     
  • Pull fbdev fixes from Tomi Valkeinen:

    - Fix regression with Nokia N900 display

    - Fix crash on fbdev using freed __initdata logos

    - Fix fb_deferred_io_fsync() return value.

    * tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
    OMAPDSS: SDI: fix output port_num
    video/fbdev: fix defio's fsync
    video/logo: prevent use of logos after they have been freed
    OMAPDSS: pll: NULL dereference in error handling
    OMAPDSS: HDMI: remove double initializer entries

    Linus Torvalds
     
  • Pull input layer fixes from Dmitry Torokhov:
    "Fixes for v7 protocol for ALPS devices and few other driver fixes.

    Also users can request input events to be stamped with boot time
    timestamps, in addition to real and monotonic timestamps"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: hil_kbd - fix incorrect use of init_completion
    Input: alps - v7: document the v7 touchpad packet protocol
    Input: alps - v7: fix finger counting for > 2 fingers on clickpads
    Input: alps - v7: sometimes a single touch is reported in mt[1]
    Input: alps - v7: ignore new packets
    Input: evdev - add CLOCK_BOOTTIME support
    Input: psmouse - expose drift duration for IBM trackpoints
    Input: stmpe - bias keypad columns properly
    Input: stmpe - enforce device tree only mode
    mfd: stmpe: add pull up/down register offsets for STMPE
    Input: optimize events_per_packet count calculation
    Input: edt-ft5x06 - fixed a macro coding style issue
    Input: gpio_keys - replace timer and workqueue with delayed workqueue
    Input: gpio_keys - allow separating gpio and irq in device tree

    Linus Torvalds
     
  • This reverts commit 24a0aa212ee2dbe44360288684478d76a8e20a0a.

    It's causing severe userspace breakage. Namely, all the utilities from
    wireless-utils which are relying on CONFIG_WEXT (which means tools like
    'iwconfig', 'iwlist', etc) are not working anymore. There is a 'iw'
    utility in newer wireless-tools, which is supposed to be a replacement
    for all the "deprecated" binaries, but it's far away from being
    massively adopted.

    Please see [1] for example of the userspace breakage this is causing.

    In addition to that, Larry Finger reports [2] that this patch is also
    causing ipw2200 driver being impossible to build.

    To me this clearly shows that CONFIG_WEXT is far, far away from being
    "deprecated enough" to be removed.

    [1] http://thread.gmane.org/gmane.linux.kernel/1857010
    [2] http://thread.gmane.org/gmane.linux.network/343688

    Signed-off-by: Jiri Kosina
    Signed-off-by: Linus Torvalds

    Jiri Kosina
     
  • Pull networking fixes from David Miller:

    1) Fix double SKB free in bluetooth 6lowpan layer, from Jukka Rissanen.

    2) Fix receive checksum handling in enic driver, from Govindarajulu
    Varadarajan.

    3) Fix NAPI poll list corruption in virtio_net and caif_virtio, from
    Herbert Xu. Also, add code to detect drivers that have this mistake
    in the future.

    4) Fix doorbell endianness handling in mlx4 driver, from Amir Vadai.

    5) Don't clobber IP6CB() before xfrm6_policy_check() is called in TCP
    input path,f rom Nicolas Dichtel.

    6) Fix MPLS action validation in openvswitch, from Pravin B Shelar.

    7) Fix double SKB free in vxlan driver, also from Pravin.

    8) When we scrub a packet, which happens when we are switching the
    context of the packet (namespace, etc.), we should reset the
    secmark. From Thomas Graf.

    9) ->ndo_gso_check() needs to do more than return true/false, it also
    has to allow the driver to clear netdev feature bits in order for
    the caller to be able to proceed properly. From Jesse Gross.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits)
    genetlink: A genl_bind() to an out-of-range multicast group should not WARN().
    netlink/genetlink: pass network namespace to bind/unbind
    ne2k-pci: Add pci_disable_device in error handling
    bonding: change error message to debug message in __bond_release_one()
    genetlink: pass multicast bind/unbind to families
    netlink: call unbind when releasing socket
    netlink: update listeners directly when removing socket
    genetlink: pass only network namespace to genl_has_listeners()
    netlink: rename netlink_unbind() to netlink_undo_bind()
    net: Generalize ndo_gso_check to ndo_features_check
    net: incorrect use of init_completion fixup
    neigh: remove next ptr from struct neigh_table
    net: xilinx: Remove unnecessary temac_property in the driver
    net: phy: micrel: use generic config_init for KSZ8021/KSZ8031
    net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding
    openvswitch: fix odd_ptr_err.cocci warnings
    Bluetooth: Fix accepting connections when not using mgmt
    Bluetooth: Fix controller configuration with HCI_QUIRK_INVALID_BDADDR
    brcmfmac: Do not crash if platform data is not populated
    ipw2200: select CFG80211_WEXT
    ...

    Linus Torvalds
     
  • …nel/git/shuah/linux-kselftest

    Pull kselftest fix from Shuah Khan:
    "Fix exec test compile warnings"

    * tag 'linux-kselftest-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    selftests/exec: Use %zu to format size_t

    Linus Torvalds
     

30 Dec, 2014

16 commits

  • Currently we enable Exynos devices in the multi v7 defconfig, however, when
    testing on my ODROID-U3, I noticed that USB was not working. Enabling this
    option causes USB to work, which enables networking support as well since the
    ODROID-U3 has networking on the USB bus.

    [arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
    backport this fix at least that far.

    Signed-off-by: Steev Klimaszewski
    Cc: stable@vger.kernel.org # 3.10
    Signed-off-by: Arnd Bergmann

    Steev Klimaszewski
     
  • Pull "Fixes for 3.19" from Andrew Lunn:

    Jason is taking a back seat this cycle and i'm doing all the patch
    wrangling for mvebu.

    * tag 'mvebu-fixes-3.19' of git://git.infradead.org/linux-mvebu:
    ARM: mvebu: Fix pinctrl configuration for Armada 370 DB

    Also update to Linux 3.19-rc1, which this was based on.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • Unfortunately, while commit 4a928436 ("audit: correctly record file
    names with different path name types") fixed a problem where we were
    not recording filenames, it created a new problem by attempting to use
    these file names after they had been freed. This patch resolves the
    issue by creating a copy of the filename which the audit subsystem
    frees after it is done with the string.

    At some point it would be nice to resolve this issue with refcounts,
    or something similar, instead of having to allocate/copy strings, but
    that is almost surely beyond the scope of a -rcX patch so we'll defer
    that for later. On the plus side, only audit users should be impacted
    by the string copying.

    Reported-by: Toralf Foerster
    Signed-off-by: Paul Moore

    Paul Moore
     
  • After the commit ef691ff48bc8 (OMAPDSS: DT: Get source endpoint by
    matching reg-id) we look for the SDI output using the port number.
    However, the SDI driver doesn't set the port number, which causes the
    SDI display to not initialize.

    Fix this by setting the SDI port number to 1. We use a hardcoded value,
    as SDI was used only on OMAP3 and it's always port number 1 there.

    Reported-by: Aaro Koskinen
    Reported-by: Pavel Machek
    Signed-off-by: Tomi Valkeinen

    Tomi Valkeinen
     
  • fb_deferred_io_fsync() returns the value of schedule_delayed_work() as
    an error code, but schedule_delayed_work() does not return an error. It
    returns true/false depending on whether the work was already queued.

    Fix this by ignoring the return value of schedule_delayed_work().

    Signed-off-by: Tomi Valkeinen
    Cc: stable@vger.kernel.org

    Tomi Valkeinen
     
  • Pull CIFS fixes from Steve French:
    "A set of three minor cifs fixes"

    * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: make new inode cache when file type is different
    Fix signed/unsigned pointer warning
    Convert MessageID in smb2_hdr to LE

    Linus Torvalds
     
  • Pull UDF & isofs fixes from Jan Kara:
    "A couple of UDF fixes of handling of corrupted media and one iso9660
    fix of the same"

    * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    udf: Reduce repeated dereferences
    udf: Check component length before reading it
    udf: Check path length when reading symlink
    udf: Verify symlink size before loading it
    udf: Verify i_size when loading inode
    isofs: Fix unchecked printing of ER records

    Linus Torvalds
     
  • Pull power management and ACPI material from Rafael J Wysocki:
    "These are fixes (operating performance points library, cpufreq-dt
    driver, cpufreq core, ACPI backlight, cpupower tool), cleanups
    (cpuidle), new processor IDs for the RAPL (Running Average Power
    Limit) power capping driver, and a modification of the generic power
    domains framework allowing modular drivers to call one of its helper
    functions.

    Specifics:

    - Fix for a potential NULL pointer dereference in the cpufreq core
    due to an initialization race condition (Ethan Zhao).

    - Fixes for abuse of the OPP (Operating Performance Points) API
    related to RCU and other minor issues in the OPP library and the
    cpufreq-dt driver (Dmitry Torokhov).

    - cpuidle governors cleanup making them measure idle duration in a
    better way without using the CPUIDLE_FLAG_TIME_INVALID flag which
    allows that flag to be dropped from the ACPI cpuidle driver and
    from the core too (Len Brown).

    - New ACPI backlight blacklist entries for Samsung machines without a
    working native backlight interface that need to use the ACPI
    backlight instead (Aaron Lu).

    - New CPU IDs of future Intel Xeon CPUs for the Intel RAPL power
    capping driver (Jacob Pan).

    - Generic power domains framework modification to export the
    of_genpd_get_from_provider() function to modular drivers that will
    allow future driver modifications to be based on the mainline (Amit
    Daniel Kachhap).

    - Two fixes for the cpupower tool (Michal Privoznik, Prarit
    Bhargava)"

    * tag 'pm+acpi-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / video: Add some Samsung models to disable_native_backlight list
    tools / cpupower: Fix no idle state information return value
    tools / cpupower: Correctly detect if running as root
    cpufreq: fix a NULL pointer dereference in __cpufreq_governor()
    cpufreq-dt: defer probing if OPP table is not ready
    PM / OPP: take RCU lock in dev_pm_opp_get_opp_count
    PM / OPP: fix warning in of_free_opp_table()
    PM / OPP: add some lockdep annotations
    powercap / RAPL: add IDs for future Xeon CPUs
    PM / Domains: Export of_genpd_get_from_provider function
    cpuidle / ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID
    cpuidle: ladder: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID
    cpuidle: menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID

    Linus Torvalds
     
  • Users can request to bind to arbitrary multicast groups, so warning
    when the requested group number is out of range is not appropriate.

    And with the warning removed, and the 'err' variable properly given
    an initial value, we can remove 'found' altogether.

    Reported-by: Sedat Dilek
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull spi fixes from Mark Brown:
    "A few driver specific fixes here, the DMA burst size increase in the
    spfi driver is a fix to make the hardware happier in some situations"

    * tag 'spi-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi: img-spfi: Increase DMA burst size
    spi: img-spfi: Enable controller before starting TX DMA
    spi: sh-msiof: Add runtime PM lock in initializing

    Linus Torvalds
     
  • Pull one regulator fix from Mark Brown:
    "One fix here, a fix for the voltage mapping on one of the s2mps11
    regulators which broke systems using it including apparently the
    Gear 2 smartwatches"

    * tag 'regulator-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: s2mps11: Fix dw_mmc failure on Gear 2

    Linus Torvalds
     
  • Pull one MMC fix from Ulf Hansson:
    "MMC core:

    - Fix selection of buswidth for mmc hosts supporting 1-bit only"

    * tag 'mmc-v3.19-2' of git://git.linaro.org/people/ulf.hansson/mmc:
    mmc: core: stop trying to switch width when only one bit is supported

    Linus Torvalds
     
  • Pull thermal management updates from Zhang Rui:
    "First of all, the most important change is the thermal cpu cooling
    fixes. The major fix here is to have proper sequencing between
    cpufreq layer and thermal cpu cooling registration. A take away of
    this fix is an improvement in the thermal drivers code. Thermal
    drivers that require cpu cooling do not need to check for cpufreq
    layer. The requirement now is to propagate the error code, if any,
    while registering cpu cooling device. Thanks to Viresh for
    implementing the required CPUfreq changes.

    Second, a new driver is introduced for int340x processor thermal
    device. Given that int340x thermal is disabled by default, and this
    processor thermal device is only available on limited platforms, plus
    the driver does nothing but exposes some thermal limitation
    information for user space to use, thus I think it is safe to include
    it in this pull request after missing 3.19-rc2.

    Specifics:

    - Thermal cpu cooling fixes and cleanups.

    - introduce INT340X processor thermal reporting device driver.

    - several small fixes and cleanups for int340x thermal drivers"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (43 commits)
    Thermal/int340x/int3403: Free acpi notification handler
    Thermal/int340x/processor_thermal: Fix memory leak
    Thermal/int340x/int3403: Fix memory leak
    thermal: int340x: Introduce processor reporting device
    thermal: int340x_thermal: drop owner assignment from platform_drivers
    thermal: drop owner assignment from platform_drivers
    thermal: cpu_cooling: document node in struct cpufreq_cooling_device
    thermal/powerclamp: add ids for future xeon cpus
    Thermal/int340x: Handle properly the case when _trt or _art acpi entry is missing
    thermal: cpu_cooling: return ERR_PTR() for !CPU_THERMAL or !THERMAL_OF
    thermal: cpu_cooling: small memory leak on error
    thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case
    thermal: db8500: Do not print error message in the EPROBE_DEFER case
    thermal: imx: Do not print error message in the EPROBE_DEFER case
    thermal: Fix cdev registration with THERMAL_NO_LIMIT on 64bit
    drivers: thermal: Remove ARCH_HAS_BANDGAP dependency for samsung
    thermal:core:fix: Check return code of the ->get_max_state() callback
    thermal: cpu_cooling: update copyright tags
    thermal: cpu_cooling: Use cpufreq_dev->freq_table for finding level/freq
    thermal: cpu_cooling: Store frequencies in descending order
    ...

    Linus Torvalds
     
  • Commit 2457aec63745 ("mm: non-atomically mark page accessed during page
    cache allocation where possible") has added a separate parameter for
    specifying gfp mask for radix tree allocations.

    Not only this is less than optimal from the API point of view because it
    is error prone, it is also buggy currently because
    grab_cache_page_write_begin is using GFP_KERNEL for radix tree and if
    fgp_flags doesn't contain FGP_NOFS (mostly controlled by fs by
    AOP_FLAG_NOFS flag) but the mapping_gfp_mask has __GFP_FS cleared then
    the radix tree allocation wouldn't obey the restriction and might
    recurse into filesystem and cause deadlocks. This is the case for most
    filesystems unfortunately because only ext4 and gfs2 are using
    AOP_FLAG_NOFS.

    Let's simply remove radix_gfp_mask parameter because the allocation
    context is same for both page cache and for the radix tree. Just make
    sure that the radix tree gets only the sane subset of the mask (e.g. do
    not pass __GFP_WRITE).

    Long term it is more preferable to convert remaining users of
    AOP_FLAG_NOFS to use mapping_gfp_mask instead and simplify this
    interface even further.

    Reported-by: Dave Chinner
    Signed-off-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • * acpi-video:
    ACPI / video: Add some Samsung models to disable_native_backlight list

    Rafael J. Wysocki
     
  • * pm-domains:
    PM / Domains: Export of_genpd_get_from_provider function

    * powercap:
    powercap / RAPL: add IDs for future Xeon CPUs

    * pm-tools:
    tools / cpupower: Fix no idle state information return value
    tools / cpupower: Correctly detect if running as root

    Rafael J. Wysocki