1. 10 1月, 2017 3 次提交
    • G
      drm: Document drm_cache interface · f0e36723
      Gabriel Krisman Bertazi 提交于
      Notice that this uncovers an issue with the kernel-doc handling of array
      arguments, causing the first parameter of drm_clflush_pages() to not
      show up in the rst-generated page.  A proposed fix is under review in
      linux-doc: <http://www.spinics.net/lists/linux-doc/msg42544.html>
      
      Changes since v1:
       - Add section to drm-mm.rst.
       - Fix kernel-doc style issues.
       - s/memory/kernel memory/.
      Signed-off-by: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170109215649.6860-1-krisman@collabora.co.uk
      f0e36723
    • D
      Merge tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc into drm-next · 282d0a35
      Dave Airlie 提交于
      Back to regular -misc pulls with reasonable sizes:
      - dma_fence error clarification (Chris)
      - drm_crtc_from_index helper (Shawn), pile more patches on the m-l to roll
        this out to drivers
      - mmu-less support for fbdev helpers from Benjamin
      - piles of kerneldoc work
      - some polish for crc support from Tomeu and Benjamin
      - odd misc stuff all over
      
      * tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc: (48 commits)
        dma-fence: Introduce drm_fence_set_error() helper
        dma-fence: Wrap querying the fence->status
        dma-fence: Clear fence->status during dma_fence_init()
        drm: fix compilations issues introduced by "drm: allow to use mmuless SoC"
        drm: Change the return type of the unload hook to void
        drm: add more document for drm_crtc_from_index()
        drm: remove useless parameters from drm_pick_cmdline_mode function
        drm: crc: Call wake_up_interruptible() each time there is a new CRC entry
        drm: allow to use mmuless SoC
        drm: compile drm_vm.c only when needed
        fbmem: add a default get_fb_unmapped_area function
        drm: crc: Wait for a frame before returning from open()
        drm: Move locking into drm_debugfs_crtc_crc_add
        drm/imx: imx-tve: Remove unused variable
        Revert "drm: nouveau: fix build when LEDS_CLASS=m"
        drm: Add kernel-doc for drm_crtc_commit_get/put
        drm/atomic: Fix outdated comment.
        drm: reference count event->completion
        gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
        drm: Document deprecated load/unload hook
        ...
      282d0a35
    • D
      Merge tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel into drm-next · 5c37daf5
      Dave Airlie 提交于
      More 4.11 stuff, holidays edition (i.e. not much):
      
      - docs and cleanups for shared dpll code (Ander)
      - some kerneldoc work (Chris)
      - fbc by default on gen9+ too, yeah! (Paulo)
      - fixes, polish and other small things all over gem code (Chris)
      - and a few small things on top
      
      Plus a backmerge, because Dave was enjoying time off too.
      
      * tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel: (275 commits)
        drm/i915: Update DRIVER_DATE to 20170109
        drm/i915: Drain freed objects for mmap space exhaustion
        drm/i915: Purge loose pages if we run out of DMA remap space
        drm/i915: Fix phys pwrite for struct_mutex-less operation
        drm/i915: Simplify testing for am-I-the-kernel-context?
        drm/i915: Use range_overflows()
        drm/i915: Use fixed-sized types for stolen
        drm/i915: Use phys_addr_t for the address of stolen memory
        drm/i915: Consolidate checks for memcpy-from-wc support
        drm/i915: Only skip requests once a context is banned
        drm/i915: Move a few more utility macros to i915_utils.h
        drm/i915: Clear ret before unbinding in i915_gem_evict_something()
        drm/i915/guc: Exclude the upper end of the Global GTT for the GuC
        drm/i915: Move a few utility macros into a separate header
        drm/i915/execlists: Reorder execlists register enabling
        drm/i915: Assert that we do create the deferred context
        drm/i915: Assert all timeline requests are gone before fini
        drm/i915: Revoke fenced GTT mmapings across GPU reset
        drm/i915: enable FBC on gen9+ too
        drm/i915: actually drive the BDW reserved IDs
        ...
      5c37daf5
  2. 09 1月, 2017 13 次提交
  3. 08 1月, 2017 4 次提交
    • J
      mm: workingset: fix use-after-free in shadow node shrinker · ea07b862
      Johannes Weiner 提交于
      Several people report seeing warnings about inconsistent radix tree
      nodes followed by crashes in the workingset code, which all looked like
      use-after-free access from the shadow node shrinker.
      
      Dave Jones managed to reproduce the issue with a debug patch applied,
      which confirmed that the radix tree shrinking indeed frees shadow nodes
      while they are still linked to the shadow LRU:
      
        WARNING: CPU: 2 PID: 53 at lib/radix-tree.c:643 delete_node+0x1e4/0x200
        CPU: 2 PID: 53 Comm: kswapd0 Not tainted 4.10.0-rc2-think+ #3
        Call Trace:
           delete_node+0x1e4/0x200
           __radix_tree_delete_node+0xd/0x10
           shadow_lru_isolate+0xe6/0x220
           __list_lru_walk_one.isra.4+0x9b/0x190
           list_lru_walk_one+0x23/0x30
           scan_shadow_nodes+0x2e/0x40
           shrink_slab.part.44+0x23d/0x5d0
           shrink_node+0x22c/0x330
           kswapd+0x392/0x8f0
      
      This is the WARN_ON_ONCE(!list_empty(&node->private_list)) placed in the
      inlined radix_tree_shrink().
      
      The problem is with 14b46879 ("mm: workingset: move shadow entry
      tracking to radix tree exceptional tracking"), which passes an update
      callback into the radix tree to link and unlink shadow leaf nodes when
      tree entries change, but forgot to pass the callback when reclaiming a
      shadow node.
      
      While the reclaimed shadow node itself is unlinked by the shrinker, its
      deletion from the tree can cause the left-most leaf node in the tree to
      be shrunk.  If that happens to be a shadow node as well, we don't unlink
      it from the LRU as we should.
      
      Consider this tree, where the s are shadow entries:
      
             root->rnode
                  |
             [0       n]
              |       |
           [s    ] [sssss]
      
      Now the shadow node shrinker reclaims the rightmost leaf node through
      the shadow node LRU:
      
             root->rnode
                  |
             [0        ]
              |
          [s     ]
      
      Because the parent of the deleted node is the first level below the
      root and has only one child in the left-most slot, the intermediate
      level is shrunk and the node containing the single shadow is put in
      its place:
      
             root->rnode
                  |
             [s        ]
      
      The shrinker again sees a single left-most slot in a first level node
      and thus decides to store the shadow in root->rnode directly and free
      the node - which is a leaf node on the shadow node LRU.
      
        root->rnode
             |
             s
      
      Without the update callback, the freed node remains on the shadow LRU,
      where it causes later shrinker runs to crash.
      
      Pass the node updater callback into __radix_tree_delete_node() in case
      the deletion causes the left-most branch in the tree to collapse too.
      
      Also add warnings when linked nodes are freed right away, rather than
      wait for the use-after-free when the list is scanned much later.
      
      Fixes: 14b46879 ("mm: workingset: move shadow entry tracking to radix tree exceptional tracking")
      Reported-by: NDave Chinner <david@fromorbit.com>
      Reported-by: NHugh Dickins <hughd@google.com>
      Reported-by: NAndrea Arcangeli <aarcange@redhat.com>
      Reported-and-tested-by: NDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Leech <cleech@redhat.com>
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@linuxonhyperv.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea07b862
    • H
      mm: stop leaking PageTables · b0b9b3df
      Hugh Dickins 提交于
      4.10-rc loadtest (even on x86, and even without THPCache) fails with
      "fork: Cannot allocate memory" or some such; and /proc/meminfo shows
      PageTables growing.
      
      Commit 953c66c2 ("mm: THP page cache support for ppc64") that got
      merged in rc1 removed the freeing of an unused preallocated pagetable
      after do_fault_around() has called map_pages().
      
      This is usually a good optimization, so that the followup doesn't have
      to reallocate one; but it's not sufficient to shift the freeing into
      alloc_set_pte(), since there are failure cases (most commonly
      VM_FAULT_RETRY) which never reach finish_fault().
      
      Check and free it at the outer level in do_fault(), then we don't need
      to worry in alloc_set_pte(), and can restore that to how it was (I
      cannot find any reason to pte_free() under lock as it was doing).
      
      And fix a separate pagetable leak, or crash, introduced by the same
      change, that could only show up on some ppc64: why does do_set_pmd()'s
      failure case attempt to withdraw a pagetable when it never deposited
      one, at the same time overwriting (so leaking) the vmf->prealloc_pte?
      Residue of an earlier implementation, perhaps? Delete it.
      
      Fixes: 953c66c2 ("mm: THP page cache support for ppc64")
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Balbir Singh <bsingharora@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b0b9b3df
    • L
      Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · 87bc6107
      Linus Torvalds 提交于
      Pull kbuild fix from Michal Marek:
       "The asm-prototypes.h file added in the last merge window results in
        invalid code with CONFIG_KMEMCHECK=y. The net result is that genksyms
        segfaults.
      
        This pull request fixes the header, the genksyms fix is in my kbuild
        branch for 4.11"
      
      * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        asm-prototypes: Clear any CPP defines before declaring the functions
      87bc6107
    • G
      MAINTAINERS: add greybus subsystem mailing list · 01d0f715
      Greg Kroah-Hartman 提交于
      The Greybus driver subsystem has a mailing list, so list it in the
      MAINTAINERS file so that people know to send patches there as well.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NJohan Hovold <johan@kernel.org>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01d0f715
  4. 07 1月, 2017 19 次提交
  5. 06 1月, 2017 1 次提交