1. 23 Sep, 2017 3 commits
  2. 22 Sep, 2017 14 commits
  3. 21 Sep, 2017 14 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.14' of... · 4a704d6d
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
       "Here are some early Kbuild fixes.
      
        The in-kernel firmware was removed during the previous merge window.
        Since then, some bug reports of broken rpm building are flying in ML.
        We need to fix it now.
      
        Summary:
      
         - remove firmware install from rpm-pkg / deb-pkg
      
         - fix mismatch between release number and UTS_VERSION for rpm-pkg"
      
      * tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: rpm-pkg: fix version number handling
        kbuild: deb-pkg: remove firmware package support
        kbuild: rpm-pkg: delete firmware_install to fix build error
      4a704d6d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 449cd5d2
      Linus Torvalds authored
      Pull misc fixes from Al Viro:
       "A couple of regression fixes, one for this merge window, one for the
        previous cycle"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user
        iov_iter: fix page_copy_sane for compound pages
      449cd5d2
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-4.14-rc2' of git://git.infradead.org/linux-mtd · d9fde269
      Linus Torvalds authored
      Pull mtd fixes from Boris Brezillon:
       "SPI NOR:
         - Fix the SFDP parsing code (bugs reported by Geert Uytterhoeven)
      
        NAND:
         - Fix a resource leak in the lpc32xx_mlc driver
         - Fix a build warning in the core"
      
      * tag 'mtd/fixes-for-4.14-rc2' of git://git.infradead.org/linux-mtd:
        mtd: nand: remove unused blockmask variable
        mtd: nand: lpc32xx_mlc: Fix an error handling path in lpc32xx_nand_probe()
        mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()
        mtd: spi-nor: Check consistency of the memory size extracted from the SFDP
      d9fde269
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux · b6e78a6f
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "amdkfd, i915 and exynos fixes.
      
        I've ended up on unplanned + planned leave this week, but there were
        some fixes I decided to dequeue, some amdkfd bits missed the next pull
        but they are pretty trivial, so I included them.
      
        I'm not sure I'll see much else for rc2, lots of people are at XDC"
      
      * tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux:
        drm/exynos/hdmi: Fix unsafe list iteration
        drm: exynos: include linux/irq.h
        drm/exynos: Fix suspend/resume support
        drm/exynos: Fix locking in the suspend/resume paths
        drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos()
        drm/i915/cnp: set min brightness from VBT
        Revert "drm/i915/bxt: Disable device ready before shutdown command"
        drm/i915/bxt: set min brightness from VBT
        drm/i915: Fix an error handling in 'intel_framebuffer_init()'
        drm/i915/gvt: Fix incorrect PCI BARs reporting
        drm/amdkfd: pass queue's mqd when destroying mqd
        drm/amdkfd: remove memset before memcpy
        uapi linux/kfd_ioctl.h: only use __u32 and __u64
      b6e78a6f
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping · 20c29a97
      Linus Torvalds authored
      Pull dma mapping fix from Christoph Hellwig:
       "A fix for a fix that went in this merge window from Arnd"
      
      * tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping:
        dma-coherent: fix rmem_dma_device_init regression
      20c29a97
    • Manuel Lauss's avatar
      MIPS: PCI: fix pcibios_map_irq section mismatch · 8eba3651
      Manuel Lauss authored
      Drop  the __init from pcibios_map_irq() to make this section mis-
      match go away:
      
      WARNING: vmlinux.o(.text+0x56acd4): Section mismatch in reference from the function pcibios_scanbus() to the function .init.text:pcibios_map_irq()
      The function pcibios_scanbus() references
      the function __init pcibios_map_irq().
      This is often because pcibios_scanbus lacks a __init
      annotation or the annotation of pcibios_map_irq is wrong.
      
      Run-Tested only on Alchemy.
      Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17267/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8eba3651
    • James Hogan's avatar
      MIPS: Fix input modify in __write_64bit_c0_split() · c22c8043
      James Hogan authored
      The inline asm in __write_64bit_c0_split() modifies the 64-bit input
      operand by shifting the high register left by 32, and constructing the
      full 64-bit value in the low register (even on a 32-bit kernel), so if
      that value is used again it could cause breakage as GCC would assume the
      registers haven't changed when they have.
      
      To quote the GCC extended asm documentation:
      > Warning: Do not modify the contents of input-only operands (except for
      > inputs tied to outputs). The compiler assumes that on exit from the
      > asm statement these operands contain the same values as they had
      > before executing the statement.
      
      Avoid modifying the input by using a temporary variable as an output
      which is modified instead of the input and not otherwise used. The asm
      is always __volatile__ so GCC shouldn't optimise it out. The low
      register of the temporary output is written before the high register of
      the input is read, so we have two constraint alternatives, one where
      both use the same registers (for when the input value isn't subsequently
      used), and one with an early clobber on the output in case the low
      output uses the same register as the high input. This allows the
      resulting assembly to remain mostly unchanged.
      
      A diff of a MIPS32r6 kernel reveals only three differences, two in
      relation to write_c0_r10k_diag() in cpu_probe() (register allocation
      rearranged slightly but otherwise identical), and one in relation to
      write_c0_cvmmemctl2() in kvm_vz_local_flush_guesttlb_all(), but the
      octeon CPU is only supported on 64-bit kernels where
      __write_64bit_c0_split() isn't used so that shouldn't matter in
      practice. So there currently doesn't appear to be anything broken by
      this bug.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17315/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      c22c8043
    • Arnd Bergmann's avatar
      MIPS: MSP71xx: Include asm/setup.h · 9bbe7dc0
      Arnd Bergmann authored
      msp71xx_defconfig can not be built at the in v4.14-rc1
      
      arch/mips/pmcs-msp71xx/msp_smp.c:72:2: error: implicit declaration of function 'set_vi_handler' [-Werror=implicit-function-declaration]
      
      I don't know what caused the regression, but including the right
      header is the obvious fix.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17309/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      9bbe7dc0
    • Tyrel Datwyler's avatar
      powerpc/pseries: Fix parent_dn reference leak in add_dt_node() · b537ca6f
      Tyrel Datwyler authored
      A reference to the parent device node is held by add_dt_node() for the
      node to be added. If the call to dlpar_configure_connector() fails
      add_dt_node() returns ENOENT and that reference is not freed.
      
      Add a call to of_node_put(parent_dn) prior to bailing out after a
      failed dlpar_configure_connector() call.
      
      Fixes: 8d5ff320 ("powerpc/pseries: Make dlpar_configure_connector parent node aware")
      Cc: stable@vger.kernel.org # v3.12+
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b537ca6f
    • Tyrel Datwyler's avatar
      powerpc/pseries: Fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR · 087ff6a5
      Tyrel Datwyler authored
      Commit 215ee763 ("powerpc: pseries: remove dlpar_attach_node
      dependency on full path") reworked dlpar_attach_node() to no longer
      look up the parent node "/cpus", but instead to have the parent node
      passed by the caller in the function parameter list.
      
      As a result dlpar_attach_node() is no longer responsible for freeing
      the reference to the parent node. However, commit 215ee763 failed
      to remove the of_node_put(parent) call in dlpar_attach_node(), or to
      take into account that the reference to the parent in the caller
      dlpar_cpu_add() needs to be held until after dlpar_attach_node()
      returns.
      
      As a result doing repeated cpu add/remove dlpar operations will
      eventually result in the following error:
      
        OF: ERROR: Bad of_node_put() on /cpus
        CPU: 0 PID: 10896 Comm: drmgr Not tainted 4.13.0-autotest #1
        Call Trace:
         dump_stack+0x15c/0x1f8 (unreliable)
         of_node_release+0x1a4/0x1c0
         kobject_put+0x1a8/0x310
         kobject_del+0xbc/0xf0
         __of_detach_node_sysfs+0x144/0x210
         of_detach_node+0xf0/0x180
         dlpar_detach_node+0xc4/0x120
         dlpar_cpu_remove+0x280/0x560
         dlpar_cpu_release+0xbc/0x1b0
         arch_cpu_release+0x6c/0xb0
         cpu_release_store+0xa0/0x100
         dev_attr_store+0x68/0xa0
         sysfs_kf_write+0xa8/0xf0
         kernfs_fop_write+0x2cc/0x400
         __vfs_write+0x5c/0x340
         vfs_write+0x1a8/0x3d0
         SyS_write+0xa8/0x1a0
         system_call+0x58/0x6c
      
      Fix the issue by removing the of_node_put(parent) call from
      dlpar_attach_node(), and ensuring that the reference to the parent
      node is properly held and released by the caller dlpar_cpu_add().
      
      Fixes: 215ee763 ("powerpc: pseries: remove dlpar_attach_node dependency on full path")
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Reported-by: default avatarAbdul Haleem <abdhalee@linux.vnet.ibm.com>
      [mpe: Add a comment in the code and frob the change log slightly]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      087ff6a5
    • Benjamin Herrenschmidt's avatar
      powerpc/eeh: Create PHB PEs after EEH is initialized · 3e77adee
      Benjamin Herrenschmidt authored
      Otherwise we end up not yet having computed the right diag data size
      on powernv where EEH initialization is delayed, thus causing memory
      corruption later on when calling OPAL.
      
      Fixes: 5cb1f8fd ("powerpc/powernv/pci: Dynamically allocate PHB diag data")
      Cc: stable@vger.kernel.org # v4.13+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarRussell Currey <ruscur@russell.cc>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3e77adee
    • Will Deacon's avatar
      ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user · 58aff0af
      Will Deacon authored
      Commit 553f770e ("ipc: move compat shmctl to native") moved the
      compat IPC syscall handling into ipc/shm.c and refactored the struct
      accessors in the process. Unfortunately, the call to
      copy_compat_shmid_to_user when handling a compat {IPC,SHM}_STAT command
      gets the arguments the wrong way round, passing a kernel stack address
      as the user buffer (destination) and the user buffer as the kernel stack
      address (source).
      
      This patch fixes the parameter ordering so the buffers are accessed
      correctly.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      58aff0af
    • Petar Penkov's avatar
      iov_iter: fix page_copy_sane for compound pages · a90bcb86
      Petar Penkov authored
      Issue is that if the data crosses a page boundary inside a compound
      page, this check will incorrectly trigger a WARN_ON.
      
      To fix this, compute the order using the head of the compound page and
      adjust the offset to be relative to that head.
      
      Fixes: 72e809ed ("iov_iter: sanity checks for copy to/from page
      primitives")
      Signed-off-by: default avatarPetar Penkov <ppenkov@google.com>
      CC: Al Viro <viro@zeniv.linux.org.uk>
      CC: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a90bcb86
    • Steve French's avatar
      SMB: Validate negotiate (to protect against downgrade) even if signing off · 0603c96f
      Steve French authored
      As long as signing is supported (ie not a guest user connection) and
      connection is SMB3 or SMB3.02, then validate negotiate (protect
      against man in the middle downgrade attacks).  We had been doing this
      only when signing was required, not when signing was just enabled,
      but this more closely matches recommended SMB3 behavior and is
      better security.  Suggested by Metze.
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Reviewed-by: default avatarJeremy Allison <jra@samba.org>
      Acked-by: default avatarStefan Metzmacher <metze@samba.org>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      CC: Stable <stable@vger.kernel.org>
      0603c96f
  4. 20 Sep, 2017 9 commits
    • Shu Wang's avatar
      cifs: release auth_key.response for reconnect. · f5c4ba81
      Shu Wang authored
      There is a race that cause cifs reconnect in cifs_mount,
      - cifs_mount
        - cifs_get_tcp_session
          - [ start thread cifs_demultiplex_thread
            - cifs_read_from_socket: -ECONNABORTED
              - DELAY_WORK smb2_reconnect_server ]
        - cifs_setup_session
        - [ smb2_reconnect_server ]
      
      auth_key.response was allocated in cifs_setup_session, and
      will release when the session destoried. So when session re-
      connect, auth_key.response should be check and released.
      
      Tested with my system:
      CIFS VFS: Free previous auth_key.response = ffff8800320bbf80
      
      A simple auth_key.response allocation call trace:
      - cifs_setup_session
      - SMB2_sess_setup
      - SMB2_sess_auth_rawntlmssp_authenticate
      - build_ntlmssp_auth_blob
      - setup_ntlmv2_rsp
      Signed-off-by: default avatarShu Wang <shuwang@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      CC: Stable <stable@vger.kernel.org>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      f5c4ba81
    • Shu Wang's avatar
      cifs: release cifs root_cred after exit_cifs · 94183331
      Shu Wang authored
      memory leak was found by kmemleak. exit_cifs_spnego
      should be called before cifs module removed, or
      cifs root_cred will not be released.
      
      kmemleak report:
      unreferenced object 0xffff880070a3ce40 (size 192):
        backtrace:
           kmemleak_alloc+0x4a/0xa0
           kmem_cache_alloc+0xc7/0x1d0
           prepare_kernel_cred+0x20/0x120
           init_cifs_spnego+0x2d/0x170 [cifs]
           0xffffffffc07801f3
           do_one_initcall+0x51/0x1b0
           do_init_module+0x60/0x1fd
           load_module+0x161e/0x1b60
           SYSC_finit_module+0xa9/0x100
           SyS_finit_module+0xe/0x10
      Signed-off-by: default avatarShu Wang <shuwang@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      CC: Stable <stable@vger.kernel.org>
      94183331
    • Colin Ian King's avatar
      CIFS: make arrays static const, reduces object code size · 4d61eda8
      Colin Ian King authored
      Don't populate the read-only arrays types[] on the stack, instead make
      them both static const.  Makes the object code smaller by over 200 bytes:
      
      Before:
         text	   data	    bss	    dec	    hex	filename
       111503	  37696	    448	 149647	  2488f	fs/cifs/file.o
      
      After:
         text	   data	    bss	    dec	    hex	filename
       111140	  37856	    448	 149444	  247c4	fs/cifs/file.o
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      4d61eda8
    • Dave Airlie's avatar
      Merge tag 'exynos-drm-fixes-for-v4.14-rc1' of... · 56eac98b
      Dave Airlie authored
      Merge tag 'exynos-drm-fixes-for-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      - fix suspend/resume issues.
      - fix memory corruption detected by kasan.
      - fix build error on x86.
      
      * tag 'exynos-drm-fixes-for-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos/hdmi: Fix unsafe list iteration
        drm: exynos: include linux/irq.h
        drm/exynos: Fix suspend/resume support
        drm/exynos: Fix locking in the suspend/resume paths
      56eac98b
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2017-09-20' of... · c106c7a5
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2017-09-20' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
      
      drm/i915 fixes for 4.14-rc1
      
      Couple fixes for stable:
      
      - Fix MIPI panels on BXT.
      - Fix PCI BARs information on GVT.
      
      Plus other fixes:
      
      - Fix minimal brightness for BXT, GLK, CFL and CNL.
      - Fix compilation warning: unused in_vbl
      - Fix error handling in intel_framebuffer_init
      
      * tag 'drm-intel-fixes-2017-09-20' of git://anongit.freedesktop.org/git/drm-intel:
        drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos()
        drm/i915/cnp: set min brightness from VBT
        Revert "drm/i915/bxt: Disable device ready before shutdown command"
        drm/i915/bxt: set min brightness from VBT
        drm/i915: Fix an error handling in 'intel_framebuffer_init()'
        drm/i915/gvt: Fix incorrect PCI BARs reporting
      c106c7a5
    • Steve French's avatar
      [SMB3] Update session and share information displayed for debugging SMB2/SMB3 · 1fa089ec
      Steve French authored
      We were not displaying some key fields (session status and capabilities and
      whether guest authenticated) for SMB2/SMB3 session in /proc/fs/cifs/DebugData.
      
      This is needed for real world triage of problems with the (now much more
      common) SMB3 mounts.
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      1fa089ec
    • John Keeping's avatar
      PCI: endpoint: Use correct "end of test" interrupt · 749aaf33
      John Keeping authored
      pci_epf_test_raise_irq() reads the interrupt to use for the response from
      reg->command, but this has been cleared at the beginning of the command
      handler so the value is always zero at this point.
      
      Instead, extract the interrupt index before handling the command and then
      pass the requested interrupt into pci_epf_test_raise_irq().  This allows us
      to remove the specific code to extract the interrupt for
      COMMAND_RAISE_MSI_IRQ since it is now handled in common code.
      
      Fixes: 3ecf3232 ("PCI: endpoint: Do not reset *command* inadvertently")
      Signed-off-by: default avatarJohn Keeping <john@metanate.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      749aaf33
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c52f56a6
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "This includes three minor fixes.
      
          - Have writing to trace file clear the irqsoff (and friends) tracer
      
          - trace_pipe behavior for instance buffers was different than top
            buffer
      
          - Show a message of why mmiotrace doesn't start from commandline"
      
      * tag 'trace-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix trace_pipe behavior for instance traces
        tracing: Ignore mmiotrace from kernel commandline
        tracing: Erase irqsoff trace with empty write
      c52f56a6
    • Masahiro Yamada's avatar
      kbuild: rpm-pkg: fix version number handling · 25b080bd
      Masahiro Yamada authored
      The "Release:" field of the spec file is determined based on the
      .version file.
      
      However, the .version file is not copied to the source tar file.
      So, when we build the kernel from the source package, the UTS_VERSION
      always indicates #1.  This does not match with "rpm -q".
      
      The kernel UTS_VERSION and "rpm -q" do not agree for binrpm-pkg, either.
      Please note the kernel has already been built before the spec file is
      created.  Currently, mkspec invokes mkversion.  This script returns an
      incremented version.  So, the "Release:" field of the spec file is
      greater than the version in the kernel by one.
      
      For the source package build (where .version file is missing), we can
      give KBUILD_BUILD_VERSION=%{release} to the build command.
      
      For the binary package build, we can simply read out the .version file
      because it contains the version number that was used for building the
      kernel image.
      
      We can remove scripts/mkversion because scripts/package/Makefile need
      not touch the .version file.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      25b080bd