1. 18 Jul, 2019 16 commits
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · da0acd7c
      Linus Torvalds authored
      Pull module updates from Jessica Yu:
       "Summary of modules changes for the 5.3 merge window:
      
         - Code fixes and cleanups
      
         - Fix bug where set_memory_x() wasn't being called when rodata=n
      
         - Fix bug where -EEXIST was being returned for going modules
      
         - Allow arches to override module_exit_section()"
      
      * tag 'modules-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        modules: fix compile error if don't have strict module rwx
        ARM: module: recognize unwind exit sections
        module: allow arch overrides for .exit section names
        modules: fix BUG when load module with rodata=n
        kernel/module: Fix mem leak in module_add_modinfo_attrs
        kernel: module: Use struct_size() helper
        kernel/module.c: Only return -EEXIST for modules that have finished loading
      da0acd7c
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 818e95c7
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
       "The main changes in this release include:
      
         - Add user space specific memory reading for kprobes
      
         - Allow kprobes to be executed earlier in boot
      
        The rest are mostly just various clean ups and small fixes"
      
      * tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits)
        tracing: Make trace_get_fields() global
        tracing: Let filter_assign_type() detect FILTER_PTR_STRING
        tracing: Pass type into tracing_generic_entry_update()
        ftrace/selftest: Test if set_event/ftrace_pid exists before writing
        ftrace/selftests: Return the skip code when tracing directory not configured in kernel
        tracing/kprobe: Check registered state using kprobe
        tracing/probe: Add trace_event_call accesses APIs
        tracing/probe: Add probe event name and group name accesses APIs
        tracing/probe: Add trace flag access APIs for trace_probe
        tracing/probe: Add trace_event_file access APIs for trace_probe
        tracing/probe: Add trace_event_call register API for trace_probe
        tracing/probe: Add trace_probe init and free functions
        tracing/uprobe: Set print format when parsing command
        tracing/kprobe: Set print format right after parsed command
        kprobes: Fix to init kprobes in subsys_initcall
        tracepoint: Use struct_size() in kmalloc()
        ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS
        ftrace: Enable trampoline when rec count returns back to one
        tracing/kprobe: Do not run kprobe boot tests if kprobe_event is on cmdline
        tracing: Make a separate config for trace event self tests
        ...
      818e95c7
    • Linus Torvalds's avatar
      Merge branch 'for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb · d4df33b0
      Linus Torvalds authored
      Pull swiotlb updates from Konrad Rzeszutek Wilk:
       "One compiler fix, and a bug-fix in swiotlb_nr_tbl() and
        swiotlb_max_segment() to check also for no_iotlb_memory"
      
      * 'for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
        swiotlb: fix phys_addr_t overflow warning
        swiotlb: Return consistent SWIOTLB segments/nr_tbl
        swiotlb: Group identical cleanup in swiotlb_cleanup()
      d4df33b0
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 366a4e38
      Linus Torvalds authored
      Pull xfs cleanups from Darrick Wong:
       "We had a few more lateish cleanup patches come in for 5.3 -- a couple
        of syncups with the userspace libxfs code and a conversion of the XFS
        administrator's guide to ReST format.
      
        Summary:
      
         - Bring fs/xfs/libxfs/xfs_trans_inode.c in sync with userspace
           libxfs.
      
         - Convert the xfs administrator guide to rst and move it into the
           official admin guide under Documentation"
      
      * tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        Documentation: filesystem: Convert xfs.txt to ReST
        xfs: sync up xfs_trans_inode with userspace
        xfs: move xfs_trans_inode.c to libxfs/
      366a4e38
    • Linus Torvalds's avatar
      Merge tag '4.3-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · ae9b728c
      Linus Torvalds authored
      Pull cifs updates from Steve French:
       "Fixes (three for stable) and improvements including much faster
        encryption (SMB3.1.1 GCM)"
      
      * tag '4.3-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: (27 commits)
        smb3: smbdirect no longer experimental
        cifs: fix crash in smb2_compound_op()/smb2_set_next_command()
        cifs: fix crash in cifs_dfs_do_automount
        cifs: fix parsing of symbolic link error response
        cifs: refactor and clean up arguments in the reparse point parsing
        SMB3: query inode number on open via create context
        smb3: Send netname context during negotiate protocol
        smb3: do not send compression info by default
        smb3: add new mount option to retrieve mode from special ACE
        smb3: Allow query of symlinks stored as reparse points
        cifs: Fix a race condition with cifs_echo_request
        cifs: always add credits back for unsolicited PDUs
        fs: cifs: cifsssmb: Change return type of convert_ace_to_cifs_ace
        add some missing definitions
        cifs: fix typo in debug message with struct field ia_valid
        smb3: minor cleanup of compound_send_recv
        CIFS: Fix module dependency
        cifs: simplify code by removing CONFIG_CIFS_ACL ifdef
        cifs: Fix check for matching with existing mount
        cifs: Properly handle auto disabling of serverino option
        ...
      ae9b728c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.3-rc1' of git://github.com/ceph/ceph-client · d9b9c893
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "Lots of exciting things this time!
      
         - support for rbd object-map and fast-diff features (myself). This
           will speed up reads, discards and things like snap diffs on sparse
           images.
      
         - ceph.snap.btime vxattr to expose snapshot creation time (David
           Disseldorp). This will be used to integrate with "Restore Previous
           Versions" feature added in Windows 7 for folks who reexport ceph
           through SMB.
      
         - security xattrs for ceph (Zheng Yan). Only selinux is supported for
           now due to the limitations of ->dentry_init_security().
      
         - support for MSG_ADDR2, FS_BTIME and FS_CHANGE_ATTR features (Jeff
           Layton). This is actually a single feature bit which was missing
           because of the filesystem pieces. With this in, the kernel client
           will finally be reported as "luminous" by "ceph features" -- it is
           still being reported as "jewel" even though all required Luminous
           features were implemented in 4.13.
      
         - stop NULL-terminating ceph vxattrs (Jeff Layton). The convention
           with xattrs is to not terminate and this was causing
           inconsistencies with ceph-fuse.
      
         - change filesystem time granularity from 1 us to 1 ns, again fixing
           an inconsistency with ceph-fuse (Luis Henriques).
      
        On top of this there are some additional dentry name handling and cap
        flushing fixes from Zheng. Finally, Jeff is formally taking over for
        Zheng as the filesystem maintainer"
      
      * tag 'ceph-for-5.3-rc1' of git://github.com/ceph/ceph-client: (71 commits)
        ceph: fix end offset in truncate_inode_pages_range call
        ceph: use generic_delete_inode() for ->drop_inode
        ceph: use ceph_evict_inode to cleanup inode's resource
        ceph: initialize superblock s_time_gran to 1
        MAINTAINERS: take over for Zheng as CephFS kernel client maintainer
        rbd: setallochint only if object doesn't exist
        rbd: support for object-map and fast-diff
        rbd: call rbd_dev_mapping_set() from rbd_dev_image_probe()
        libceph: export osd_req_op_data() macro
        libceph: change ceph_osdc_call() to take page vector for response
        libceph: bump CEPH_MSG_MAX_DATA_LEN (again)
        rbd: new exclusive lock wait/wake code
        rbd: quiescing lock should wait for image requests
        rbd: lock should be quiesced on reacquire
        rbd: introduce copyup state machine
        rbd: rename rbd_obj_setup_*() to rbd_obj_init_*()
        rbd: move OSD request allocation into object request state machines
        rbd: factor out __rbd_osd_setup_discard_ops()
        rbd: factor out rbd_osd_setup_copyup()
        rbd: introduce obj_req->osd_reqs list
        ...
      d9b9c893
    • Linus Torvalds's avatar
      Merge tag 'dax-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 0fe49f70
      Linus Torvalds authored
      Pull dax updates from Dan Williams:
       "The fruits of a bug hunt in the fsdax implementation with Willy and a
        small feature update for device-dax:
      
         - Fix a hang condition that started triggering after the Xarray
           conversion of fsdax in the v4.20 kernel.
      
         - Add a 'resource' (root-only physical base address) sysfs attribute
           to device-dax instances to correlate memory-blocks onlined via the
           kmem driver with a given device instance"
      
      * tag 'dax-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: Fix missed wakeup with PMD faults
        device-dax: Add a 'resource' attribute
      0fe49f70
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f8c3500c
      Linus Torvalds authored
      Pull libnvdimm updates from Dan Williams:
       "Primarily just the virtio_pmem driver:
      
         - virtio_pmem
      
           The new virtio_pmem facility introduces a paravirtualized
           persistent memory device that allows a guest VM to use DAX
           mechanisms to access a host-file with host-page-cache. It arranges
           for MAP_SYNC to be disabled and instead triggers a host fsync()
           when a 'write-cache flush' command is sent to the virtual disk
           device.
      
         - Miscellaneous small fixups"
      
      * tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        virtio_pmem: fix sparse warning
        xfs: disable map_sync for async flush
        ext4: disable map_sync for async flush
        dax: check synchronous mapping is supported
        dm: enable synchronous dax
        libnvdimm: add dax_dev sync flag
        virtio-pmem: Add virtio pmem driver
        libnvdimm: nd_region flush callback support
        libnvdimm, namespace: Drop uuid_t implementation detail
      f8c3500c
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.3-rc1' of git://www.linux-watchdog.org/linux-watchdog · d77e9e4e
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - add Allwinner H6 watchdog
      
       - drop warning after registering device patches
      
       - hpwdt improvements
      
       - gpio: add support for nowayout option
      
       - introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
      
       - convert remaining drivers to use SPDX license identifier
      
       - Fixes and improvements on several watchdog device drivers
      
      * tag 'linux-watchdog-5.3-rc1' of git://www.linux-watchdog.org/linux-watchdog: (74 commits)
        watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe
        watchdog: ie6xx_wdt: Use spinlock_t instead of struct spinlock
        watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend
        watchdog: convert remaining drivers to use SPDX license identifier
        dt-bindings: watchdog: Rename bindings documentation file
        watchdog: mei_wdt: no need to check return value of debugfs_create functions
        watchdog: bcm_kona_wdt: no need to check return value of debugfs_create functions
        docs: watchdog: Fix build error.
        docs: watchdog: convert docs to ReST and rename to *.rst
        watchdog: make the device time out at open_deadline when open_timeout is used
        watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
        watchdog: introduce watchdog.open_timeout commandline parameter
        dt-bindings: watchdog: move i.MX system controller watchdog binding to SCU
        watchdog: imx_sc: Add pretimeout support
        watchdog: renesas_wdt: Add a few cycles delay
        watchdog: gpio: add support for nowayout option
        watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly
        dt-bindings: watchdog: add Allwinner H6 watchdog
        watchdog: jz4740: Avoid starting watchdog in set_timeout
        watchdog: jz4740: Use register names from <linux/mfd/ingenic-tcu.h>
        ...
      d77e9e4e
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2ae048e1
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes.
      
         - The optimization of PM resume with HD-audio HDMI codecs, which
           eventually work around weird issues
      
         - A correction of Intel Icelake HDMI audio code
      
         - Quirks for Dell machines with Realtek HD-audio codecs
      
         - The fix for too long sequencer write stall that was spotted by
           syzkaller
      
         - A few trivial cleanups reported by coccinelle"
      
      * tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
        ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
        ALSA: hda/hdmi - Remove duplicated define
        ALSA: seq: Break too long mutex context in the write loop
        ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine
        ALSA: rme9652: Unneeded variable: "result".
        ALSA: emu10k1: Remove unneeded variable "change"
        ALSA: au88x0: Remove unneeded variable: "changed"
        ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform
        ALSA: ps3: Remove Unneeded variable: "ret"
        ALSA: lx6464es: Remove unneeded variable err
      2ae048e1
    • Linus Torvalds's avatar
      Merge tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d0411ec8
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These modify the Intel RAPL driver to allow it to use an MMIO
        interface to the hardware, make the int340X thermal driver provide
        such an interface for it, add Intel Ice Lake CPU IDs to the RAPL
        driver (these changes depend on the previously merged x86 arch
        changes), update cpufreq to use the PM QoS framework for managing the
        min and max frequency limits, and add update the imx-cpufreq-dt
        cpufreq driver to support i.MX8MN.
      
        Specifics:
      
         - Add MMIO interface support to the Intel RAPL power capping driver
           and update the int340X thermal driver to provide a RAPL MMIO
           interface (Zhang Rui, Stephen Rothwell).
      
         - Add Intel Ice Lake CPU IDs to the RAPL driver (Zhang Rui, Rajneesh
           Bhardwaj).
      
         - Make cpufreq use the PM QoS framework (instead of notifiers) for
           managing the min and max frequency constraints (Viresh Kumar).
      
         - Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson
           Huang)"
      
      * tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits)
        cpufreq: Make cpufreq_generic_init() return void
        intel_rapl: need linux/cpuhotplug.h for enum cpuhp_state
        powercap/rapl: Add Ice Lake NNPI support to RAPL driver
        powercap/intel_rapl: add support for ICX-D
        powercap/intel_rapl: add support for ICX
        powercap/intel_rapl: add support for IceLake desktop
        intel_rapl: Fix module autoloading issue
        int340X/processor_thermal_device: add support for MMIO RAPL
        intel_rapl: support two power limits for every RAPL domain
        intel_rapl: support 64 bit register
        intel_rapl: abstract RAPL common code
        intel_rapl: cleanup hardcoded MSR access
        intel_rapl: cleanup some functions
        intel_rapl: abstract register access operations
        intel_rapl: abstract register address
        intel_rapl: introduce struct rapl_if_private
        intel_rapl: introduce intel_rapl.h
        intel_rapl: remove hardcoded register index
        intel_rapl: use reg instead of msr
        cpufreq: imx-cpufreq-dt: Add i.MX8MN support
        ...
      d0411ec8
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.3-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4b09ddbc
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These get rid of two clang warnings, add a new quirk mechanism to the
        ACPI backlight driver (and apply it to one machine) and update the
        table load object initialization in ACPICA (this is a replacement for
        a previously reverted ACPICA commit).
      
        Specifics:
      
         - Make ACPI table loading work more consistently regardless of the
           exact mechanism used for loading a table (Erik Schmauss).
      
         - Get rid of two clang warnings (Arnd Bergmann).
      
         - Add new quirk mechanism to the ACPI backlight driver and use it to
           add a quirk for PB Easynote MZ35 (Hans de Goede)"
      
      * tag 'acpi-5.3-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
        ACPI: fix false-positive -Wuninitialized warning
        ACPI: blacklist: fix clang warning for unused DMI table
        ACPICA: Update table load object initialization
      4b09ddbc
    • Linus Torvalds's avatar
      Merge branch 'floppy' · 47d6a760
      Linus Torvalds authored
      Merge floppy ioctl verification fixes from Denis Efremov.
      
      This also marks the floppy driver as orphaned - it turns out that Jiri
      no longer has working hardware.
      
      Actual working physical floppy hardware is getting hard to find, and
      while Willy was able to test this, I think the driver can be considered
      pretty much dead from an actual hardware standpoint.  The hardware that
      is still sold seems to be mainly USB-based, which doesn't use this
      legacy driver at all.
      
      The old floppy disk controller is still emulated in various VM
      environments, so the driver isn't going away, but let's see if anybody
      is interested to step up to maintain it.
      
      The lack of hardware also likely means that the ioctl range verification
      fixes are probably mostly relevant to anybody using floppies in a
      virtual environment.  Which is probably also going away in favor of USB
      storage emulation, but who knows.
      
      Will Decon reviewed the patches but I'm not rebasing them just for that,
      so I'll add a
      Reviewed-by: default avatarWill Deacon <will@kernel.org>
      
      here instead.
      
      * floppy:
        MAINTAINERS: mark floppy.c orphaned
        floppy: fix out-of-bounds read in copy_buffer
        floppy: fix invalid pointer dereference in drive_name
        floppy: fix out-of-bounds read in next_valid_format
        floppy: fix div-by-zero in setup_format_params
      47d6a760
    • Jiri Kosina's avatar
      MAINTAINERS: mark floppy.c orphaned · be2ece49
      Jiri Kosina authored
      I volunteered myself to maintain it quite some time ago back when I
      fixed the concurrency issues which exhibited itself only with
      VM-emulated devices, and at the same time I still had the physical 3.5"
      reader to test all the changes.
      
      The reader doesn't work any more though, so I guess it's time to step
      down from this super-prestigious role :p and mark floppy.c as Orphaned.
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      be2ece49
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-misc' and 'acpi-video' · 2c66a5b5
      Rafael J. Wysocki authored
      * acpi-misc:
        ACPI: fix false-positive -Wuninitialized warning
        ACPI: blacklist: fix clang warning for unused DMI table
      
      * acpi-video:
        ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
      2c66a5b5
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 918e162e
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Make cpufreq_generic_init() return void
        cpufreq: imx-cpufreq-dt: Add i.MX8MN support
        cpufreq: Add QoS requests for userspace constraints
        cpufreq: intel_pstate: Reuse refresh_frequency_limits()
        cpufreq: Register notifiers with the PM QoS framework
        PM / QoS: Add support for MIN/MAX frequency constraints
        PM / QOS: Pass request type to dev_pm_qos_read_value()
        PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value()
        PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier()
      918e162e
  2. 17 Jul, 2019 24 commits
    • Denis Efremov's avatar
      floppy: fix out-of-bounds read in copy_buffer · da99466a
      Denis Efremov authored
      This fixes a global out-of-bounds read access in the copy_buffer
      function of the floppy driver.
      
      The FDDEFPRM ioctl allows one to set the geometry of a disk.  The sect
      and head fields (unsigned int) of the floppy_drive structure are used to
      compute the max_sector (int) in the make_raw_rw_request function.  It is
      possible to overflow the max_sector.  Next, max_sector is passed to the
      copy_buffer function and used in one of the memcpy calls.
      
      An unprivileged user could trigger the bug if the device is accessible,
      but requires a floppy disk to be inserted.
      
      The patch adds the check for the .sect * .head multiplication for not
      overflowing in the set_geometry function.
      
      The bug was found by syzkaller.
      Signed-off-by: default avatarDenis Efremov <efremov@ispras.ru>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      da99466a
    • Denis Efremov's avatar
      floppy: fix invalid pointer dereference in drive_name · 9b04609b
      Denis Efremov authored
      This fixes the invalid pointer dereference in the drive_name function of
      the floppy driver.
      
      The native_format field of the struct floppy_drive_params is used as
      floppy_type array index in the drive_name function.  Thus, the field
      should be checked the same way as the autodetect field.
      
      To trigger the bug, one could use a value out of range and set the drive
      parameters with the FDSETDRVPRM ioctl.  Next, FDGETDRVTYP ioctl should
      be used to call the drive_name.  A floppy disk is not required to be
      inserted.
      
      CAP_SYS_ADMIN is required to call FDSETDRVPRM.
      
      The patch adds the check for a value of the native_format field to be in
      the '0 <= x < ARRAY_SIZE(floppy_type)' range of the floppy_type array
      indices.
      
      The bug was found by syzkaller.
      Signed-off-by: default avatarDenis Efremov <efremov@ispras.ru>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b04609b
    • Denis Efremov's avatar
      floppy: fix out-of-bounds read in next_valid_format · 5635f897
      Denis Efremov authored
      This fixes a global out-of-bounds read access in the next_valid_format
      function of the floppy driver.
      
      The values from autodetect field of the struct floppy_drive_params are
      used as indices for the floppy_type array in the next_valid_format
      function 'floppy_type[DP->autodetect[probed_format]].sect'.
      
      To trigger the bug, one could use a value out of range and set the drive
      parameters with the FDSETDRVPRM ioctl.  A floppy disk is not required to
      be inserted.
      
      CAP_SYS_ADMIN is required to call FDSETDRVPRM.
      
      The patch adds the check for values of the autodetect field to be in the
      '0 <= x < ARRAY_SIZE(floppy_type)' range of the floppy_type array indices.
      
      The bug was found by syzkaller.
      Signed-off-by: default avatarDenis Efremov <efremov@ispras.ru>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5635f897
    • Denis Efremov's avatar
      floppy: fix div-by-zero in setup_format_params · f3554aeb
      Denis Efremov authored
      This fixes a divide by zero error in the setup_format_params function of
      the floppy driver.
      
      Two consecutive ioctls can trigger the bug: The first one should set the
      drive geometry with such .sect and .rate values for the F_SECT_PER_TRACK
      to become zero.  Next, the floppy format operation should be called.
      
      A floppy disk is not required to be inserted.  An unprivileged user
      could trigger the bug if the device is accessible.
      
      The patch checks F_SECT_PER_TRACK for a non-zero value in the
      set_geometry function.  The proper check should involve a reasonable
      upper limit for the .sect and .rate fields, but it could change the
      UAPI.
      
      The patch also checks F_SECT_PER_TRACK in the setup_format_params, and
      cancels the formatting operation in case of zero.
      
      The bug was found by syzkaller.
      Signed-off-by: default avatarDenis Efremov <efremov@ispras.ru>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f3554aeb
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.3-2' of git://git.infradead.org/linux-platform-drivers-x86 · 22051d9c
      Linus Torvalds authored
      Pull another x86 platform driver update from Andy Shevchenko:
       "Provide better naming for ABI, i.e. tell that we have fan boost mode.
      
        It won't break any ABI, but has to be done now to avoid confusion in
        the future"
      
      * tag 'platform-drivers-x86-v5.3-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: asus: Rename "fan mode" to "fan boost mode"
      22051d9c
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · aac09ce2
      Linus Torvalds authored
      Pull thermal management updates from Zhang Rui:
      
       - Convert thermal documents to ReST (Mauro Carvalho Chehab)
      
       - Fix a cyclic depedency in between thermal core and governors (Daniel
         Lezcano)
      
       - Fix processor_thermal_device driver to re-evaluate power limits after
         resume (Srinivas Pandruvada, Zhang Rui)
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        drivers: thermal: processor_thermal_device: Fix build warning
        docs: thermal: convert to ReST
        thermal/drivers/core: Use governor table to initialize
        thermal/drivers/core: Add init section table for self-encapsulation
        drivers: thermal: processor_thermal: Read PPCC on resume
      aac09ce2
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · c3c08f93
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
      
       - Revert a SPIO GPIO fix that didn't fix anything but instead created
         new problems.
      
       - Remove the EM GPIO irqdomain in a safe manner.
      
       - Fix a memory leak in the gpio quirks.
      
       - Make the DaVinci error path silent on probe deferral.
      
      * tag 'gpio-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        Revert "gpio/spi: Fix spi-gpio regression on active high CS"
        gpio: em: remove the gpiochip before removing the irq domain
        gpiolib: of: fix a memory leak in of_gpio_flags_quirks()
        gpio: davinci: silence error prints in case of EPROBE_DEFER
      c3c08f93
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc · 57ab5f74
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This contains support for hardware spinlock TI K3 AM65x and J721E
        family of SoCs, support for using hwspinlocks from atomic context and
        better error reporting when dealing with hardware disabled in
        DeviceTree"
      
      * tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc:
        hwspinlock: add the 'in_atomic' API
        hwspinlock: document the hwspinlock 'raw' API
        hwspinlock: stm32: implement the relax() ops
        hwspinlock: ignore disabled device
        hwspinlock/omap: Add a trace during probe
        hwspinlock/omap: Add support for TI K3 SoCs
        dt-bindings: hwlock: Update OMAP binding for TI K3 SoCs
      57ab5f74
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.3' of git://github.com/andersson/remoteproc · fdcec004
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "This adds support for the STM32 remoteproc, additional i.MX platforms
        with Cortex M4 remoteprocs and Qualcomm's QCS404 Compute DSP.
      
        Also initial support for vendor specific resource table entries and
        support for unprocessed Qualcomm firmware files"
      
      * tag 'rproc-v5.3' of git://github.com/andersson/remoteproc:
        remoteproc: stm32: fix building without ARM SMCC
        remoteproc: qcom: q6v5-mss: Fix build error without QCOM_MDT_LOADER
        remoteproc: copy parent dma_pfn_offset for vdev
        remoteproc: qcom: q6v5-mss: Support loading non-split images
        soc: qcom: mdt_loader: Support loading non-split images
        remoteproc: stm32: add an ST stm32_rproc driver
        dt-bindings: remoteproc: add bindings for stm32 remote processor driver
        dt-bindings: stm32: add bindings for ML-AHB interconnect
        remoteproc: Use struct_size() helper
        remoteproc: add vendor resources handling
        remoteproc: imx: Fix typo in "failed"
        remoteproc: imx: Broaden the Kconfig selection logic
        remoteproc,rpmsg: add missing MAINTAINERS file entries
        remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP
        dt-bindings: remoteproc: Rename and amend Hexagon v56 binding
      fdcec004
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc · 7636b758
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "This contains a DT binding update and a change to make the remote
        function of rpmsg_devices optional"
      
      * tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc:
        rpmsg: core: Make remove handler for rpmsg driver optional.
        dt-bindings: soc: qcom: Add remote-pid binding for GLINK SMEM
      7636b758
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 3a1d5384
      Linus Torvalds authored
      Pull virtio, vhost updates from Michael Tsirkin:
       "Fixes, features, performance:
      
         - new iommu device
      
         - vhost guest memory access using vmap (just meta-data for now)
      
         - minor fixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio-mmio: add error check for platform_get_irq
        scsi: virtio_scsi: Use struct_size() helper
        iommu/virtio: Add event queue
        iommu/virtio: Add probe request
        iommu: Add virtio-iommu driver
        PCI: OF: Initialize dev->fwnode appropriately
        of: Allow the iommu-map property to omit untranslated devices
        dt-bindings: virtio: Add virtio-pci-iommu node
        dt-bindings: virtio-mmio: Add IOMMU description
        vhost: fix clang build warning
        vhost: access vq metadata through kernel virtual address
        vhost: factor out setting vring addr and num
        vhost: introduce helpers to get the size of metadata area
        vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch()
        vhost: fine grain userspace memory accessors
        vhost: generalize adding used elem
      3a1d5384
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio · 37d4607e
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - Static symbol cleanup in mdev samples (Kefeng Wang)
      
       - Use vma help in nvlink code (Peng Hao)
      
       - Remove unused code in mbochs sample (YueHaibing)
      
       - Send uevents around mdev registration (Alex Williamson)
      
      * tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio:
        mdev: Send uevents around parent device registration
        sample/mdev/mbochs: remove set but not used variable 'mdev_state'
        vfio: vfio_pci_nvlink2: use a vma helper function
        vfio-mdev/samples: make some symbols static
      37d4607e
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 916f562f
      Linus Torvalds authored
      Pull clk updates from Stephen Boyd:
       "This round of clk driver and framework updates is heavy on the driver
        update side. The two main highlights in the core framework are the
        addition of an bulk clk_get API that handles optional clks and an
        extra debugfs file that tells the developer about the current parent
        of a clk.
      
        The driver updates are dominated by i.MX in the diffstat, but that is
        mostly because that SoC has started converting to the clk_hw style of
        clk registration. The next big update is in the Amlogic meson clk
        driver that gained some support for audio, cpu, and temperature clks
        while fixing some PLL issues. Finally, the biggest thing that stands
        out is the conversion of a large part of the Allwinner sunxi-ng driver
        to the new clk parent scheme that uses less strings and more pointer
        comparisons to match clk parents and children up.
      
        In general, it looks like we have a lot of little fixes and tweaks
        here and there to clk data along with the normal addition of a handful
        of new drivers and a couple new core framework features.
      
        Core:
         - Add a 'clk_parent' file in clk debugfs
         - Add a clk_bulk_get_optional() API (with devm too)
      
        New Drivers:
         - Support gated clk controller on MIPS based BCM63XX SoCs
         - Support SiLabs Si5341 and Si5340 chips
         - Support for CPU clks on Raspberry Pi devices
         - Audsys clock driver for MediaTek MT8516 SoCs
      
        Updates:
         - Convert a large portion of the Allwinner sunxi-ng driver to new clk parent scheme
         - Small frequency support for SiLabs Si544 chips
         - Slow clk support for AT91 SAM9X60 SoCs
         - Remove dead code in various clk drivers (-Wunused)
         - Support for Marvell 98DX1135 SoCs
         - Get duty cycle of generic pwm clks
         - Improvement in mmc phase calculation and cleanup of some rate defintions
         - Switch i.MX6 and i.MX7 clock drivers to clk_hw based APIs
         - Add GPIO, SNVS and GIC clocks for i.MX8 drivers
         - Mark imx6sx/ul/ull/sll MMDC_P1_IPG and imx8mm DRAM_APB as critical clock
         - Correct imx7ulp nic1_bus_clk and imx8mm audio_pll2_clk clock setting
         - Add clks for new Exynos5422 Dynamic Memory Controller driver
         - Clock definition for Exynos4412 Mali
         - Add CMM (Color Management Module) clocks on Renesas R-Car H3, M3-N, E3, and D3
         - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas RZ/G2M
         - Support for 32 bit clock IDs in TI's sci-clks for J721e SoCs
         - TI clock probing done from DT by default instead of firmware
         - Fix Amlogic Meson mpll fractional part and spread sprectrum issues
         - Add Amlogic meson8 audio clocks
         - Add Amlogic g12a temperature sensors clocks
         - Add Amlogic g12a and g12b cpu clocks
         - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas R-Car H3, M3-W, and M3-N
         - Add CMM (Color Management Module) clocks on Renesas R-Car M3-W
         - Add Clock Domain support on Renesas RZ/N1"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (190 commits)
        clk: consoldiate the __clk_get_hw() declarations
        clk: sprd: Add check for return value of sprd_clk_regmap_init()
        clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK
        clk: Add Si5341/Si5340 driver
        dt-bindings: clock: Add silabs,si5341
        clk: clk-si544: Implement small frequency change support
        clk: add BCM63XX gated clock controller driver
        devicetree: document the BCM63XX gated clock bindings
        clk: at91: sckc: use dedicated functions to unregister clock
        clk: at91: sckc: improve error path for sama5d4 sck registration
        clk: at91: sckc: remove unnecessary line
        clk: at91: sckc: improve error path for sam9x5 sck register
        clk: at91: sckc: add support to free slow clock osclillator
        clk: at91: sckc: add support to free slow rc oscillator
        clk: at91: sckc: add support to free slow oscillator
        clk: rockchip: export HDMIPHY clock on rk3228
        clk: rockchip: add watchdog pclk on rk3328
        clk: rockchip: add clock id for hdmi_phy special clock on rk3228
        clk: rockchip: add clock id for watchdog pclk on rk3328
        clk: at91: sckc: add support for SAM9X60
        ...
      916f562f
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · edafb6fe
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "A quiet cycle this time.
      
         - ds1307: properly handle oscillator failure flags
      
         - imx-sc: alarm support
      
         - pcf2123: alarm support, correct offset handling
      
         - sun6i: add R40 support
      
         - simplify getting the adapter of an i2c client"
      
      * tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (37 commits)
        rtc: wm831x: Add IRQF_ONESHOT flag
        rtc: stm32: remove one condition check in stm32_rtc_set_alarm()
        rtc: pcf2123: Fix build error
        rtc: interface: Change type of 'count' from int to u64
        rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
        rtc: pcf8563: Fix interrupt trigger method
        rtc: pcf2123: fix negative offset rounding
        rtc: pcf2123: add alarm support
        rtc: pcf2123: use %ptR
        rtc: pcf2123: port to regmap
        rtc: pcf2123: remove sysfs register view
        rtc: rx8025: simplify getting the adapter of a client
        rtc: rx8010: simplify getting the adapter of a client
        rtc: rv8803: simplify getting the adapter of a client
        rtc: m41t80: simplify getting the adapter of a client
        rtc: fm3130: simplify getting the adapter of a client
        rtc: tegra: Drop MODULE_ALIAS
        rtc: sun6i: Add R40 compatible
        dt-bindings: rtc: sun6i: Add the R40 RTC compatible
        dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
        ...
      edafb6fe
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma · 47ebe00b
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
      
       - Add support in dmaengine core to do device node checks for DT devices
         and update bunch of drivers to use that and remove open coding from
         drivers
      
       - New driver/driver support for new hardware, namely:
           - MediaTek UART APDMA
           - Freescale i.mx7ulp edma2
           - Synopsys eDMA IP core version 0
           - Allwinner H6 DMA
      
       - Updates to axi-dma and support for interleaved cyclic transfers
      
       - Greg's debugfs return value check removals on drivers
      
       - Updates to stm32-dma, hsu, dw, pl330, tegra drivers
      
      * tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits)
        dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support"
        dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback
        Documentation: dmaengine: clean up description of dmatest usage
        dmaengine: tegra210-adma: remove PM_CLK dependency
        dmaengine: fsl-edma: add i.mx7ulp edma2 version support
        dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma
        dmaengine: fsl-edma-common: version check for v2 instead
        dmaengine: fsl-edma-common: move dmamux register to another single function
        dmaengine: fsl-edma: add drvdata for fsl-edma
        dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver"
        dmaengine: rcar-dmac: Reject zero-length slave DMA requests
        dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake
        dmaengine: dw-edma: fix semicolon.cocci warnings
        dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
        dmaengine: dmatest: timeout value of -1 should specify infinite wait
        dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit
        dmaengine: fsl-edma: support little endian for edma driver
        dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
        dmagengine: pl330: add code to get reset property
        dt-bindings: pl330: document the optional resets property
        ...
      47ebe00b
    • Linus Torvalds's avatar
      Merge tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · fa121bb3
      Linus Torvalds authored
      Pull MIPS updates from Paul Burton:
       "A light batch this time around but significant improvements for
        certain systems:
      
         - Removal of readq & writeq for MIPS32 kernels where they would
           simply BUG() anyway, allowing drivers or other code that #ifdefs on
           their presence to work properly.
      
         - Improvements for Ingenic JZ4740 systems, including support for the
           external memory controller & pinmuxing fixes for qi_lb60/NanoNote
           systems.
      
         - Improvements for Lantiq systems, in particular around SMP & IPIs.
      
         - DT updates for ralink/MediaTek MT7628a systems to probe & configure
           a bunch more devices.
      
         - Miscellaneous cleanups & build fixes"
      
      * tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
        MIPS: fix some more fall through errors in arch/mips
        MIPS: perf events: handle switch statement falling through warnings
        mips/kprobes: Export kprobe_fault_handler()
        MAINTAINERS: Add myself as Ingenic SoCs maintainer
        MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node
        MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node
        MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node
        MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes
        MIPS: ralink: mt7628a.dtsi: Add pinmux DT node
        MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier
        MIPS: lantiq: Add SMP support for lantiq interrupt controller
        MIPS: lantiq: Shorten register names, remove unused macros
        MIPS: lantiq: Fix bitfield masking
        MIPS: lantiq: Remove unused macros
        MIPS: lantiq: Fix attributes of of_device_id structure
        MIPS: lantiq: Change variables to the same type as the source
        MIPS: lantiq: Move macro directly to iomem function
        mips: Remove q-accessors from non-64bit platforms
        FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h
        MIPS: configs: Remove useless UEVENT_HELPER_PATH
        ...
      fa121bb3
    • Linus Torvalds's avatar
      Merge tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux · 7d4901c0
      Linus Torvalds authored
      Pull h8300 update from Yoshinori Sato:
       "Remove unused barrier defines"
      
      * tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
        H8300: remove unused barrier defines
      7d4901c0
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux · 415bfd9c
      Linus Torvalds authored
      Pull SH updates from Yoshinori Sato.
      
      kprobe fix, defconfig updates and a SH Kconfig fix.
      
      * tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
        arch/sh: Check for kprobe trap number before trying to handle a kprobe trap
        sh: configs: Remove useless UEVENT_HELPER_PATH
        Fix allyesconfig output.
      415bfd9c
    • Daniel Drake's avatar
      platform/x86: asus: Rename "fan mode" to "fan boost mode" · 9af93db9
      Daniel Drake authored
      The Asus WMI spec indicates that the function being controlled here
      is called "Fan Boost Mode". The user-facing documentation also calls it
      this.
      
      The spec uses the term "fan mode" is used to refer to other things,
      including functionality expected to appear on future products.
      We missed this before as we are not dealing with the most readable of
      specs, and didn't forsee any confusion around shortening the name.
      
      Rename "fan mode" to "fan boost mode" to improve consistency with the
      spec and to avoid a future naming conflict.
      
      There is no interface breakage here since this has yet to be included
      in an official kernel release. I also updated the kernel version listed
      under ABI accordingly.
      Signed-off-by: default avatarDaniel Drake <drake@endlessm.com>
      Acked-by: default avatarYurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      9af93db9
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 57a8ec38
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
       "VM:
         - z3fold fixes and enhancements by Henry Burns and Vitaly Wool
      
         - more accurate reclaimed slab caches calculations by Yafang Shao
      
         - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
           Christoph Hellwig
      
         - !CONFIG_MMU fixes by Christoph Hellwig
      
         - new novmcoredd parameter to omit device dumps from vmcore, by
           Kairui Song
      
         - new test_meminit module for testing heap and pagealloc
           initialization, by Alexander Potapenko
      
         - ioremap improvements for huge mappings, by Anshuman Khandual
      
         - generalize kprobe page fault handling, by Anshuman Khandual
      
         - device-dax hotplug fixes and improvements, by Pavel Tatashin
      
         - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
      
         - add pte_devmap() support for arm64, by Robin Murphy
      
         - unify locked_vm accounting with a helper, by Daniel Jordan
      
         - several misc fixes
      
        core/lib:
         - new typeof_member() macro including some users, by Alexey Dobriyan
      
         - make BIT() and GENMASK() available in asm, by Masahiro Yamada
      
         - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
           code generation, by Alexey Dobriyan
      
         - rbtree code size optimizations, by Michel Lespinasse
      
         - convert struct pid count to refcount_t, by Joel Fernandes
      
        get_maintainer.pl:
         - add --no-moderated switch to skip moderated ML's, by Joe Perches
      
        misc:
         - ptrace PTRACE_GET_SYSCALL_INFO interface
      
         - coda updates
      
         - gdb scripts, various"
      
      [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
        fs/select.c: use struct_size() in kmalloc()
        mm: add account_locked_vm utility function
        arm64: mm: implement pte_devmap support
        mm: introduce ARCH_HAS_PTE_DEVMAP
        mm: clean up is_device_*_page() definitions
        mm/mmap: move common defines to mman-common.h
        mm: move MAP_SYNC to asm-generic/mman-common.h
        device-dax: "Hotremove" persistent memory that is used like normal RAM
        mm/hotplug: make remove_memory() interface usable
        device-dax: fix memory and resource leak if hotplug fails
        include/linux/lz4.h: fix spelling and copy-paste errors in documentation
        ipc/mqueue.c: only perform resource calculation if user valid
        include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
        scripts/gdb: add helpers to find and list devices
        scripts/gdb: add lx-genpd-summary command
        drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
        kernel/pid.c: convert struct pid count to refcount_t
        drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
        select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
        select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
        ...
      57a8ec38
    • Pankaj Gupta's avatar
      virtio_pmem: fix sparse warning · 8c2e408e
      Pankaj Gupta authored
      This patch fixes below sparse warning related to __virtio
      type in virtio pmem driver. This is reported by Intel test
      bot on linux-next tree.
      
      nd_virtio.c:56:28: warning: incorrect type in assignment
                                      (different base types)
      nd_virtio.c:56:28:    expected unsigned int [unsigned] [usertype] type
      nd_virtio.c:56:28:    got restricted __virtio32
      nd_virtio.c:93:59: warning: incorrect type in argument 2
                                      (different base types)
      nd_virtio.c:93:59:    expected restricted __virtio32 [usertype] val
      nd_virtio.c:93:59:    got unsigned int [unsigned] [usertype] ret
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarPankaj Gupta <pagupta@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      8c2e408e
    • Matthew Wilcox (Oracle)'s avatar
      dax: Fix missed wakeup with PMD faults · 23c84eb7
      Matthew Wilcox (Oracle) authored
      RocksDB can hang indefinitely when using a DAX file.  This is due to
      a bug in the XArray conversion when handling a PMD fault and finding a
      PTE entry.  We use the wrong index in the hash and end up waiting on
      the wrong waitqueue.
      
      There's actually no need to wait; if we find a PTE entry while looking
      for a PMD entry, we can return immediately as we know we should fall
      back to a PTE fault (which may not conflict with the lock held).
      
      We reuse the XA_RETRY_ENTRY to signal a conflicting entry was found.
      This value can never be found in an XArray while holding its lock, so
      it does not create an ambiguity.
      
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/CAPcyv4hwHpX-MkUEqxwdTj7wCCZCN4RV-L4jsnuwLGyL_UEG4A@mail.gmail.com
      Fixes: b15cd800 ("dax: Convert page fault handlers to XArray")
      Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Tested-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reported-by: default avatarRobert Barror <robert.barror@intel.com>
      Reported-by: default avatarSeema Pandit <seema.pandit@intel.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      23c84eb7
    • Gustavo A. R. Silva's avatar
      fs/select.c: use struct_size() in kmalloc() · 43e11fa2
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array.  For example:
      
        struct foo {
             int stuff;
             struct boo entry[];
        };
      
        size = sizeof(struct foo) + count * sizeof(struct boo);
        instance = kmalloc(size, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
        instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      Also, notice that variable size is unnecessary, hence it is removed.
      
      This code was detected with the help of Coccinelle.
      
      Link: http://lkml.kernel.org/r/20190604164226.GA13823@embeddedorSigned-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      43e11fa2
    • Daniel Jordan's avatar
      mm: add account_locked_vm utility function · 79eb597c
      Daniel Jordan authored
      locked_vm accounting is done roughly the same way in five places, so
      unify them in a helper.
      
      Include the helper's caller in the debug print to distinguish between
      callsites.
      
      Error codes stay the same, so user-visible behavior does too.  The one
      exception is that the -EPERM case in tce_account_locked_vm is removed
      because Alexey has never seen it triggered.
      
      [daniel.m.jordan@oracle.com: v3]
        Link: http://lkml.kernel.org/r/20190529205019.20927-1-daniel.m.jordan@oracle.com
      [sfr@canb.auug.org.au: fix mm/util.c]
      Link: http://lkml.kernel.org/r/20190524175045.26897-1-daniel.m.jordan@oracle.comSigned-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: Alan Tull <atull@kernel.org>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Moritz Fischer <mdf@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Steve Sistare <steven.sistare@oracle.com>
      Cc: Wu Hao <hao.wu@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79eb597c