1. 31 Oct, 2019 5 commits
  2. 27 Oct, 2019 15 commits
    • Ben Dooks (Codethink)'s avatar
      ARM: 8917/1: mm: include <asm/set_memory.h> · 9110f3e7
      Ben Dooks (Codethink) authored
      The definitions of set_kernel_text_rw() and
      set_kernel_text_ro() are in <asm/set_memory.h>
      but this is not included in init.c which defines
      these. Silence the following warnings by including
      the <asm/set_memory.h> header.
      
      arch/arm/mm/init.c:669:6: warning: symbol 'set_kernel_text_rw' was not declared. Should it be static?
      arch/arm/mm/init.c:678:6: warning: symbol 'set_kernel_text_ro' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      9110f3e7
    • Ben Dooks (Codethink)'s avatar
      ARM: 8916/1: mm: make set_section_perms() static · ea5379be
      Ben Dooks (Codethink) authored
      The set_section_perms() is not defined outside of the
      init.c file, so make it static to avoid the following
      warning:
      
      arch/arm/mm/init.c:596:6: warning: symbol 'set_section_perms' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      ea5379be
    • Ben Dooks (Codethink)'s avatar
      ARM: 8915/1: zImage: atags_to_fdt: fix __be32 and __be64 types · 43fa593e
      Ben Dooks (Codethink) authored
      There are some sparse warnings about type conversion in
      the atags_to_fdt.c code, due to __be32 and __be64, so
      fix the following:
      
      - Change _be32 and __be64 where appropriate
      - Change setprop() to take a 'void *'
      - Change incorrect fdt32_to_cpu() on FDT_MAGIC
      
      Fixes the following sparse warnings:
      
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32
      arch/arm/boot/compressed/atags_to_fdt.c:182:60: warning: incorrect type in assignment (different base types)
      arch/arm/boot/compressed/atags_to_fdt.c:182:60:    expected unsigned long long [usertype]
      arch/arm/boot/compressed/atags_to_fdt.c:182:60:    got restricted __be64 [usertype]
      arch/arm/boot/compressed/atags_to_fdt.c:184:60: warning: incorrect type in assignment (different base types)
      arch/arm/boot/compressed/atags_to_fdt.c:184:60:    expected unsigned long long [usertype]
      arch/arm/boot/compressed/atags_to_fdt.c:184:60:    got restricted __be64 [usertype]
      arch/arm/boot/compressed/atags_to_fdt.c:187:62: warning: incorrect type in assignment (different base types)
      arch/arm/boot/compressed/atags_to_fdt.c:187:62:    expected unsigned int
      arch/arm/boot/compressed/atags_to_fdt.c:187:62:    got restricted __be32 [usertype]
      arch/arm/boot/compressed/atags_to_fdt.c:189:62: warning: incorrect type in assignment (different base types)
      arch/arm/boot/compressed/atags_to_fdt.c:189:62:    expected unsigned int
      arch/arm/boot/compressed/atags_to_fdt.c:189:62:    got restricted __be32 [usertype]
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      43fa593e
    • Ben Dooks's avatar
      ARM: 8913/1: arch_timer: include <asm/arch_timer.h> · 05b1fd8b
      Ben Dooks authored
      The arch_timer_arch_init is defined in <asm/arch_timer.h> so include
      that to fix the following sparse error:
      
      arch/arm/kernel/arch_timer.c:31:12: warning: symbol 'arch_timer_arch_init' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      05b1fd8b
    • Ben Dooks's avatar
      ARM: 8911/1: move pcibios_report_status to <asm/pci.h> · e3c5b361
      Ben Dooks authored
      Move the pcibios_report_status to <asm/pci.h> include to remove the
      following sparse warning and to remove the extra definition in the
      footbrdige dc21285.c driver:
      
      arch/arm/kernel/bios32.c:59:6: warning: symbol 'pcibios_report_status' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      e3c5b361
    • Ben Dooks's avatar
      ARM: 8910/1: fix missing declartion of module_frob_arch_sections · a959f887
      Ben Dooks authored
      The module_frob_arch_sections function is missing the header declaration
      which is in <linux/moduleloader.h> so include that to fix the following
      sparse warning:
      
      arch/arm/kernel/module-plts.c:188:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      a959f887
    • Ben Dooks's avatar
      ARM: 8909/1: make unexported items static · 17fe8684
      Ben Dooks authored
      Fixup the following sparse warnings by making the functions and structures
      static.
      
      arch/arm/mm/dma-mapping.c:1562:6: warning: symbol '__arm_iommu_free_attrs' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1586:6: warning: symbol 'arm_iommu_free_attrs' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1592:6: warning: symbol 'arm_coherent_iommu_free_attrs' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1716:5: warning: symbol 'arm_coherent_iommu_map_sg' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1734:5: warning: symbol 'arm_iommu_map_sg' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1767:6: warning: symbol 'arm_coherent_iommu_unmap_sg' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1784:6: warning: symbol 'arm_iommu_unmap_sg' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1798:6: warning: symbol 'arm_iommu_sync_sg_for_cpu' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:1816:6: warning: symbol 'arm_iommu_sync_sg_for_device' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:2018:26: warning: symbol 'iommu_ops' was not declared. Should it be static?
      arch/arm/mm/dma-mapping.c:2040:26: warning: symbol 'iommu_coherent_ops' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      17fe8684
    • Clemens Gruber's avatar
      ARM: 8907/1: arch: reuse addr variable in pfn_valid · 032be728
      Clemens Gruber authored
      Avoid calling __pfn_to_phys twice.
      Signed-off-by: default avatarClemens Gruber <clemens.gruber@pqgruber.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      032be728
    • Linus Torvalds's avatar
      Linux 5.4-rc5 · d6d5df1d
      Linus Torvalds authored
      d6d5df1d
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 153a971f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for the VMWare guest support:
      
         - Unbreak VMWare platform detection which got wreckaged by converting
           an integer constant to a string constant.
      
         - Fix the clang build of the VMWAre hypercall by explicitely
           specifying the ouput register for INL instead of using the short
           form"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/vmware: Fix platform detection VMWARE_PORT macro
        x86/cpu/vmware: Use the full form of INL in VMWARE_HYPERCALL, for clang/llvm
      153a971f
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2b776b54
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "A small set of fixes for time(keeping):
      
         - Add a missing include to prevent compiler warnings.
      
         - Make the VDSO implementation of clock_getres() POSIX compliant
           again. A recent change dropped the NULL pointer guard which is
           required as NULL is a valid pointer value for this function.
      
         - Fix two function documentation typos"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-cpu-timers: Fix two trivial comments
        timers/sched_clock: Include local timekeeping.h for missing declarations
        lib/vdso: Make clock_getres() POSIX compliant again
      2b776b54
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a8a31fdc
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A set of perf fixes:
      
        kernel:
      
         - Unbreak the tracking of auxiliary buffer allocations which got
           imbalanced causing recource limit failures.
      
         - Fix the fallout of splitting of ToPA entries which missed to shift
           the base entry PA correctly.
      
         - Use the correct context to lookup the AUX event when unmapping the
           associated AUX buffer so the event can be stopped and the buffer
           reference dropped.
      
        tools:
      
         - Fix buildiid-cache mode setting in copyfile_mode_ns() when copying
           /proc/kcore
      
         - Fix freeing id arrays in the event list so the correct event is
           closed.
      
         - Sync sched.h anc kvm.h headers with the kernel sources.
      
         - Link jvmti against tools/lib/ctype.o to have weak strlcpy().
      
         - Fix multiple memory and file descriptor leaks, found by coverity in
           perf annotate.
      
         - Fix leaks in error handling paths in 'perf c2c', 'perf kmem', found
           by a static analysis tool"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/aux: Fix AUX output stopping
        perf/aux: Fix tracking of auxiliary trace buffer allocation
        perf/x86/intel/pt: Fix base for single entry topa
        perf kmem: Fix memory leak in compact_gfp_flags()
        tools headers UAPI: Sync sched.h with the kernel
        tools headers kvm: Sync kvm.h headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        perf c2c: Fix memory leak in build_cl_output()
        perf tools: Fix mode setting in copyfile_mode_ns()
        perf annotate: Fix multiple memory and file descriptor leaks
        perf tools: Fix resource leak of closedir() on the error paths
        perf evlist: Fix fix for freed id arrays
        perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
      a8a31fdc
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1e1ac1cb
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Two fixes for interrupt controller drivers:
      
         - Skip IRQ_M_EXT entries in the device tree when initializing the
           RISCV PLIC controller to avoid a double init attempt.
      
         - Use the correct ITS list when issuing the VMOVP synchronization
           command so the operation works only on the ITS instances which are
           associated to a VM"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
        irqchip/gic-v3-its: Use the exact ITSList for VMOVP
      1e1ac1cb
    • Linus Torvalds's avatar
      Merge tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c9a2e4a8
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Seven cifs/smb3 fixes, including three for stable"
      
      * tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
        CIFS: Fix use after free of file info structures
        CIFS: Fix retry mid list corruption on reconnects
        cifs: Fix missed free operations
        CIFS: avoid using MID 0xFFFF
        cifs: clarify comment about timestamp granularity for old servers
        cifs: Handle -EINPROGRESS only when noblockcnt is set
      c9a2e4a8
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 6995a6a5
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
       "Several minor fixes and cleanups for v5.4-rc5:
      
         - Three build fixes for various SPARSEMEM-related kernel
           configurations
      
         - Two cleanup patches for the kernel bug and breakpoint trap handler
           code"
      
      * tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: cleanup do_trap_break
        riscv: cleanup <asm/bug.h>
        riscv: Fix undefined reference to vmemmap_populate_basepages
        riscv: Fix implicit declaration of 'page_to_section'
        riscv: fix fs/proc/kcore.c compilation with sparsemem enabled
      6995a6a5
  3. 26 Oct, 2019 13 commits
  4. 25 Oct, 2019 7 commits
    • Christoph Hellwig's avatar
      riscv: cleanup do_trap_break · e8f44c50
      Christoph Hellwig authored
      If we always compile the get_break_insn_length inline function we can
      remove the ifdefs and let dead code elimination take care of the warn
      branch that is now unreadable because the report_bug stub always
      returns BUG_TRAP_TYPE_BUG.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      e8f44c50
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · b4b61b22
      Linus Torvalds authored
      Pull input fix from Dmitry Torokhov:
       "A fix for st1232 driver to properly report coordinates for 2nd and
        subsequent fingers when more than one is on the surface"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: st1232 - fix reporting multitouch coordinates
      b4b61b22
    • Mike Christie's avatar
      nbd: verify socket is supported during setup · cf1b2326
      Mike Christie authored
      nbd requires socket families to support the shutdown method so the nbd
      recv workqueue can be woken up from its sock_recvmsg call. If the socket
      does not support the callout we will leave recv works running or get hangs
      later when the device or module is removed.
      
      This adds a check during socket connection/reconnection to make sure the
      socket being passed in supports the needed callout.
      
      Reported-by: syzbot+24c12fa8d218ed26011a@syzkaller.appspotmail.com
      Fixes: e9e006f5 ("nbd: fix max number of supported devs")
      Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
      Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cf1b2326
    • Mark Brown's avatar
      ata: libahci_platform: Fix regulator_get_optional() misuse · 962399bb
      Mark Brown authored
      This driver is using regulator_get_optional() to handle all the supplies
      that it handles, and only ever enables and disables all supplies en masse
      without ever doing any other configuration of the device to handle missing
      power. These are clear signs that the API is being misused - it should only
      be used for supplies that may be physically absent from the system and in
      these cases the hardware usually needs different configuration if the
      supply is missing. Instead use normal regualtor_get(), if the supply is
      not described in DT then the framework will substitute a dummy regulator in
      so no special handling is needed by the consumer driver.
      
      In the case of the PHY regulator the handling in the driver is a hack to
      deal with integrated PHYs; the supplies are only optional in the sense
      that that there's some confusion in the code about where they're bound to.
      From a code point of view they function exactly as normal supplies so can
      be treated as such. It'd probably be better to model this by instantiating
      a PHY object for integrated PHYs.
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      962399bb
    • Josef Bacik's avatar
      nbd: handle racing with error'ed out commands · 7ce23e8e
      Josef Bacik authored
      We hit the following warning in production
      
      print_req_error: I/O error, dev nbd0, sector 7213934408 flags 80700
      ------------[ cut here ]------------
      refcount_t: underflow; use-after-free.
      WARNING: CPU: 25 PID: 32407 at lib/refcount.c:190 refcount_sub_and_test_checked+0x53/0x60
      Workqueue: knbd-recv recv_work [nbd]
      RIP: 0010:refcount_sub_and_test_checked+0x53/0x60
      Call Trace:
       blk_mq_free_request+0xb7/0xf0
       blk_mq_complete_request+0x62/0xf0
       recv_work+0x29/0xa1 [nbd]
       process_one_work+0x1f5/0x3f0
       worker_thread+0x2d/0x3d0
       ? rescuer_thread+0x340/0x340
       kthread+0x111/0x130
       ? kthread_create_on_node+0x60/0x60
       ret_from_fork+0x1f/0x30
      ---[ end trace b079c3c67f98bb7c ]---
      
      This was preceded by us timing out everything and shutting down the
      sockets for the device.  The problem is we had a request in the queue at
      the same time, so we completed the request twice.  This can actually
      happen in a lot of cases, we fail to get a ref on our config, we only
      have one connection and just error out the command, etc.
      
      Fix this by checking cmd->status in nbd_read_stat.  We only change this
      under the cmd->lock, so we are safe to check this here and see if we've
      already error'ed this command out, which would indicate that we've
      completed it as well.
      Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7ce23e8e
    • Josef Bacik's avatar
      nbd: protect cmd->status with cmd->lock · de6346ec
      Josef Bacik authored
      We already do this for the most part, except in timeout and clear_req.
      For the timeout case we take the lock after we grab a ref on the config,
      but that isn't really necessary because we're safe to touch the cmd at
      this point, so just move the order around.
      
      For the clear_req cause this is initiated by the user, so again is safe.
      Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      de6346ec
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 9e2dd2ca
      Linus Torvalds authored
      Pull modules fixes from Jessica Yu:
      
       - Revert __ksymtab_$namespace.$symbol naming scheme back to
         __ksymtab_$symbol, as it was causing issues with depmod.
      
         Instead, have modpost extract a symbol's namespace from __kstrtabns
         and __ksymtab_strings.
      
       - Fix `make nsdeps` for out of tree kernel builds (make O=...) caused
         by unescaped '/'.
      
         Use a different sed delimiter to avoid this problem.
      
      * tag 'modules-for-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        scripts/nsdeps: use alternative sed delimiter
        symbol namespaces: revert to previous __ksymtab name scheme
        modpost: make updating the symbol namespace explicit
        modpost: delegate updating namespaces to separate function
      9e2dd2ca