1. 16 Jan, 2015 15 commits
    • Louis Langholtz's avatar
      kernel: avoid overflow in cmp_range · fc7f0dd3
      Louis Langholtz authored
      Avoid overflow possibility.
      
      [ The overflow is purely theoretical, since this is used for memory
        ranges that aren't even close to using the full 64 bits, but this is
        the right thing to do regardless.  - Linus ]
      Signed-off-by: default avatarLouis Langholtz <lou_langholtz@me.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Peter Anvin <hpa@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc7f0dd3
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 7ad4b4ae
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are three small driver fixes for reported issues for 3.19-rc5.
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'char-misc-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mcb: mcb-pci: Only remap the 1st 0x200 bytes of BAR 0
        mei: add ABI documentation for fw_status exported through sysfs
        mei: clean reset bit before reset
      7ad4b4ae
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.19-rc5' of... · 62b15300
      Linus Torvalds authored
      Merge tag 'driver-core-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fix from Greg KH:
       "Here is one kernfs fix for a reported issue for 3.19-rc5.
      
        It has been in linux-next for a while"
      
      * tag 'driver-core-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        kernfs: Fix kernfs_name_compare
      62b15300
    • Linus Torvalds's avatar
      Merge tag 'tty-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 7b78de8c
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some tty and serial driver fixes for 3.19-rc5 that resolve
        some reported issues, and add a new device id to the 8250 serial port
        driver.
      
        All have been in linux-next with no reported problems"
      
      * tag 'tty-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: samsung: Add the support for Exynos5433 SoC
        Revert "tty: Fix pty master poll() after slave closes v2"
        tty: Prevent hw state corruption in exclusive mode reopen
        tty: Add support for the WCH384 4S multi-IO card
        serial: fix parisc boot hang
      7b78de8c
    • Linus Torvalds's avatar
      Merge tag 'staging-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 937102fe
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are 6 staging driver fixes for 3.19-rc5.
      
        They fix some reported issues with some IIO drivers, as well as some
        issues with the vt6655 wireless driver.
      
        All have been in linux-next for a while"
      
      * tag 'staging-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: vt6655: fix sparse warning: argument type
        staging: vt6655: Fix loss of distant/weak access points on channel change.
        staging: vt6655: vnt_tx_packet Fix corrupted tx packets.
        staging: vt6655: fix sparse warnings: incorrect argument type
        iio: iio: Fix iio_channel_read return if channel havn't info
        iio: ad799x: Fix ad7991/ad7995/ad7999 config setup
      937102fe
    • Linus Torvalds's avatar
      Merge tag 'usb-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 79600d4b
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here is a bunch of USB fixes for 3.19-rc5.
      
        Most of these are gadget driver fixes, along with the xhci driver fix
        that we both reported having problems with, as well as some new device
        ids and other tiny fixes.
      
        All have been in linux-next with no problems"
      
      * tag 'usb-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
        usb: dwc3: gadget: Stop TRB preparation after limit is reached
        usb: dwc3: gadget: Fix TRB preparation during SG
        usb: phy: mv-usb: fix usb_phy build errors
        usb: serial: handle -ENODEV quietly in generic_submit_read_urb
        usb: serial: silence all non-critical read errors
        USB: console: fix potential use after free
        USB: console: fix uninitialised ldisc semaphore
        usb: gadget: udc: atmel: fix possible oops when unloading module
        usb: gadget: gadgetfs: fix an oops in ep_write()
        usb: phy: Fix deferred probing
        OHCI: add a quirk for ULi M5237 blocking on reset
        uas: Add US_FL_NO_ATA_1X for 2 more Seagate disk enclosures
        uas: Do not blacklist ASM1153 disk enclosures
        usb: gadget: udc: avoid dereference before NULL check in ep_queue
        usb: host: ehci-tegra: request deferred probe when failing to get phy
        uas: disable UAS on Apricorn SATA dongles
        uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS566 with usb-id 0bc2:a013
        uas: Add US_FL_NO_ATA_1X for Seagate devices with usb-id 0bc2:a013
        xhci: Add broken-streams quirk for Fresco Logic FL1000G xhci controllers
        USB: EHCI: adjust error return code
        ...
      79600d4b
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · fa818dc4
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       - Wire up compat_sys_execveat for compat (AArch32) tasks
       - Revert 421520ba, as this breaks our side of the boot protocol
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: partially revert "ARM: 8167/1: extend the reserved memory for initrd to be page aligned"
        arm64: compat: wire up compat_sys_execveat
      fa818dc4
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.19-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · a2a32cd1
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
         - Stable fix for a NFSv3/lockd race
         - Fixes for several NFSv4.1 client id trunking bugs
         - Remove an incorrect test when checking for delegated opens"
      
      * tag 'nfs-for-3.19-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Remove incorrect check in can_open_delegated()
        NFS: Ignore transport protocol when detecting server trunking
        NFSv4/v4.1: Verify the client owner id during trunking detection
        NFSv4: Cache the NFSv4/v4.1 client owner_id in the struct nfs_client
        NFSv4.1: Fix client id trunking on Linux
        LOCKD: Fix a race when initialising nlmsvc_timeout
      a2a32cd1
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.19-rc3' of... · 23aa4b41
      Linus Torvalds authored
      Merge tag 'trace-fixes-v3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull ftrace fixes from Steven Rostedt:
       "This holds a few fixes to the ftrace infrastructure as well as the
        mixture of function graph tracing and kprobes.
      
        When jprobes and function graph tracing is enabled at the same time it
        will crash the system:
      
            # modprobe jprobe_example
            # echo function_graph > /sys/kernel/debug/tracing/current_tracer
      
        After the first fork (jprobe_example probes it), the system will
        crash.
      
        This is due to the way jprobes copies the stack frame and does not do
        a normal function return.  This messes up with the function graph
        tracing accounting which hijacks the return address from the stack and
        replaces it with a hook function.  It saves the return addresses in a
        separate stack to put back the correct return address when done.  But
        because the jprobe functions do not do a normal return, their stack
        addresses are not put back until the function they probe is called,
        which means that the probed function will get the return address of
        the jprobe handler instead of its own.
      
        The simple fix here was to disable function graph tracing while the
        jprobe handler is being called.
      
        While debugging this I found two minor bugs with the function graph
        tracing.
      
        The first was about the function graph tracer sharing its function
        hash with the function tracer (they both get filtered by the same
        input).  The changing of the set_ftrace_filter would not sync the
        function recording records after a change if the function tracer was
        disabled but the function graph tracer was enabled.  This was due to
        the update only checking one of the ops instead of the shared ops to
        see if they were enabled and should perform the sync.  This caused the
        ftrace accounting to break and a ftrace_bug() would be triggered,
        disabling ftrace until a reboot.
      
        The second was that the check to update records only checked one of
        the filter hashes.  It needs to test both the "filter" and "notrace"
        hashes.  The "filter" hash determines what functions to trace where as
        the "notrace" hash determines what functions not to trace (trace all
        but these).  Both hashes need to be passed to the update code to find
        out what change is being done during the update.  This also broke the
        ftrace record accounting and triggered a ftrace_bug().
      
        This patch set also include two more fixes that were reported
        separately from the kprobe issue.
      
        One was that init_ftrace_syscalls() was called twice at boot up.  This
        is not a major bug, but that call performed a rather large kmalloc
        (NR_syscalls * sizeof(*syscalls_metadata)).  The second call made the
        first one a memory leak, and wastes memory.
      
        The other fix is a regression caused by an update in the v3.19 merge
        window.  The moving to enable events early, moved the enabling before
        PID 1 was created.  The syscall events require setting the
        TIF_SYSCALL_TRACEPOINT for all tasks.  But for_each_process_thread()
        does not include the swapper task (PID 0), and ended up being a nop.
      
        A suggested fix was to add the init_task() to have its flag set, but I
        didn't really want to mess with PID 0 for this minor bug.  Instead I
        disable and re-enable events again at early_initcall() where it use to
        be enabled.  This also handles any other event that might have its own
        reg function that could break at early boot up"
      
      * tag 'trace-fixes-v3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix enabling of syscall events on the command line
        tracing: Remove extra call to init_ftrace_syscalls()
        ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing
        ftrace: Check both notrace and filter for old hash
        ftrace: Fix updating of filters for shared global_ops filters
      23aa4b41
    • Catalin Marinas's avatar
      arm64: partially revert "ARM: 8167/1: extend the reserved memory for initrd to be page aligned" · 0145058c
      Catalin Marinas authored
      This patch partially reverts commit 421520ba
      (only the arm64 part). There is no guarantee that the boot-loader places other
      images like dtb in a different page than initrd start/end, especially when the
      kernel is built with 64KB pages. When this happens, such pages must not be
      freed. The free_reserved_area() already takes care of rounding up "start" and
      rounding down "end" to avoid freeing partially used pages.
      
      Cc: <stable@vger.kernel.org> # 3.17+
      Reported-by: default avatarPeter Maydell <Peter.Maydell@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      0145058c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · cb596708
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "This fixes a regression in the latest fuse update plus a fix for a
        rather theoretical memory ordering issue"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: add memory barrier to INIT
        fuse: fix LOOKUP vs INIT compat handling
      cb596708
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux · 0b6212e0
      Linus Torvalds authored
      Pull fbdev fixes from Tomi Valkeinen:
       - broadsheetfb: fix memory leak
       - simplefb: fix build failure on sparc
      
      * tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
        fbdev/broadsheetfb: fix memory leak
        simplefb: Fix build failure on Sparc
      0b6212e0
    • Linus Torvalds's avatar
      Merge tag 'mmc-v3.19-4' of git://git.linaro.org/people/ulf.hansson/mmc · 7b552bc1
      Linus Torvalds authored
      Pull MMC bugfix from Ulf Hansson:
       "Fix sdhci regulator regression for Qualcomm and Nvidia boards"
      
      * tag 'mmc-v3.19-4' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: sdhci: Set SDHCI_POWER_ON with external vmmc
      7b552bc1
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · f8cb3954
      Linus Torvalds authored
      Pull m68k fixlet from Geert Uytterhoeven.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Wire up execveat
      f8cb3954
    • Linus Torvalds's avatar
      Merge tag 'powerpc-3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux · 3fa116e8
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A few powerpc fixes"
      
      * tag 'powerpc-3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
        powerpc: Work around gcc bug in current_thread_info()
        cxl: Fix issues when unmapping contexts
        powernv: Fix OPAL tracepoint code
      3fa116e8
  2. 15 Jan, 2015 7 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix enabling of syscall events on the command line · ce1039bd
      Steven Rostedt (Red Hat) authored
      Commit 5f893b26 "tracing: Move enabling tracepoints to just after
      rcu_init()" broke the enabling of system call events from the command
      line. The reason was that the enabling of command line trace events
      was moved before PID 1 started, and the syscall tracepoints require
      that all tasks have the TIF_SYSCALL_TRACEPOINT flag set. But the
      swapper task (pid 0) is not part of that. Since the swapper task is the
      only task that is running at this early in boot, no task gets the
      flag set, and the tracepoint never gets reached.
      
      Instead of setting the swapper task flag (there should be no reason to
      do that), re-enabled trace events again after the init thread (PID 1)
      has been started. It requires disabling all command line events and
      re-enabling them, as just enabling them again will not reset the logic
      to set the TIF_SYSCALL_TRACEPOINT flag, as the syscall tracepoint will
      be fooled into thinking that it was already set, and wont try setting
      it again. For this reason, we must first disable it and re-enable it.
      
      Link: http://lkml.kernel.org/r/1421188517-18312-1-git-send-email-mpe@ellerman.id.au
      Link: http://lkml.kernel.org/r/20150115040506.216066449@goodmis.orgReported-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ce1039bd
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Remove extra call to init_ftrace_syscalls() · 83829b74
      Steven Rostedt (Red Hat) authored
      trace_init() calls init_ftrace_syscalls() and then calls trace_event_init()
      which also calls init_ftrace_syscalls(). It makes more sense to only
      call it from trace_event_init().
      
      Calling it twice wastes memory, as it allocates the syscall events twice,
      and loses the first copy of it.
      
      Link: http://lkml.kernel.org/r/54AF53BD.5070303@huawei.com
      Link: http://lkml.kernel.org/r/20150115040505.930398632@goodmis.orgReported-by: default avatarWang Nan <wangnan0@huawei.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      83829b74
    • Steven Rostedt (Red Hat)'s avatar
      ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing · 237d28db
      Steven Rostedt (Red Hat) authored
      If the function graph tracer traces a jprobe callback, the system will
      crash. This can easily be demonstrated by compiling the jprobe
      sample module that is in the kernel tree, loading it and running the
      function graph tracer.
      
       # modprobe jprobe_example.ko
       # echo function_graph > /sys/kernel/debug/tracing/current_tracer
       # ls
      
      The first two commands end up in a nice crash after the first fork.
      (do_fork has a jprobe attached to it, so "ls" just triggers that fork)
      
      The problem is caused by the jprobe_return() that all jprobe callbacks
      must end with. The way jprobes works is that the function a jprobe
      is attached to has a breakpoint placed at the start of it (or it uses
      ftrace if fentry is supported). The breakpoint handler (or ftrace callback)
      will copy the stack frame and change the ip address to return to the
      jprobe handler instead of the function. The jprobe handler must end
      with jprobe_return() which swaps the stack and does an int3 (breakpoint).
      This breakpoint handler will then put back the saved stack frame,
      simulate the instruction at the beginning of the function it added
      a breakpoint to, and then continue on.
      
      For function tracing to work, it hijakes the return address from the
      stack frame, and replaces it with a hook function that will trace
      the end of the call. This hook function will restore the return
      address of the function call.
      
      If the function tracer traces the jprobe handler, the hook function
      for that handler will not be called, and its saved return address
      will be used for the next function. This will result in a kernel crash.
      
      To solve this, pause function tracing before the jprobe handler is called
      and unpause it before it returns back to the function it probed.
      
      Some other updates:
      
      Used a variable "saved_sp" to hold kcb->jprobe_saved_sp. This makes the
      code look a bit cleaner and easier to understand (various tries to fix
      this bug required this change).
      
      Note, if fentry is being used, jprobes will change the ip address before
      the function graph tracer runs and it will not be able to trace the
      function that the jprobe is probing.
      
      Link: http://lkml.kernel.org/r/20150114154329.552437962@goodmis.org
      
      Cc: stable@vger.kernel.org # 2.6.30+
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      237d28db
    • Steven Rostedt (Red Hat)'s avatar
      ftrace: Check both notrace and filter for old hash · 7485058e
      Steven Rostedt (Red Hat) authored
      Using just the filter for checking for trampolines or regs is not enough
      when updating the code against the records that represent all functions.
      Both the filter hash and the notrace hash need to be checked.
      
      To trigger this bug (using trace-cmd and perf):
      
       # perf probe -a do_fork
       # trace-cmd start -B foo -e probe
       # trace-cmd record -p function_graph -n do_fork sleep 1
      
      The trace-cmd record at the end clears the filter before it disables
      function_graph tracing and then that causes the accounting of the
      ftrace function records to become incorrect and causes ftrace to bug.
      
      Link: http://lkml.kernel.org/r/20150114154329.358378039@goodmis.org
      
      Cc: stable@vger.kernel.org
      [ still need to switch old_hash_ops to old_ops_hash ]
      Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      7485058e
    • Steven Rostedt (Red Hat)'s avatar
      ftrace: Fix updating of filters for shared global_ops filters · 8f86f837
      Steven Rostedt (Red Hat) authored
      As the set_ftrace_filter affects both the function tracer as well as the
      function graph tracer, the ops that represent each have a shared
      ftrace_ops_hash structure. This allows both to be updated when the filter
      files are updated.
      
      But if function graph is enabled and the global_ops (function tracing) ops
      is not, then it is possible that the filter could be changed without the
      update happening for the function graph ops. This will cause the changes
      to not take place and may even cause a ftrace_bug to occur as it could mess
      with the trampoline accounting.
      
      The solution is to check if the ops uses the shared global_ops filter and
      if the ops itself is not enabled, to check if there's another ops that is
      enabled and also shares the global_ops filter. In that case, the
      modification still needs to be executed.
      
      Link: http://lkml.kernel.org/r/20150114154329.055980438@goodmis.org
      
      Cc: stable@vger.kernel.org # 3.17+
      Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      8f86f837
    • Linus Torvalds's avatar
      Merge branch 'thermal-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · f800c25b
      Linus Torvalds authored
      Pull thermal fixes from Zhang Rui:
       "Specifics:
      
         - bogus type qualifier fix in OF thermal code.
         - Minor fixes on imx and rcar thermal drivers.
         - Update TI SoC thermal maintainer entry.
         - Updated documentation of OF cpufreq cooling register"
      
      * 'thermal-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal: rcar: Spelling/grammar: s/drier use .../driver uses ...s/
        thermal: rcar: change type of ctemp in rcar_thermal_update_temp()
        thermal: rcar: fix ENR register value
        Documentation: thermal: document of_cpufreq_cooling_register()
        Thermal: imx: add clk disable/enable for suspend/resume
        MAINTAINERS: update ti-soc-thermal status
        MAINTAINERS: Add linux-omap to list of reviewers for TI Thermal
        thermal: of: Remove bogus type qualifier for of_thermal_get_trip_points()
      f800c25b
    • Greg Kroah-Hartman's avatar
      Merge tag 'fixes-for-v3.19-rc6' of... · f8359dae
      Greg Kroah-Hartman authored
      Merge tag 'fixes-for-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      Felipe writes:
      
      usb: fixes for v3.19-rc6
      
      The final set of fixes for v3.19. Two of the fixes are
      related to dwc3 scatter/gather implementation when we have
      more requests queued than available TRBs, while the other
      is a build fix for mv-usb PHY.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      f8359dae
  3. 14 Jan, 2015 18 commits