1. 26 Sep, 2020 2 commits
    • Shakeel Butt's avatar
      mm: slab: fix potential double free in ___cache_free · 678ff6a7
      Shakeel Butt authored
      With the commit 10befea9 ("mm: memcg/slab: use a single set of
      kmem_caches for all allocations"), it becomes possible to call kfree()
      from the slabs_destroy().
      
      The functions cache_flusharray() and do_drain() calls slabs_destroy() on
      array_cache of the local CPU without updating the size of the
      array_cache.  This enables the kfree() call from the slabs_destroy() to
      recursively call cache_flusharray() which can potentially call
      free_block() on the same elements of the array_cache of the local CPU
      and causing double free and memory corruption.
      
      To fix the issue, simply update the local CPU array_cache cache before
      calling slabs_destroy().
      
      Fixes: 10befea9 ("mm: memcg/slab: use a single set of kmem_caches for all allocations")
      Signed-off-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarRoman Gushchin <guro@fb.com>
      Tested-by: default avatarMing Lei <ming.lei@redhat.com>
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ted Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      678ff6a7
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7c7ec322
      Linus Torvalds authored
      Pull more kvm fixes from Paolo Bonzini:
       "Five small fixes.
      
        The nested migration bug will be fixed with a better API in 5.10 or
        5.11, for now this is a fix that works with existing userspace but
        keeps the current ugly API"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: SVM: Add a dedicated INVD intercept routine
        KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
        KVM: x86: fix MSR_IA32_TSC read for nested migration
        selftests: kvm: Fix assert failure in single-step test
        KVM: x86: VMX: Make smaller physical guest address space support user-configurable
      7c7ec322
  2. 25 Sep, 2020 15 commits
  3. 24 Sep, 2020 6 commits
  4. 23 Sep, 2020 16 commits
  5. 22 Sep, 2020 1 commit