1. 01 Apr, 2019 1 commit
  2. 26 Mar, 2019 1 commit
  3. 25 Mar, 2019 2 commits
    • Pankaj Bharadiya's avatar
      ASoC: dapm: Fix NULL pointer dereference in snd_soc_dapm_free_kcontrol · cacea3a9
      Pankaj Bharadiya authored
      w_text_param can be NULL and it is being dereferenced without checking.
      Add the missing sanity check to prevent  NULL pointer dereference.
      Signed-off-by: default avatarPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
      Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      cacea3a9
    • Guenter Roeck's avatar
      ASoC: intel: Fix crash at suspend/resume after failed codec registration · 8f71370f
      Guenter Roeck authored
      If codec registration fails after the ASoC Intel SST driver has been probed,
      the kernel will Oops and crash at suspend/resume.
      
      general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI
      CPU: 1 PID: 2811 Comm: cat Tainted: G        W         4.19.30 #15
      Hardware name: GOOGLE Clapper, BIOS Google_Clapper.5216.199.7 08/22/2014
      RIP: 0010:snd_soc_suspend+0x5a/0xd21
      Code: 03 80 3c 10 00 49 89 d7 74 0b 48 89 df e8 71 72 c4 fe 4c 89
      fa 48 8b 03 48 89 45 d0 48 8d 98 a0 01 00 00 48 89 d8 48 c1 e8 03
      <8a> 04 10 84 c0 0f 85 85 0c 00 00 80 3b 00 0f 84 6b 0c 00 00 48 8b
      RSP: 0018:ffff888035407750 EFLAGS: 00010202
      RAX: 0000000000000034 RBX: 00000000000001a0 RCX: 0000000000000000
      RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff88805c417098
      RBP: ffff8880354077b0 R08: dffffc0000000000 R09: ffffed100b975718
      R10: 0000000000000001 R11: ffffffff949ea4a3 R12: 1ffff1100b975746
      R13: dffffc0000000000 R14: ffff88805cba4588 R15: dffffc0000000000
      FS:  0000794a78e91b80(0000) GS:ffff888068d00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007bd5283ccf58 CR3: 000000004b7aa000 CR4: 00000000001006e0
      Call Trace:
      ? dpm_complete+0x67b/0x67b
      ? i915_gem_suspend+0x14d/0x1ad
      sst_soc_prepare+0x91/0x1dd
      ? sst_be_hw_params+0x7e/0x7e
      dpm_prepare+0x39a/0x88b
      dpm_suspend_start+0x13/0x9d
      suspend_devices_and_enter+0x18f/0xbd7
      ? arch_suspend_enable_irqs+0x11/0x11
      ? printk+0xd9/0x12d
      ? lock_release+0x95f/0x95f
      ? log_buf_vmcoreinfo_setup+0x131/0x131
      ? rcu_read_lock_sched_held+0x140/0x22a
      ? __bpf_trace_rcu_utilization+0xa/0xa
      ? __pm_pr_dbg+0x186/0x190
      ? pm_notifier_call_chain+0x39/0x39
      ? suspend_test+0x9d/0x9d
      pm_suspend+0x2f4/0x728
      ? trace_suspend_resume+0x3da/0x3da
      ? lock_release+0x95f/0x95f
      ? kernfs_fop_write+0x19f/0x32d
      state_store+0xd8/0x147
      ? sysfs_kf_read+0x155/0x155
      kernfs_fop_write+0x23e/0x32d
      __vfs_write+0x108/0x608
      ? vfs_read+0x2e9/0x2e9
      ? rcu_read_lock_sched_held+0x140/0x22a
      ? __bpf_trace_rcu_utilization+0xa/0xa
      ? debug_smp_processor_id+0x10/0x10
      ? selinux_file_permission+0x1c5/0x3c8
      ? rcu_sync_lockdep_assert+0x6a/0xad
      ? __sb_start_write+0x129/0x2ac
      vfs_write+0x1aa/0x434
      ksys_write+0xfe/0x1be
      ? __ia32_sys_read+0x82/0x82
      do_syscall_64+0xcd/0x120
      entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      In the observed situation, the problem is seen because the codec driver
      failed to probe due to a hardware problem.
      
      max98090 i2c-193C9890:00: Failed to read device revision: -1
      max98090 i2c-193C9890:00: ASoC: failed to probe component -1
      cht-bsw-max98090 cht-bsw-max98090: ASoC: failed to instantiate card -1
      cht-bsw-max98090 cht-bsw-max98090: snd_soc_register_card failed -1
      cht-bsw-max98090: probe of cht-bsw-max98090 failed with error -1
      
      The problem is similar to the problem solved with commit 2fc995a8
      ("ASoC: intel: Fix crash at suspend/resume without card registration"),
      but codec registration fails at a later point. At that time, the pointer
      checked with the above mentioned commit is already set, but it is not
      cleared if the device is subsequently removed. Adding a remove function
      to clear the pointer fixes the problem.
      
      Cc: stable@vger.kernel.org
      Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
      Cc: Curtis Malainey <cujomalainey@chromium.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      8f71370f
  4. 21 Mar, 2019 3 commits
  5. 20 Mar, 2019 2 commits
  6. 19 Mar, 2019 4 commits
  7. 18 Mar, 2019 5 commits
  8. 17 Mar, 2019 14 commits
  9. 16 Mar, 2019 8 commits
    • Linus Torvalds's avatar
      Merge tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · a9dce667
      Linus Torvalds authored
      Pull pidfd system call from Christian Brauner:
       "This introduces the ability to use file descriptors from /proc/<pid>/
        as stable handles on struct pid. Even if a pid is recycled the handle
        will not change. For a start these fds can be used to send signals to
        the processes they refer to.
      
        With the ability to use /proc/<pid> fds as stable handles on struct
        pid we can fix a long-standing issue where after a process has exited
        its pid can be reused by another process. If a caller sends a signal
        to a reused pid it will end up signaling the wrong process.
      
        With this patchset we enable a variety of use cases. One obvious
        example is that we can now safely delegate an important part of
        process management - sending signals - to processes other than the
        parent of a given process by sending file descriptors around via scm
        rights and not fearing that the given process will have been recycled
        in the meantime. It also allows for easy testing whether a given
        process is still alive or not by sending signal 0 to a pidfd which is
        quite handy.
      
        There has been some interest in this feature e.g. from systems
        management (systemd, glibc) and container managers. I have requested
        and gotten comments from glibc to make sure that this syscall is
        suitable for their needs as well. In the future I expect it to take on
        most other pid-based signal syscalls. But such features are left for
        the future once they are needed.
      
        This has been sitting in linux-next for quite a while and has not
        caused any issues. It comes with selftests which verify basic
        functionality and also test that a recycled pid cannot be signaled via
        a pidfd.
      
        Jon has written about a prior version of this patchset. It should
        cover the basic functionality since not a lot has changed since then:
      
            https://lwn.net/Articles/773459/
      
        The commit message for the syscall itself is extensively documenting
        the syscall, including it's functionality and extensibility"
      
      * tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        selftests: add tests for pidfd_send_signal()
        signal: add pidfd_send_signal() syscall
      a9dce667
    • Linus Torvalds's avatar
      Merge tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f67e3fb4
      Linus Torvalds authored
      Pull device-dax updates from Dan Williams:
       "New device-dax infrastructure to allow persistent memory and other
        "reserved" / performance differentiated memories, to be assigned to
        the core-mm as "System RAM".
      
        Some users want to use persistent memory as additional volatile
        memory. They are willing to cope with potential performance
        differences, for example between DRAM and 3D Xpoint, and want to use
        typical Linux memory management apis rather than a userspace memory
        allocator layered over an mmap() of a dax file. The administration
        model is to decide how much Persistent Memory (pmem) to use as System
        RAM, create a device-dax-mode namespace of that size, and then assign
        it to the core-mm. The rationale for device-dax is that it is a
        generic memory-mapping driver that can be layered over any "special
        purpose" memory, not just pmem. On subsequent boots udev rules can be
        used to restore the memory assignment.
      
        One implication of using pmem as RAM is that mlock() no longer keeps
        data off persistent media. For this reason it is recommended to enable
        NVDIMM Security (previously merged for 5.0) to encrypt pmem contents
        at rest. We considered making this recommendation an actively enforced
        requirement, but in the end decided to leave it as a distribution /
        administrator policy to allow for emulation and test environments that
        lack security capable NVDIMMs.
      
        Summary:
      
         - Replace the /sys/class/dax device model with /sys/bus/dax, and
           include a compat driver so distributions can opt-in to the new ABI.
      
         - Allow for an alternative driver for the device-dax address-range
      
         - Introduce the 'kmem' driver to hotplug / assign a device-dax
           address-range to the core-mm.
      
         - Arrange for the device-dax target-node to be onlined so that the
           newly added memory range can be uniquely referenced by numa apis"
      
      NOTE! I'm not entirely happy with the whole "PMEM as RAM" model because
      we currently have special - and very annoying rules in the kernel about
      accessing PMEM only with the "MC safe" accessors, because machine checks
      inside the regular repeat string copy functions can be fatal in some
      (not described) circumstances.
      
      And apparently the PMEM modules can cause that a lot more than regular
      RAM.  The argument is that this happens because PMEM doesn't necessarily
      get scrubbed at boot like RAM does, but that is planned to be added for
      the user space tooling.
      
      Quoting Dan from another email:
       "The exposure can be reduced in the volatile-RAM case by scanning for
        and clearing errors before it is onlined as RAM. The userspace tooling
        for that can be in place before v5.1-final. There's also runtime
        notifications of errors via acpi_nfit_uc_error_notify() from
        background scrubbers on the DIMM devices. With that mechanism the
        kernel could proactively clear newly discovered poison in the volatile
        case, but that would be additional development more suitable for v5.2.
      
        I understand the concern, and the need to highlight this issue by
        tapping the brakes on feature development, but I don't see PMEM as RAM
        making the situation worse when the exposure is also there via DAX in
        the PMEM case. Volatile-RAM is arguably a safer use case since it's
        possible to repair pages where the persistent case needs active
        application coordination"
      
      * tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        device-dax: "Hotplug" persistent memory for use like normal RAM
        mm/resource: Let walk_system_ram_range() search child resources
        mm/memory-hotplug: Allow memory resources to be children
        mm/resource: Move HMM pr_debug() deeper into resource code
        mm/resource: Return real error codes from walk failures
        device-dax: Add a 'modalias' attribute to DAX 'bus' devices
        device-dax: Add a 'target_node' attribute
        device-dax: Auto-bind device after successful new_id
        acpi/nfit, device-dax: Identify differentiated memory with a unique numa-node
        device-dax: Add /sys/class/dax backwards compatibility
        device-dax: Add support for a dax override driver
        device-dax: Move resource pinning+mapping into the common driver
        device-dax: Introduce bus + driver model
        device-dax: Start defining a dax bus model
        device-dax: Remove multi-resource infrastructure
        device-dax: Kill dax_region base
        device-dax: Kill dax_region ida
      f67e3fb4
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 477558d7
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is the final round of mostly small fixes and performance
        improvements to our initial submit.
      
        The main regression fix is the ia64 simscsi build failure which was
        missed in the serial number elimination conversion"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
        scsi: ia64: simscsi: use request tag instead of serial_number
        scsi: aacraid: Fix performance issue on logical drives
        scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()
        scsi: libiscsi: Hold back_lock when calling iscsi_complete_task
        scsi: hisi_sas: Change SERDES_CFG init value to increase reliability of HiLink
        scsi: hisi_sas: Send HARD RESET to clear the previous affiliation of STP target port
        scsi: hisi_sas: Set PHY linkrate when disconnected
        scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw
        scsi: hisi_sas: Fix a timeout race of driver internal and SMP IO
        scsi: hisi_sas: Change return variable type in phy_up_v3_hw()
        scsi: qla2xxx: check for kstrtol() failure
        scsi: lpfc: fix 32-bit format string warning
        scsi: lpfc: fix unused variable warning
        scsi: target: tcmu: Switch to bitmap_zalloc()
        scsi: libiscsi: fall back to sendmsg for slab pages
        scsi: qla2xxx: avoid printf format warning
        scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset
        scsi: lpfc: Correct __lpfc_sli_issue_iocb_s4 lockdep check
        scsi: ufs: hisi: fix ufs_hba_variant_ops passing
        scsi: qla2xxx: Fix panic in qla_dfs_tgt_counters_show
        ...
      477558d7
    • Linus Torvalds's avatar
      Merge tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block · 11efae35
      Linus Torvalds authored
      Pull more block layer changes from Jens Axboe:
       "This is a collection of both stragglers, and fixes that came in after
        I finalized the initial pull. This contains:
      
         - An MD pull request from Song, with a few minor fixes
      
         - Set of NVMe patches via Christoph
      
         - Pull request from Konrad, with a few fixes for xen/blkback
      
         - pblk fix IO calculation fix (Javier)
      
         - Segment calculation fix for pass-through (Ming)
      
         - Fallthrough annotation for blkcg (Mathieu)"
      
      * tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block: (25 commits)
        blkcg: annotate implicit fall through
        nvme-tcp: support C2HData with SUCCESS flag
        nvmet: ignore EOPNOTSUPP for discard
        nvme: add proper write zeroes setup for the multipath device
        nvme: add proper discard setup for the multipath device
        nvme: remove nvme_ns_config_oncs
        nvme: disable Write Zeroes for qemu controllers
        nvmet-fc: bring Disconnect into compliance with FC-NVME spec
        nvmet-fc: fix issues with targetport assoc_list list walking
        nvme-fc: reject reconnect if io queue count is reduced to zero
        nvme-fc: fix numa_node when dev is null
        nvme-fc: use nr_phys_segments to determine existence of sgl
        nvme-loop: init nvmet_ctrl fatal_err_work when allocate
        nvme: update comment to make the code easier to read
        nvme: put ns_head ref if namespace fails allocation
        nvme-trace: fix cdw10 buffer overrun
        nvme: don't warn on block content change effects
        nvme: add get-feature to admin cmds tracer
        md: Fix failed allocation of md_register_thread
        It's wrong to add len to sector_nr in raid10 reshape twice
        ...
      11efae35
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 465c209d
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfixes:
         - Fix an Oops in SUNRPC back channel tracepoints
         - Fix a SUNRPC client regression when handling oversized replies
         - Fix the minimal size for SUNRPC reply buffer allocation
         - rpc_decode_header() must always return a non-zero value on error
         - Fix a typo in pnfs_update_layout()
      
        Cleanup:
         - Remove redundant check for the reply length in call_decode()"
      
      * tag 'nfs-for-5.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        SUNRPC: Remove redundant check for the reply length in call_decode()
        SUNRPC: Handle the SYSTEM_ERR rpc error
        SUNRPC: rpc_decode_header() must always return a non-zero value on error
        SUNRPC: Use the ENOTCONN error on socket disconnect
        SUNRPC: Fix the minimal size for reply buffer allocation
        SUNRPC: Fix a client regression when handling oversized replies
        pNFS: Fix a typo in pnfs_update_layout
        fix null pointer deref in tracepoints in back channel
      465c209d
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · a9c55d58
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "One fix to prevent runtime allocation of 16GB pages when running in a
        VM (as opposed to bare metal), because it doesn't work.
      
        A small fix to our recently added KCOV support to exempt some more
        code from being instrumented.
      
        Plus a few minor build fixes, a small dead code removal and a
        defconfig update.
      
        Thanks to: Alexey Kardashevskiy, Aneesh Kumar K.V, Christophe Leroy,
        Jason Yan, Joel Stanley, Mahesh Salgaonkar, Mathieu Malaterre"
      
      * tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Include <asm/nmi.h> header file to fix a warning
        powerpc/powernv: Fix compile without CONFIG_TRACEPOINTS
        powerpc/mm: Disable kcov for SLB routines
        powerpc: remove dead code in head_fsl_booke.S
        powerpc/configs: Sync skiroot defconfig
        powerpc/hugetlb: Don't do runtime allocation of 16G pages in LPAR configuration
      a9c55d58
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 92497350
      Linus Torvalds authored
      Pull vfs mount infrastructure fix from Al Viro:
       "Fixup for sysfs braino.
      
        Capabilities checks for sysfs mount do include those on netns, but
        only if CONFIG_NET_NS is enabled. Sorry, should've caught that
        earlier..."
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix sysfs_init_fs_context() in !CONFIG_NET_NS case
      92497350
    • Al Viro's avatar
      fix sysfs_init_fs_context() in !CONFIG_NET_NS case · ab81dabd
      Al Viro authored
      Permission checks on current's netns should be done only when
      netns are enabled.
      Reported-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      Fixes: 23bf1b6bSigned-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ab81dabd