1. 06 5月, 2017 11 次提交
    • L
      Merge tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · e87d51ac
      Linus Torvalds 提交于
      Pull media updates from Mauro Carvalho Chehab:
       "Media updates for v4.12-rc1:
      
         - new driver to support mediatek jpeg in hardware codec
      
         - rc-lirc, s5p-cec and st-cec staging drivers got promoted
      
         - hardware histogram support for vsp1 driver
      
         - added Virtual Media Controller driver, to make easier to test the
           media controller
      
         - added a new CEC driver (rainshadow-cec)
      
         - removed two staging LIRC drivers for obscure hardware that are too
           obsolete
      
         - added support for Intel SR300 Depth camera
      
         - some improvements at CEC and RC core
      
         - lots of driver cleanups, improvements all over the tree
      
        With this series, we're finally getting rid of the LIRC staging
        driver. There's just one left (lirc_zilog), with require more care,
        as part of its functionality (IR RX) is already provided by another
        driver. Work in progress to convert it on the proper way"
      
      * tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (304 commits)
        [media] ov2640: print error if devm_*_optional*() fails
        [media] atmel-isc: Fix the static checker warning
        [media] ov2640: add support for MEDIA_BUS_FMT_YVYU8_2X8 and MEDIA_BUS_FMT_VYUY8_2X8
        [media] ov2640: fix vflip control
        [media] ov2640: fix duplicate width+height returning from ov2640_select_win()
        [media] ov2640: add missing write to size change preamble
        [media] ov2640: add information about DSP register 0xc7
        [media] ov2640: improve banding filter register definitions/documentation
        [media] ov2640: fix init sequence alignment
        [media] ov2640: make GPIOLIB an optional dependency
        [media] xc5000: fix spelling mistake: "calibration"
        [media] vidioc-queryctrl.rst: fix menu/int menu references
        [media] media-entity: only call dev_dbg_obj if mdev is not NULL
        [media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-'
        [media] mtk-vcodec: avoid warnings because of empty macros
        [media] coda: bump maximum number of internal framebuffers to 17
        [media] media: mtk-vcodec: remove informative log
        [media] subdev-formats.rst: remove spurious '-'
        [media] dw2102: limit messages to buffer size
        [media] ttusb2: limit messages to buffer size
        ...
      e87d51ac
    • L
      Merge tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux · bdc713bf
      Linus Torvalds 提交于
      Pull drm CoC pointer from Dave Airlie:
       "Small supplementary pull request. I didn't want anyone saying we snuck
        this in in a the middle of a big pile of changes, so here is a clearly
        separate pull request documenting the code of conduct introduced for
        freedesktop.org and how it relates to dri-devel community"
      
      * tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux:
        drm: Document code of conduct
      bdc713bf
    • L
      Merge tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux · 1062ae49
      Linus Torvalds 提交于
      Pull drm tegra updates from Dave Airlie:
       "I missed a pull request from Thierry, this stuff has been in
        linux-next for a while anyways.
      
        It does contain a branch from the iommu tree, but Thierry said it
        should be fine"
      
      * tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux:
        gpu: host1x: Fix host1x driver shutdown
        gpu: host1x: Support module reset
        gpu: host1x: Sort includes alphabetically
        drm/tegra: Add VIC support
        dt-bindings: Add bindings for the Tegra VIC
        drm/tegra: Add falcon helper library
        drm/tegra: Add Tegra DRM allocation API
        drm/tegra: Add tiling FB modifiers
        drm/tegra: Don't leak kernel pointer to userspace
        drm/tegra: Protect IOMMU operations by mutex
        drm/tegra: Enable IOVA API when IOMMU support is enabled
        gpu: host1x: Add IOMMU support
        gpu: host1x: Fix potential out-of-bounds access
        iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
        iommu: Add dummy implementations for !IOMMU_IOVA
        MAINTAINERS: Add related headers to IOMMU section
        iommu/iova: Consolidate code for adding new node to iovad domain rbtree
      1062ae49
    • L
      Merge tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 1a5fb64f
      Linus Torvalds 提交于
      Pull GFS2 updates from Bob Peterson:
       "We've got ten GFS2 patches for this merge window.
      
         - Andreas Gruenbacher wrote a patch to replace the deprecated call to
           rhashtable_walk_init with rhashtable_walk_enter.
      
         - Andreas also wrote a patch to eliminate redundant code in two of
           our debugfs sequence files.
      
         - Andreas also cleaned up the rhashtable key ugliness Linus pointed
           out during this cycle, following Linus's suggestions.
      
         - Andreas also wrote a patch to take advantage of his new function
           rhashtable_lookup_get_insert_fast. This makes glock lookup faster
           and more bullet-proof.
      
         - Andreas also wrote a patch to revert a patch in the evict path that
           caused occasional deadlocks, and is no longer needed.
      
         - Andrew Price wrote a patch to re-enable fallocate for the rindex
           system file to enable gfs2_grow to grow properly on secondary file
           system grow operations.
      
         - I wrote a patch to initialize an inode number field to make certain
           kernel trace points more understandable.
      
         - I also wrote a patch that makes GFS2 file system "withdraw" work
           more like it should by ignoring operations after a withdraw that
           would formerly cause a BUG() and kernel panic.
      
         - I also reworked the entire truncate/delete algorithm, scrapping the
           old recursive algorithm in favor of a new non-recursive algorithm.
           This was done for performance: This way, GFS2 no longer needs to
           lock multiple resource groups while doing truncates and deletes of
           files that cross multiple resource group boundaries, allowing for
           better parallelism. It also solves a problem whereby deleting large
           files would request a large chunk of kernel memory, which resulted
           in a get_page_from_freelist warning.
      
         - Due to a regression found during testing, I added a new patch to
           correct 'GFS2: Prevent BUG from occurring when normal Withdraws
           occur'."
      
      * tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        GFS2: Allow glocks to be unlocked after withdraw
        GFS2: Non-recursive delete
        gfs2: Re-enable fallocate for the rindex
        Revert "GFS2: Wait for iopen glock dequeues"
        gfs2: Switch to rhashtable_lookup_get_insert_fast
        GFS2: Temporarily zero i_no_addr when creating a dinode
        gfs2: Don't pack struct lm_lockname
        gfs2: Deduplicate gfs2_{glocks,glstats}_open
        gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter
        GFS2: Prevent BUG from occurring when normal Withdraws occur
      1a5fb64f
    • L
      Merge tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · aeced661
      Linus Torvalds 提交于
      Pull orangefs updates from Mike Marshall:
       "Orangefs cleanups, fixes and statx support.
      
        Some cleanups:
      
         - remove unused get_fsid_from_ino
         - fix bounds check for listxattr
         - clean up oversize xattr validation
         - do not set getattr_time on orangefs_lookup
         - return from orangefs_devreq_read quickly if possible
         - do not wait for timeout if umounting
         - handle zero size write in debugfs
      
        Bug fixes:
      
         - do not check possibly stale size on truncate
         - ensure the userspace component is unmounted if mount fails
         - total reimplementation of dir.c
      
        New feature:
      
         - implement statx
      
        The new implementation of dir.c is kind of a big deal, all new code.
        It has been posted to fs-devel during the previous rc period, we
        didn't get much review or feedback from there, but it has been
        reviewed very heavily here, so much so that we have two entire
        versions of the reimplementation.
      
        Not only does the new implementation fix some xfstests, but it passes
        all the new tests we made here that involve seeking and rewinding and
        giant directories and long file names. The new dir code has three
        patches itself:
      
         - skip forward to the next directory entry if seek is short
         - invalidate stored directory on seek
         - count directory pieces correctly"
      
      * tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: count directory pieces correctly
        orangefs: invalidate stored directory on seek
        orangefs: skip forward to the next directory entry if seek is short
        orangefs: handle zero size write in debugfs
        orangefs: do not wait for timeout if umounting
        orangefs: return from orangefs_devreq_read quickly if possible
        orangefs: ensure the userspace component is unmounted if mount fails
        orangefs: do not check possibly stale size on truncate
        orangefs: implement statx
        orangefs: remove ORANGEFS_READDIR macros
        orangefs: support very large directories
        orangefs: support llseek on directories
        orangefs: rewrite readdir to fix several bugs
        orangefs: do not set getattr_time on orangefs_lookup
        orangefs: clean up oversize xattr validation
        orangefs: fix bounds check for listxattr
        orangefs: remove unused get_fsid_from_ino
      aeced661
    • L
      Merge tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs · 414975eb
      Linus Torvalds 提交于
      Pull befs fix from Luis de Bethencourt:
       "One fix from Fabian Frederick making the nfs client still work after a
        cache drop"
      
      * tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs:
        befs: make export work with cold dcache
      414975eb
    • L
      Merge tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux · 58017a3e
      Linus Torvalds 提交于
      Pull initramfs fix from Stafford Horne:
       "This is a fix for an issue that has caused 4.11 to not boot on
        OpenRISC. I should have caught this during the 4.11 cycle but I had
        been busy on testing some other series of patches.
      
        I would have considered pushing it though a different path but Al Viro
        suggested submitting directly to you.
      
        Also, its just one as I havent really got anything else ready on my
        queue for 4.12.
      
        Summary:
      
         - Ensure fput() flush is done even for builtin initramfs"
      
      * tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux:
        initramfs: Always do fput() and load modules after rootfs populate
      58017a3e
    • B
      GFS2: Allow glocks to be unlocked after withdraw · ed17545d
      Bob Peterson 提交于
      This bug fixes a regression introduced by patch 0d1c7ae9.
      
      The intent of the patch was to stop promoting glocks after a
      file system is withdrawn due to a variety of errors, because doing
      so results in a BUG(). (You should be able to unmount after a
      withdraw rather than having the kernel panic.)
      
      Unfortunately, it also stopped demotions, so glocks could not be
      unlocked after withdraw, which means the unmount would hang.
      
      This patch allows function do_xmote to demote locks to an
      unlocked state after a withdraw, but not promote them.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      ed17545d
    • L
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · ab182e67
      Linus Torvalds 提交于
      Pull arm64 updates from Catalin Marinas:
      
       - kdump support, including two necessary memblock additions:
         memblock_clear_nomap() and memblock_cap_memory_range()
      
       - ARMv8.3 HWCAP bits for JavaScript conversion instructions, complex
         numbers and weaker release consistency
      
       - arm64 ACPI platform MSI support
      
       - arm perf updates: ACPI PMU support, L3 cache PMU in some Qualcomm
         SoCs, Cortex-A53 L2 cache events and DTLB refills, MAINTAINERS update
         for DT perf bindings
      
       - architected timer errata framework (the arch/arm64 changes only)
      
       - support for DMA_ATTR_FORCE_CONTIGUOUS in the arm64 iommu DMA API
      
       - arm64 KVM refactoring to use common system register definitions
      
       - remove support for ASID-tagged VIVT I-cache (no ARMv8 implementation
         using it and deprecated in the architecture) together with some
         I-cache handling clean-up
      
       - PE/COFF EFI header clean-up/hardening
      
       - define BUG() instruction without CONFIG_BUG
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (92 commits)
        arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS
        arm64: Print DT machine model in setup_machine_fdt()
        arm64: pmu: Wire-up Cortex A53 L2 cache events and DTLB refills
        arm64: module: split core and init PLT sections
        arm64: pmuv3: handle pmuv3+
        arm64: Add CNTFRQ_EL0 trap handler
        arm64: Silence spurious kbuild warning on menuconfig
        arm64: pmuv3: use arm_pmu ACPI framework
        arm64: pmuv3: handle !PMUv3 when probing
        drivers/perf: arm_pmu: add ACPI framework
        arm64: add function to get a cpu's MADT GICC table
        drivers/perf: arm_pmu: split out platform device probe logic
        drivers/perf: arm_pmu: move irq request/free into probe
        drivers/perf: arm_pmu: split cpu-local irq request/free
        drivers/perf: arm_pmu: rename irq request/free functions
        drivers/perf: arm_pmu: handle no platform_device
        drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs()
        drivers/perf: arm_pmu: factor out pmu registration
        drivers/perf: arm_pmu: fold init into alloc
        drivers/perf: arm_pmu: define armpmu_init_fn
        ...
      ab182e67
    • L
      Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 7246f600
      Linus Torvalds 提交于
      Pull powerpc updates from Michael Ellerman:
       "Highlights include:
      
         - Larger virtual address space on 64-bit server CPUs. By default we
           use a 128TB virtual address space, but a process can request access
           to the full 512TB by passing a hint to mmap().
      
         - Support for the new Power9 "XIVE" interrupt controller.
      
         - TLB flushing optimisations for the radix MMU on Power9.
      
         - Support for CAPI cards on Power9, using the "Coherent Accelerator
           Interface Architecture 2.0".
      
         - The ability to configure the mmap randomisation limits at build and
           runtime.
      
         - Several small fixes and cleanups to the kprobes code, as well as
           support for KPROBES_ON_FTRACE.
      
         - Major improvements to handling of system reset interrupts,
           correctly treating them as NMIs, giving them a dedicated stack and
           using a new hypervisor call to trigger them, all of which should
           aid debugging and robustness.
      
         - Many fixes and other minor enhancements.
      
        Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Alistair Popple,
        Andrew Donnellan, Aneesh Kumar K.V, Anshuman Khandual, Anton
        Blanchard, Balbir Singh, Ben Hutchings, Benjamin Herrenschmidt,
        Bhupesh Sharma, Chris Packham, Christian Zigotzky, Christophe Leroy,
        Christophe Lombard, Daniel Axtens, David Gibson, Gautham R. Shenoy,
        Gavin Shan, Geert Uytterhoeven, Guilherme G. Piccoli, Hamish Martin,
        Hari Bathini, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Mahesh J
        Salgaonkar, Mahesh Salgaonkar, Masami Hiramatsu, Matt Brown, Matthew
        R. Ochs, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Oliver
        O'Halloran, Pan Xinhui, Paul Mackerras, Rashmica Gupta, Russell
        Currey, Sukadev Bhattiprolu, Thadeu Lima de Souza Cascardo, Tobin C.
        Harding, Tyrel Datwyler, Uma Krishnan, Vaibhav Jain, Vipin K Parashar,
        Yang Shi"
      
      * tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits)
        powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it
        powerpc/powernv: Fix TCE kill on NVLink2
        powerpc/mm/radix: Drop support for CPUs without lockless tlbie
        powerpc/book3s/mce: Move add_taint() later in virtual mode
        powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body
        powerpc/smp: Document irq enable/disable after migrating IRQs
        powerpc/mpc52xx: Don't select user-visible RTAS_PROC
        powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset()
        powerpc/eeh: Clean up and document event handling functions
        powerpc/eeh: Avoid use after free in eeh_handle_special_event()
        cxl: Mask slice error interrupts after first occurrence
        cxl: Route eeh events to all drivers in cxl_pci_error_detected()
        cxl: Force context lock during EEH flow
        powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST
        powerpc/xmon: Teach xmon oops about radix vectors
        powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids
        powerpc/pseries: Enable VFIO
        powerpc/powernv: Fix iommu table size calculation hook for small tables
        powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc
        powerpc: Add arch/powerpc/tools directory
        ...
      7246f600
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · e579dde6
      Linus Torvalds 提交于
      Pull namespace updates from Eric Biederman:
       "This is a set of small fixes that were mostly stumbled over during
        more significant development. This proc fix and the fix to
        posix-timers are the most significant of the lot.
      
        There is a lot of good development going on but unfortunately it
        didn't quite make the merge window"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        proc: Fix unbalanced hard link numbers
        signal: Make kill_proc_info static
        rlimit: Properly call security_task_setrlimit
        signal: Remove unused definition of sig_user_definied
        ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET
        ipc: Remove unused declaration of recompute_msgmni
        posix-timers: Correct sanity check in posix_cpu_nsleep
        sysctl: Remove dead register_sysctl_root
      e579dde6
  2. 05 5月, 2017 23 次提交
    • C
      arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS · 92f66f84
      Catalin Marinas 提交于
      While honouring the DMA_ATTR_FORCE_CONTIGUOUS on arm64 (commit
      44176bb3: "arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to
      IOMMU"), the existing uses of dma_mmap_attrs() and dma_get_sgtable()
      have been broken by passing a physically contiguous vm_struct with an
      invalid pages pointer through the common iommu API.
      
      Since the coherent allocation with DMA_ATTR_FORCE_CONTIGUOUS uses CMA,
      this patch simply reuses the existing swiotlb logic for mmap and
      get_sgtable.
      
      Note that the current implementation of get_sgtable (both swiotlb and
      iommu) is broken if dma_declare_coherent_memory() is used since such
      memory does not have a corresponding struct page. To be addressed in a
      subsequent patch.
      
      Fixes: 44176bb3 ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU")
      Reported-by: NAndrzej Hajda <a.hajda@samsung.com>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Tested-by: NAndrzej Hajda <a.hajda@samsung.com>
      Reviewed-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      92f66f84
    • F
      befs: make export work with cold dcache · dcfd9b21
      Fabian Frederick 提交于
      based on commit b3b42c0d
      ("fs/affs: make export work with cold dcache")
      
      This adds get_parent function so that nfs client can still work after
      cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Signed-off-by: NLuis de Bethencourt <luisbg@osg.samsung.com>
      dcfd9b21
    • S
      initramfs: Always do fput() and load modules after rootfs populate · 17a9be31
      Stafford Horne 提交于
      In OpenRISC we do not have a bootloader passed initrd, but the built in
      initramfs does contain the /init and other binaries, including modules.
      The previous commit 08865514 ("initramfs: finish fput() before
      accessing any binary from initramfs") made a change to only call fput()
      if the bootloader initrd was available, this caused intermittent crashes
      for OpenRISC.
      
      This patch changes the fput() to happen unconditionally if any rootfs is
      loaded. Also, I added some comments to make it a bit more clear why we
      call unpack_to_rootfs() multiple times.
      
      Fixes: 08865514 ("initramfs: finish fput() before accessing any binary from initramfs")
      Cc: stable@vger.kernel.org
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      17a9be31
    • L
      Merge tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · af82455f
      Linus Torvalds 提交于
      Pull char/misc driver updates from Greg KH:
       "Here is the big set of new char/misc driver drivers and features for
        4.12-rc1.
      
        There's lots of new drivers added this time around, new firmware
        drivers from Google, more auxdisplay drivers, extcon drivers, fpga
        drivers, and a bunch of other driver updates. Nothing major, except if
        you happen to have the hardware for these drivers, and then you will
        be happy :)
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits)
        firmware: google memconsole: Fix return value check in platform_memconsole_init()
        firmware: Google VPD: Fix return value check in vpd_platform_init()
        goldfish_pipe: fix build warning about using too much stack.
        goldfish_pipe: An implementation of more parallel pipe
        fpga fr br: update supported version numbers
        fpga: region: release FPGA region reference in error path
        fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe()
        mei: drop the TODO from samples
        firmware: Google VPD sysfs driver
        firmware: Google VPD: import lib_vpd source files
        misc: lkdtm: Add volatile to intentional NULL pointer reference
        eeprom: idt_89hpesx: Add OF device ID table
        misc: ds1682: Add OF device ID table
        misc: tsl2550: Add OF device ID table
        w1: Remove unneeded use of assert() and remove w1_log.h
        w1: Use kernel common min() implementation
        uio_mf624: Align memory regions to page size and set correct offsets
        uio_mf624: Refactor memory info initialization
        uio: Allow handling of non page-aligned memory regions
        hangcheck-timer: Fix typo in comment
        ...
      af82455f
    • D
      drm: Document code of conduct · 8676df50
      Daniel Vetter 提交于
      freedesktop.org has adopted a formal&enforced code of conduct:
      
      https://www.fooishbar.org/blog/fdo-contributor-covenant/
      https://www.freedesktop.org/wiki/CodeOfConduct/
      
      Besides formalizing things a bit more I don't think this changes
      anything for us, we've already peer-enforced respectful and
      constructive interactions since a long time. But it's good to document
      things properly.
      
      v2: Drop confusing note from commit message and clarify the grammer
      (Chris, Alex and others).
      
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: tfheen@err.no
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Reviewed-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NArchit Taneja <architt@codeaurora.org>
      Reviewed-by: NMartin Peres <martin.peres@free.fr>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NVincent Abriou <vincent.abriou@st.com>
      Acked-by: NNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Acked-by: NBrian Starkey <brian.starkey@arm.com>
      Acked-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Acked-by: NGustavo Padovan <gustavo.padovan@collabora.com>
      Acked-by: NMichel Dänzer <michel.daenzer@amd.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NKeith Packard <keithp@keithp.com>
      Acked-by: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Acked-by: NAdam Jackson <ajax@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8676df50
    • D
      Merge tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next · 644b4930
      Dave Airlie 提交于
      drm/tegra: Changes for v4.12-rc1
      
      This contains various fixes to the host1x driver as well as a plug for a
      leak of kernel pointers to userspace.
      
      A fairly big addition this time around is the Video Image Composer (VIC)
      support that can be used to accelerate some 2D and image compositing
      operations.
      
      Furthermore the driver now supports FB modifiers, so we no longer rely
      on a custom IOCTL to set those.
      
      Finally this contains a few preparatory patches for Tegra186 support
      which unfortunately didn't quite make it this time, but will hopefully
      be ready for v4.13.
      
      * tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux:
        gpu: host1x: Fix host1x driver shutdown
        gpu: host1x: Support module reset
        gpu: host1x: Sort includes alphabetically
        drm/tegra: Add VIC support
        dt-bindings: Add bindings for the Tegra VIC
        drm/tegra: Add falcon helper library
        drm/tegra: Add Tegra DRM allocation API
        drm/tegra: Add tiling FB modifiers
        drm/tegra: Don't leak kernel pointer to userspace
        drm/tegra: Protect IOMMU operations by mutex
        drm/tegra: Enable IOVA API when IOMMU support is enabled
        gpu: host1x: Add IOMMU support
        gpu: host1x: Fix potential out-of-bounds access
        iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
        iommu: Add dummy implementations for !IOMMU_IOVA
        MAINTAINERS: Add related headers to IOMMU section
        iommu/iova: Consolidate code for adding new node to iovad domain rbtree
      644b4930
    • L
      Merge tag 'driver-core-4.12-rc1' of... · 0be75179
      Linus Torvalds 提交于
      Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core updates from Greg KH:
       "Very tiny pull request for 4.12-rc1 for the driver core this time
        around.
      
        There are some documentation fixes, an eventpoll.h fixup to make it
        easier for the libc developers to take our header files directly, and
        some very minor driver core fixes and changes.
      
        All have been in linux-next for a very long time with no reported
        issues"
      
      * tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Revert "kref: double kref_put() in my_data_handler()"
        driver core: don't initialize 'parent' in device_add()
        drivers: base: dma-mapping: use nth_page helper
        Documentation/ABI: add information about cpu_capacity
        debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE
        eventpoll.h: add missing epoll event masks
        eventpoll.h: fix epoll event masks
      0be75179
    • L
      Merge tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 8f28472a
      Linus Torvalds 提交于
      Pull USB updates from Greg KH:
       "Here is the big USB patchset for 4.12-rc1.
      
        Lots of good stuff here, after many many many attempts, the kernel
        finally has a working typeC interface, many thanks to Heikki and
        Guenter and others who have taken the time to get this merged. It
        wasn't an easy path for them at all.
      
        There's also a staging driver that uses this new api, which is why
        it's coming in through this tree.
      
        Along with that, there's the usual huge number of changes for gadget
        drivers, xhci, and other stuff. Johan also finally refactored pretty
        much every driver that was looking at USB endpoints to do it in a
        common way, which will help prevent any "badly-formed" devices from
        causing problems in drivers. That too wasn't a simple task.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits)
        staging: typec: Fairchild FUSB302 Type-c chip driver
        staging: typec: Type-C Port Controller Interface driver (tcpci)
        staging: typec: USB Type-C Port Manager (tcpm)
        usb: host: xhci: remove #ifdef around PM functions
        usb: musb: don't mark of_dev_auxdata as initdata
        usb: misc: legousbtower: Fix buffers on stack
        USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"
        usb: Make sure usb/phy/of gets built-in
        USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h
        usb: host: xhci: print correct command ring address
        usb: host: xhci: delete sp_dma_buffers for scratchpad
        usb: host: xhci: using correct specification chapter reference for DCBAAP
        xhci: switch to pci_alloc_irq_vectors
        usb: host: xhci-plat: set resume_quirk() for R-Car controllers
        usb: host: xhci-plat: add resume_quirk()
        usb: host: xhci-plat: enable clk in resume timing
        usb: host: plat: Enable xHCI plat runtime PM
        USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
        USB: serial: constify static arrays
        usb: fix some references for /proc/bus/usb
        ...
      8f28472a
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4ac4d584
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) The wireless rate info fix from Johannes Berg.
      
       2) When a RAW socket is in hdrincl mode, we need to make sure that the
          user provided at least a minimally sized ipv4/ipv6 header. Fix from
          Alexander Potapenko.
      
       3) We must emit IFLA_PHYS_PORT_NAME netlink attributes using
          nla_put_string() so that it is NULL terminated.
      
       4) Fix a bug in TCP fastopen handling, wherein child sockets
          erroneously inherit the fastopen_req from the parent, and later can
          end up derefencing freed memory or doing a double free. From Eric
          Dumazet.
      
       5) Don't clear out netdev stats at close time in tg3 driver, from
          YueHaibing.
      
       6) Fix refcount leak in xt_CT, from Gao Feng.
      
       7) In nft_set_bitmap() don't leak dummy elements, from Liping Zhang.
      
       8) Fix deadlock due to taking the expectation lock twice, also from
          Liping Zhang.
      
       9) Make xt_socket work again with ipv6, from Peter Tirsek.
      
      10) Don't allow IPV6 to be used with IPVS if ipv6.disable=1, from Paolo
          Abeni.
      
      11) Make the BPF loader more flexible wrt. changes to the bpf MAP entry
          layout. From Jesper Dangaard Brouer.
      
      12) Fix ethtool reported device name in aquantia driver, from Pavel
          Belous.
      
      13) Fix build failures due to the compile time size test not working in
          netfilter conntrack. From Geert Uytterhoeven.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
        cfg80211: make RATE_INFO_BW_20 the default
        ipv6: initialize route null entry in addrconf_init()
        qede: Fix possible misconfiguration of advertised autoneg value.
        qed: Fix overriding of supported autoneg value.
        qed*: Fix possible overflow for status block id field.
        rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
        netvsc: make sure napi enabled before vmbus_open
        aquantia: Fix driver name reported by ethtool
        ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
        net/sched: remove redundant null check on head
        tcp: do not inherit fastopen_req from parent
        forcedeth: remove unnecessary carrier status check
        ibmvnic: Move queue restarting in ibmvnic_tx_complete
        ibmvnic: Record SKB RX queue during poll
        ibmvnic: Continue skb processing after skb completion error
        ibmvnic: Check for driver reset first in ibmvnic_xmit
        ibmvnic: Wait for any pending scrqs entries at driver close
        ibmvnic: Clean up tx pools when closing
        ibmvnic: Whitespace correction in release_rx_pools
        ibmvnic: Delete napi's when releasing driver resources
        ...
      4ac4d584
    • L
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8d5e72df
      Linus Torvalds 提交于
      Pull SCSI updates from James Bottomley:
       "This update includes the usual round of major driver updates
        (hisi_sas, ufs, fnic, cxlflash, be2iscsi, ipr, stex). There's also the
        usual amount of cosmetic and spelling stuff"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (155 commits)
        scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template"
        scsi: stex: make S6flag static
        scsi: mac_esp: fix to pass correct device identity to free_irq()
        scsi: aacraid: pci_alloc_consistent() failures on ARM64
        scsi: ufs: make ufshcd_get_lists_status() register operation obvious
        scsi: ufs: use MASK_EE_STATUS
        scsi: mac_esp: Replace bogus memory barrier with spinlock
        scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static
        scsi: sd_zbc: Do not write lock zones for reset
        scsi: sd_zbc: Remove superfluous assignments
        scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd
        scsi: Improve scsi_get_sense_info_fld
        scsi: sd: Cleanup sd_done sense data handling
        scsi: sd: Improve sd_completed_bytes
        scsi: sd: Fix function descriptions
        scsi: mpt3sas: remove redundant wmb
        scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host()
        scsi: sg: reset 'res_in_use' after unlinking reserved array
        scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case
        scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency"
        ...
      8d5e72df
    • L
      Merge tag 'gpio-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 2bd80401
      Linus Torvalds 提交于
      Pull GPIO updates from Linus Walleij:
       "This is the bulk of GPIO changes for the v4.12 kernel cycle.
      
        Core changes:
      
         - Return NULL from gpiod_get_optional() when GPIOLIB is disabled.
           This was a much discussed change. It affects use cases where people
           write drivers that might or might not be using GPIO resources. I
           have decided that this is the lesser evil right now.
      
         - Make gpiod_count() behave consistently across different hardware
           descriptions.
      
         - Fix the syntax around open drain/open source to not infer active
           high/low semantics.
      
        New drivers:
      
         - A new single-register fixed-direction framework driver for hardware
           that have lines controlled by a single register that just work in
           one direction (out or in), including IRQ support.
      
         - Support the Fintek F71889A GPIO SuperIO controller.
      
         - Support the National NI 169445 MMIO GPIO.
      
         - Support for the X-Gene derivative of the DWC GPIO controller
      
         - Support for the Rohm BD9571MWV-M PMIC GPIO controller.
      
         - Refactor the Gemini GPIO driver to a generic Faraday FTGPIO driver
           and replace both the Gemini and the Moxa ART custom drivers with
           this driver.
      
        Driver improvements:
      
         - A whole slew of drivers have their spinlocks chaned to raw
           spinlocks as they provide irqchips, and thus we are progressing on
           realtime compliance.
      
         - Use devm_irq_alloc_descs() in a slew of drivers, getting managed
           resources.
      
         - Support for the embedded PWM controller inside the MVEBU driver.
      
         - Debounce, open source and open drain support for the Aspeed driver.
      
         - Misc smaller fixes like spelling and syntax and whatnot"
      
      * tag 'gpio-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits)
        gpio: f7188x: Add a missing break
        gpio: omap: return error if requested debounce time is not possible
        gpio: Add ROHM BD9571MWV-M PMIC GPIO driver
        gpio: gpio-wcove: fix GPIO IRQ status mask
        gpio: DT bindings, move tca9554 from pcf857x to pca953x
        gpio: move tca9554 from pcf857x to pca953x
        gpio: arizona: Correct check whether the pin is an input
        gpio: Add XRA1403 DTS binding documentation
        dt-bindings: add exar to vendor prefixes list
        gpio: gpio-wcove: fix irq pending status bit width
        gpio: dwapb: use dwapb_read instead of readl_relaxed
        gpio: aspeed: Add open-source and open-drain support
        gpio: aspeed: Add debounce support
        gpio: aspeed: dt: Add optional clocks property
        gpio: aspeed: dt: Fix description alignment in bindings document
        gpio: mvebu: Add limited PWM support
        gpio: Use unsigned int for interrupt numbers
        gpio: f7188x: Add F71889A GPIO support.
        gpio: core: Decouple open drain/source flag with active low/high
        gpio: arizona: Correct handling for reading input GPIOs
        ...
      2bd80401
    • L
      Merge tag 'platform-drivers-x86-v4.12-1' of git://git.infradead.org/linux-platform-drivers-x86 · 99a7583d
      Linus Torvalds 提交于
      Pull x86 platform-drivers update from Darren Hart:
       "This represents a significantly larger and more complex set of changes
        than those of prior merge windows.
      
        In particular, we had several changes with dependencies on other
        subsystems which we felt were best managed through merges of immutable
        branches, including one each from input, i2c, and leds. Two patches
        for the watchdog subsystem are included after discussion with Wim and
        Guenter following a collision in linux-next (this should be resolved
        and you should only see these two appear in this pull request). These
        are called out in the "External" section below.
      
        Summary of changes:
         - significant further cleanup of fujitsu-laptop and hp-wmi
         - new model support for ideapad, asus, silead, and xiaomi
         - new hotkeys for thinkpad and models using intel-vbtn
         - dell keyboard backlight improvements
         - build and dependency improvements
         - intel * ipc fixes, cleanups, and api updates
         - single isolated fixes noted below
      
        External:
         - watchdog: iTCO_wdt: Add PMC specific noreboot update api
         - watchdog: iTCO_wdt: cleanup set/unset no_reboot_bit functions
         - Merge branch 'ib/4.10-sparse-keymap-managed'
         - Merge branch 'i2c/for-INT33FE'
         - Merge branch 'linux-leds/dell-laptop-changes-for-4.12'
      
        platform/x86:
         - Add Intel Cherry Trail ACPI INT33FE device driver
         - remove sparse_keymap_free() calls
         - Make SILEAD_DMI depend on TOUCHSCREEN_SILEAD
      
        asus-wmi:
         - try to set als by default
         - fix cpufv sysfs file permission
      
        acer-wmi:
         - setup accelerometer when ACPI device was found
      
        ideapad-laptop:
         - Add IdeaPad V310-15ISK to no_hw_rfkill
         - Add IdeaPad 310-15IKB to no_hw_rfkill
      
        intel_pmc_ipc:
         - use gcr mem base for S0ix counter read
         - Fix iTCO_wdt GCS memory mapping failure
         - Add pmc gcr read/write/update api's
         - fix gcr offset
      
        dell-laptop:
         - Add keyboard backlight timeout AC settings
         - Handle return error form dell_get_intensity.
         - Protect kbd_state against races
         - Refactor kbd_led_triggers_store()
      
        hp-wireless:
         - reuse module_acpi_driver
         - add Xiaomi's hardware id to the supported list
      
        intel-vbtn:
         - add volume up and down
      
        INT33FE:
         - add i2c dependency
      
        hp-wmi:
         - Cleanup exit paths
         - Do not shadow errors in sysfs show functions
         - Use DEVICE_ATTR_(RO|RW) helper macros
         - Refactor dock and tablet state fetchers
         - Cleanup wireless get_(hw|sw)state functions
         - Refactor redundant HPWMI_READ functions
         - Standardize enum usage for constants
         - Cleanup local variable declarations
         - Do not shadow error values
         - Fix detection for dock and tablet mode
         - Fix error value for hp_wmi_tablet_state
      
        fujitsu-laptop:
         - simplify error handling in acpi_fujitsu_laptop_add()
         - do not log LED registration failures
         - switch to managed LED class devices
         - reorganize LED-related code
         - refactor LED registration
         - select LEDS_CLASS
         - remove redundant fields from struct fujitsu_bl
         - account for backlight power when determining brightness
         - do not log set_lcd_level() failures in bl_update_status()
         - ignore errors when setting backlight power
         - make disable_brightness_adjust a boolean
         - clean up use_alt_lcd_levels handling
         - sync brightness in set_lcd_level()
         - simplify set_lcd_level()
         - merge set_lcd_level_alt() into set_lcd_level()
         - switch to a managed backlight device
         - only handle backlight when appropriate
         - update debug message logged by call_fext_func()
         - rename call_fext_func() arguments
         - simplify call_fext_func()
         - clean up local variables in call_fext_func()
         - remove keycode fields from struct fujitsu_bl
         - model-dependent sparse keymap overrides
         - use a sparse keymap for hotkey event generation
         - switch to a managed hotkey input device
         - refactor hotkey input device setup
         - use a sparse keymap for brightness key events
         - switch to a managed backlight input device
         - refactor backlight input device setup
         - remove pf_device field from struct fujitsu_bl
         - only register platform device if FUJ02E3 is present
         - add and remove platform device in separate functions
         - simplify platform device attribute definitions
         - remove backlight-related attributes from the platform device
         - cleanup error labels in fujitsu_init()
         - only register backlight device if FUJ02B1 is present
         - sync backlight power status in acpi_fujitsu_laptop_add()
         - register backlight device in a separate function
         - simplify brightness key event generation logic
         - decrease indentation in acpi_fujitsu_bl_notify()
      
        intel-hid:
         - Add missing ->thaw callback
         - do not set parents of input devices explicitly
         - remove redundant set_bit() call
         - use devm_input_allocate_device() for HID events input device
         - make intel_hid_set_enable() take a boolean argument
         - simplify enabling/disabling HID events
      
        silead_dmi:
         - Add touchscreen info for Surftab Wintron 7.0
         - Abort early if DMI does not match
         - Do not treat all devices as i2c_clients
         - Add entry for Insyde 7W tablets
         - Constify properties arrays
      
        intel_scu_ipc:
         - Introduce intel_scu_ipc_raw_command()
         - Introduce SCU_DEVICE() macro
         - Remove redundant subarch check
         - Rearrange init sequence
         - Platform data is mandatory
      
        asus-nb-wmi:
         - Add wapf4 quirk for the X302UA
      
        dell-*:
         - Call new led hw_changed API on kbd brightness change
         - Add a generic dell-laptop notifier chain
      
        eeepc-laptop:
         - Skip unknown key messages 0x50 0x51
      
        thinkpad_acpi:
         - add mapping for new hotkeys
         - guard generic hotkey case"
      
      * tag 'platform-drivers-x86-v4.12-1' of git://git.infradead.org/linux-platform-drivers-x86: (108 commits)
        platform/x86: Make SILEAD_DMI depend on TOUCHSCREEN_SILEAD
        platform/x86: asus-wmi: try to set als by default
        platform/x86: asus-wmi: fix cpufv sysfs file permission
        platform/x86: acer-wmi: setup accelerometer when ACPI device was found
        platform/x86: ideapad-laptop: Add IdeaPad V310-15ISK to no_hw_rfkill
        platform/x86: intel_pmc_ipc: use gcr mem base for S0ix counter read
        platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure
        watchdog: iTCO_wdt: Add PMC specific noreboot update api
        watchdog: iTCO_wdt: cleanup set/unset no_reboot_bit functions
        platform/x86: intel_pmc_ipc: Add pmc gcr read/write/update api's
        platform/x86: intel_pmc_ipc: fix gcr offset
        platform/x86: dell-laptop: Add keyboard backlight timeout AC settings
        platform/x86: dell-laptop: Handle return error form dell_get_intensity.
        platform/x86: hp-wireless: reuse module_acpi_driver
        platform/x86: intel-vbtn: add volume up and down
        platform/x86: INT33FE: add i2c dependency
        platform/x86: hp-wmi: Cleanup exit paths
        platform/x86: hp-wmi: Do not shadow errors in sysfs show functions
        platform/x86: hp-wmi: Use DEVICE_ATTR_(RO|RW) helper macros
        platform/x86: hp-wmi: Refactor dock and tablet state fetchers
        ...
      99a7583d
    • L
      Merge tag 'vfio-v4.12-rc1' of git://github.com/awilliam/linux-vfio · c336bf8e
      Linus Torvalds 提交于
      Pull VFIO updates from Alex Williamson:
      
       - Updates for SPAPR IOMMU backend including compatibility test and
         memory allocation check (Alexey Kardashevskiy)
      
       - Updates for type1 IOMMU backend to remove asynchronous locked page
         accounting and remove redundancy (Alex Williamson)
      
      * tag 'vfio-v4.12-rc1' of git://github.com/awilliam/linux-vfio:
        vfio/type1: Reduce repetitive calls in vfio_pin_pages_remote()
        vfio/type1: Prune vfio_pin_page_external()
        vfio/type1: Remove locked page accounting workqueue
        vfio/spapr_tce: Check kzalloc() return when preregistering memory
        vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check
      c336bf8e
    • M
      orangefs: count directory pieces correctly · 2f713b5c
      Martin Brandenburg 提交于
      A large directory full of differently sized file names triggered this.
      Most directories, even very large directories with shorter names, would
      be lucky enough to fit in one server response.
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      2f713b5c
    • M
      orangefs: invalidate stored directory on seek · 942835d6
      Martin Brandenburg 提交于
      If an application seeks to a position before the point which has been
      read, it must want updates which have been made to the directory.  So
      delete the copy stored in the kernel so it will be fetched again.
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      942835d6
    • M
      orangefs: skip forward to the next directory entry if seek is short · bf15ba7c
      Martin Brandenburg 提交于
      If userspace seeks to a position in the stream which is not correct, it
      would have returned EIO because the data in the buffer at that offset
      would be incorrect.  This and the userspace daemon returning a corrupt
      directory are indistinguishable.
      
      Now if the data does not look right, skip forward to the next chunk and
      try again.  The motivation is that if the directory changes, an
      application may seek to a position that was valid and no longer is valid.
      
      It is not yet possible for a directory to change.
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      bf15ba7c
    • L
      Merge tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · a9648072
      Linus Torvalds 提交于
      Pull xen updates from Juergen Gross:
       "Xen fixes and featrues for 4.12. The main changes are:
      
         - enable building the kernel with Xen support but without enabling
           paravirtualized mode (Vitaly Kuznetsov)
      
         - add a new 9pfs xen frontend driver (Stefano Stabellini)
      
         - simplify Xen's cpuid handling by making use of cpu capabilities
           (Juergen Gross)
      
         - add/modify some headers for new Xen paravirtualized devices
           (Oleksandr Andrushchenko)
      
         - EFI reset_system support under Xen (Julien Grall)
      
         - and the usual cleanups and corrections"
      
      * tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (57 commits)
        xen: Move xen_have_vector_callback definition to enlighten.c
        xen: Implement EFI reset_system callback
        arm/xen: Consolidate calls to shutdown hypercall in a single helper
        xen: Export xen_reboot
        xen/x86: Call xen_smp_intr_init_pv() on BSP
        xen: Revert commits da72ff5b and 72a9b186
        xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
        xen/scsifront: use offset_in_page() macro
        xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops
        xen/arm,arm64: fix xen_dma_ops after 815dd187 "Consolidate get_dma_ops..."
        xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND
        x86/cpu: remove hypervisor specific set_cpu_features
        vmware: set cpu capabilities during platform initialization
        x86/xen: use capabilities instead of fake cpuid values for xsave
        x86/xen: use capabilities instead of fake cpuid values for x2apic
        x86/xen: use capabilities instead of fake cpuid values for mwait
        x86/xen: use capabilities instead of fake cpuid values for acpi
        x86/xen: use capabilities instead of fake cpuid values for acc
        x86/xen: use capabilities instead of fake cpuid values for mtrr
        x86/xen: use capabilities instead of fake cpuid values for aperf
        ...
      a9648072
    • J
      cfg80211: make RATE_INFO_BW_20 the default · 842be75c
      Johannes Berg 提交于
      Due to the way I did the RX bitrate conversions in mac80211 with
      spatch, going setting flags to setting the value, many drivers now
      don't set the bandwidth value for 20 MHz, since with the flags it
      wasn't necessary to (there was no 20 MHz flag, only the others.)
      
      Rather than go through and try to fix up all the drivers, instead
      renumber the enum so that 20 MHz, which is the typical bandwidth,
      actually has the value 0, making those drivers all work again.
      
      If VHT was hit used with a driver not reporting it, e.g. iwlmvm,
      this manifested in hitting the bandwidth warning in
      cfg80211_calculate_bitrate_vht().
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Tested-by: NJens Axboe <axboe@kernel.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      842be75c
    • W
      ipv6: initialize route null entry in addrconf_init() · 2f460933
      WANG Cong 提交于
      Andrey reported a crash on init_net.ipv6.ip6_null_entry->rt6i_idev
      since it is always NULL.
      
      This is clearly wrong, we have code to initialize it to loopback_dev,
      unfortunately the order is still not correct.
      
      loopback_dev is registered very early during boot, we lose a chance
      to re-initialize it in notifier. addrconf_init() is called after
      ip6_route_init(), which means we have no chance to correct it.
      
      Fix it by moving this initialization explicitly after
      ipv6_add_dev(init_net.loopback_dev) in addrconf_init().
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f460933
    • D
      Merge branch 'qed-fixes' · 15981952
      David S. Miller 提交于
      Sudarsana Reddy Kalluru says:
      
      ====================
      qed*: Bug fix series.
      
      The series contains minor bug fixes for qed/qede drivers.
      
      Please consider applying it to 'net' branch.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15981952
    • S
      qede: Fix possible misconfiguration of advertised autoneg value. · 161adb04
      sudarsana.kalluru@cavium.com 提交于
      Fail the configuration of advertised speed-autoneg value if the config
      update is not supported.
      Signed-off-by: NSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      161adb04
    • S
      qed: Fix overriding of supported autoneg value. · 34f9199c
      sudarsana.kalluru@cavium.com 提交于
      Driver currently uses advertised-autoneg value to populate the
      supported-autoneg field. When advertised field is updated, user gets
      the same value for supported field. Supported-autoneg value need to be
      populated from the link capabilities value returned by the MFW.
      Signed-off-by: NSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34f9199c
    • S
      qed*: Fix possible overflow for status block id field. · f870a3c6
      sudarsana.kalluru@cavium.com 提交于
      Value for status block id could be more than 256 in 100G mode, need to
      update its data type from u8 to u16.
      Signed-off-by: NSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f870a3c6
  3. 04 5月, 2017 6 次提交
    • M
      rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string · 77ef033b
      Michal Schmidt 提交于
      IFLA_PHYS_PORT_NAME is a string attribute, so terminate it with \0.
      Otherwise libnl3 fails to validate netlink messages with this attribute.
      "ip -detail a" assumes too that the attribute is NUL-terminated when
      printing it. It often was, due to padding.
      
      I noticed this as libvirtd failing to start on a system with sfc driver
      after upgrading it to Linux 4.11, i.e. when sfc added support for
      phys_port_name.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77ef033b
    • S
      netvsc: make sure napi enabled before vmbus_open · 2be0f264
      stephen hemminger 提交于
      This fixes a race where vmbus callback for new packet arriving
      could occur before NAPI is initialized.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2be0f264
    • P
      aquantia: Fix driver name reported by ethtool · 5900eca1
      Pavel Belous 提交于
      V2: using "aquantia" subsystem tag.
      
      The command "ethtool -i ethX" should display driver name (driver: atlantic)
      instead vendor name (driver: aquantia).
      Signed-off-by: NPavel Belous <pavel.belous@aquantia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5900eca1
    • A
      ipv4, ipv6: ensure raw socket message is big enough to hold an IP header · 86f4c90a
      Alexander Potapenko 提交于
      raw_send_hdrinc() and rawv6_send_hdrinc() expect that the buffer copied
      from the userspace contains the IPv4/IPv6 header, so if too few bytes are
      copied, parts of the header may remain uninitialized.
      
      This bug has been detected with KMSAN.
      
      For the record, the KMSAN report:
      
      ==================================================================
      BUG: KMSAN: use of unitialized memory in nf_ct_frag6_gather+0xf5a/0x44a0
      inter: 0
      CPU: 0 PID: 1036 Comm: probe Not tainted 4.11.0-rc5+ #2455
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:16
       dump_stack+0x143/0x1b0 lib/dump_stack.c:52
       kmsan_report+0x16b/0x1e0 mm/kmsan/kmsan.c:1078
       __kmsan_warning_32+0x5c/0xa0 mm/kmsan/kmsan_instr.c:510
       nf_ct_frag6_gather+0xf5a/0x44a0 net/ipv6/netfilter/nf_conntrack_reasm.c:577
       ipv6_defrag+0x1d9/0x280 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:68
       nf_hook_entry_hookfn ./include/linux/netfilter.h:102
       nf_hook_slow+0x13f/0x3c0 net/netfilter/core.c:310
       nf_hook ./include/linux/netfilter.h:212
       NF_HOOK ./include/linux/netfilter.h:255
       rawv6_send_hdrinc net/ipv6/raw.c:673
       rawv6_sendmsg+0x2fcb/0x41a0 net/ipv6/raw.c:919
       inet_sendmsg+0x3f8/0x6d0 net/ipv4/af_inet.c:762
       sock_sendmsg_nosec net/socket.c:633
       sock_sendmsg net/socket.c:643
       SYSC_sendto+0x6a5/0x7c0 net/socket.c:1696
       SyS_sendto+0xbc/0xe0 net/socket.c:1664
       do_syscall_64+0x72/0xa0 arch/x86/entry/common.c:285
       entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.S:246
      RIP: 0033:0x436e03
      RSP: 002b:00007ffce48baf38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
      RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000436e03
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
      RBP: 00007ffce48baf90 R08: 00007ffce48baf50 R09: 000000000000001c
      R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      R13: 0000000000401790 R14: 0000000000401820 R15: 0000000000000000
      origin: 00000000d9400053
       save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
       kmsan_save_stack_with_flags mm/kmsan/kmsan.c:362
       kmsan_internal_poison_shadow+0xb1/0x1a0 mm/kmsan/kmsan.c:257
       kmsan_poison_shadow+0x6d/0xc0 mm/kmsan/kmsan.c:270
       slab_alloc_node mm/slub.c:2735
       __kmalloc_node_track_caller+0x1f4/0x390 mm/slub.c:4341
       __kmalloc_reserve net/core/skbuff.c:138
       __alloc_skb+0x2cd/0x740 net/core/skbuff.c:231
       alloc_skb ./include/linux/skbuff.h:933
       alloc_skb_with_frags+0x209/0xbc0 net/core/skbuff.c:4678
       sock_alloc_send_pskb+0x9ff/0xe00 net/core/sock.c:1903
       sock_alloc_send_skb+0xe4/0x100 net/core/sock.c:1920
       rawv6_send_hdrinc net/ipv6/raw.c:638
       rawv6_sendmsg+0x2918/0x41a0 net/ipv6/raw.c:919
       inet_sendmsg+0x3f8/0x6d0 net/ipv4/af_inet.c:762
       sock_sendmsg_nosec net/socket.c:633
       sock_sendmsg net/socket.c:643
       SYSC_sendto+0x6a5/0x7c0 net/socket.c:1696
       SyS_sendto+0xbc/0xe0 net/socket.c:1664
       do_syscall_64+0x72/0xa0 arch/x86/entry/common.c:285
       return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246
      ==================================================================
      
      , triggered by the following syscalls:
        socket(PF_INET6, SOCK_RAW, IPPROTO_RAW) = 3
        sendto(3, NULL, 0, 0, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "ff00::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EPERM
      
      A similar report is triggered in net/ipv4/raw.c if we use a PF_INET socket
      instead of a PF_INET6 one.
      Signed-off-by: NAlexander Potapenko <glider@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86f4c90a
    • C
      net/sched: remove redundant null check on head · 985538ee
      Colin Ian King 提交于
      head is previously null checked and so the 2nd null check on head
      is redundant and therefore can be removed.
      
      Detected by CoverityScan, CID#1399505 ("Logically dead code")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      985538ee
    • E
      tcp: do not inherit fastopen_req from parent · 8b485ce6
      Eric Dumazet 提交于
      Under fuzzer stress, it is possible that a child gets a non NULL
      fastopen_req pointer from its parent at accept() time, when/if parent
      morphs from listener to active session.
      
      We need to make sure this can not happen, by clearing the field after
      socket cloning.
      
      BUG: Double free or freeing an invalid pointer
      Unexpected shadow byte: 0xFB
      CPU: 3 PID: 20933 Comm: syz-executor3 Not tainted 4.11.0+ #306
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs
      01/01/2011
      Call Trace:
       <IRQ>
       __dump_stack lib/dump_stack.c:16 [inline]
       dump_stack+0x292/0x395 lib/dump_stack.c:52
       kasan_object_err+0x1c/0x70 mm/kasan/report.c:164
       kasan_report_double_free+0x5c/0x70 mm/kasan/report.c:185
       kasan_slab_free+0x9d/0xc0 mm/kasan/kasan.c:580
       slab_free_hook mm/slub.c:1357 [inline]
       slab_free_freelist_hook mm/slub.c:1379 [inline]
       slab_free mm/slub.c:2961 [inline]
       kfree+0xe8/0x2b0 mm/slub.c:3882
       tcp_free_fastopen_req net/ipv4/tcp.c:1077 [inline]
       tcp_disconnect+0xc15/0x13e0 net/ipv4/tcp.c:2328
       inet_child_forget+0xb8/0x600 net/ipv4/inet_connection_sock.c:898
       inet_csk_reqsk_queue_add+0x1e7/0x250
      net/ipv4/inet_connection_sock.c:928
       tcp_get_cookie_sock+0x21a/0x510 net/ipv4/syncookies.c:217
       cookie_v4_check+0x1a19/0x28b0 net/ipv4/syncookies.c:384
       tcp_v4_cookie_check net/ipv4/tcp_ipv4.c:1384 [inline]
       tcp_v4_do_rcv+0x731/0x940 net/ipv4/tcp_ipv4.c:1421
       tcp_v4_rcv+0x2dc0/0x31c0 net/ipv4/tcp_ipv4.c:1715
       ip_local_deliver_finish+0x4cc/0xc20 net/ipv4/ip_input.c:216
       NF_HOOK include/linux/netfilter.h:257 [inline]
       ip_local_deliver+0x1ce/0x700 net/ipv4/ip_input.c:257
       dst_input include/net/dst.h:492 [inline]
       ip_rcv_finish+0xb1d/0x20b0 net/ipv4/ip_input.c:396
       NF_HOOK include/linux/netfilter.h:257 [inline]
       ip_rcv+0xd8c/0x19c0 net/ipv4/ip_input.c:487
       __netif_receive_skb_core+0x1ad1/0x3400 net/core/dev.c:4210
       __netif_receive_skb+0x2a/0x1a0 net/core/dev.c:4248
       process_backlog+0xe5/0x6c0 net/core/dev.c:4868
       napi_poll net/core/dev.c:5270 [inline]
       net_rx_action+0xe70/0x18e0 net/core/dev.c:5335
       __do_softirq+0x2fb/0xb99 kernel/softirq.c:284
       do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:899
       </IRQ>
       do_softirq.part.17+0x1e8/0x230 kernel/softirq.c:328
       do_softirq kernel/softirq.c:176 [inline]
       __local_bh_enable_ip+0x1cf/0x1e0 kernel/softirq.c:181
       local_bh_enable include/linux/bottom_half.h:31 [inline]
       rcu_read_unlock_bh include/linux/rcupdate.h:931 [inline]
       ip_finish_output2+0x9ab/0x15e0 net/ipv4/ip_output.c:230
       ip_finish_output+0xa35/0xdf0 net/ipv4/ip_output.c:316
       NF_HOOK_COND include/linux/netfilter.h:246 [inline]
       ip_output+0x1f6/0x7b0 net/ipv4/ip_output.c:404
       dst_output include/net/dst.h:486 [inline]
       ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124
       ip_queue_xmit+0x9a8/0x1a10 net/ipv4/ip_output.c:503
       tcp_transmit_skb+0x1ade/0x3470 net/ipv4/tcp_output.c:1057
       tcp_write_xmit+0x79e/0x55b0 net/ipv4/tcp_output.c:2265
       __tcp_push_pending_frames+0xfa/0x3a0 net/ipv4/tcp_output.c:2450
       tcp_push+0x4ee/0x780 net/ipv4/tcp.c:683
       tcp_sendmsg+0x128d/0x39b0 net/ipv4/tcp.c:1342
       inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762
       sock_sendmsg_nosec net/socket.c:633 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:643
       SYSC_sendto+0x660/0x810 net/socket.c:1696
       SyS_sendto+0x40/0x50 net/socket.c:1664
       entry_SYSCALL_64_fastpath+0x1f/0xbe
      RIP: 0033:0x446059
      RSP: 002b:00007faa6761fb58 EFLAGS: 00000282 ORIG_RAX: 000000000000002c
      RAX: ffffffffffffffda RBX: 0000000000000017 RCX: 0000000000446059
      RDX: 0000000000000001 RSI: 0000000020ba3fcd RDI: 0000000000000017
      RBP: 00000000006e40a0 R08: 0000000020ba4ff0 R09: 0000000000000010
      R10: 0000000020000000 R11: 0000000000000282 R12: 0000000000708150
      R13: 0000000000000000 R14: 00007faa676209c0 R15: 00007faa67620700
      Object at ffff88003b5bbcb8, in cache kmalloc-64 size: 64
      Allocated:
      PID = 20909
       save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
       save_stack+0x43/0xd0 mm/kasan/kasan.c:513
       set_track mm/kasan/kasan.c:525 [inline]
       kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616
       kmem_cache_alloc_trace+0x82/0x270 mm/slub.c:2745
       kmalloc include/linux/slab.h:490 [inline]
       kzalloc include/linux/slab.h:663 [inline]
       tcp_sendmsg_fastopen net/ipv4/tcp.c:1094 [inline]
       tcp_sendmsg+0x221a/0x39b0 net/ipv4/tcp.c:1139
       inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762
       sock_sendmsg_nosec net/socket.c:633 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:643
       SYSC_sendto+0x660/0x810 net/socket.c:1696
       SyS_sendto+0x40/0x50 net/socket.c:1664
       entry_SYSCALL_64_fastpath+0x1f/0xbe
      Freed:
      PID = 20909
       save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
       save_stack+0x43/0xd0 mm/kasan/kasan.c:513
       set_track mm/kasan/kasan.c:525 [inline]
       kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:589
       slab_free_hook mm/slub.c:1357 [inline]
       slab_free_freelist_hook mm/slub.c:1379 [inline]
       slab_free mm/slub.c:2961 [inline]
       kfree+0xe8/0x2b0 mm/slub.c:3882
       tcp_free_fastopen_req net/ipv4/tcp.c:1077 [inline]
       tcp_disconnect+0xc15/0x13e0 net/ipv4/tcp.c:2328
       __inet_stream_connect+0x20c/0xf90 net/ipv4/af_inet.c:593
       tcp_sendmsg_fastopen net/ipv4/tcp.c:1111 [inline]
       tcp_sendmsg+0x23a8/0x39b0 net/ipv4/tcp.c:1139
       inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762
       sock_sendmsg_nosec net/socket.c:633 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:643
       SYSC_sendto+0x660/0x810 net/socket.c:1696
       SyS_sendto+0x40/0x50 net/socket.c:1664
       entry_SYSCALL_64_fastpath+0x1f/0xbe
      
      Fixes: e994b2f0 ("tcp: do not lock listener to process SYN packets")
      Fixes: 7db92362 ("tcp: fix potential double free issue for fastopen_req")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Acked-by: NWei Wang <weiwan@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b485ce6