Skip to content
  1. Jan 05, 2020
    • Waiman Long's avatar
      mm/hugetlb: defer freeing of huge pages if in non-task context · c77c0a8a
      Waiman Long authored
      
      
      The following lockdep splat was observed when a certain hugetlbfs test
      was run:
      
        ================================
        WARNING: inconsistent lock state
        4.18.0-159.el8.x86_64+debug #1 Tainted: G        W --------- -  -
        --------------------------------
        inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
        swapper/30/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
        ffffffff9acdc038 (hugetlb_lock){+.?.}, at: free_huge_page+0x36f/0xaa0
        {SOFTIRQ-ON-W} state was registered at:
          lock_acquire+0x14f/0x3b0
          _raw_spin_lock+0x30/0x70
          __nr_hugepages_store_common+0x11b/0xb30
          hugetlb_sysctl_handler_common+0x209/0x2d0
          proc_sys_call_handler+0x37f/0x450
          vfs_write+0x157/0x460
          ksys_write+0xb8/0x170
          do_syscall_64+0xa5/0x4d0
          entry_SYSCALL_64_after_hwframe+0x6a/0xdf
        irq event stamp: 691296
        hardirqs last  enabled at (691296): [<ffffffff99bb034b>] _raw_spin_unlock_irqrestore+0x4b/0x60
        hardirqs last disabled at (691295): [<ffffffff99bb0ad2>] _raw_spin_lock_irqsave+0x22/0x81
        softirqs last  enabled at (691284): [<ffffffff97ff0c63>] irq_enter+0xc3/0xe0
        softirqs last disabled at (691285): [<ffffffff97ff0ebe>] irq_exit+0x23e/0x2b0
      
        other info that might help us debug this:
         Possible unsafe locking scenario:
      
               CPU0
               ----
          lock(hugetlb_lock);
          <Interrupt>
            lock(hugetlb_lock);
      
         *** DEADLOCK ***
            :
        Call Trace:
         <IRQ>
         __lock_acquire+0x146b/0x48c0
         lock_acquire+0x14f/0x3b0
         _raw_spin_lock+0x30/0x70
         free_huge_page+0x36f/0xaa0
         bio_check_pages_dirty+0x2fc/0x5c0
         clone_endio+0x17f/0x670 [dm_mod]
         blk_update_request+0x276/0xe50
         scsi_end_request+0x7b/0x6a0
         scsi_io_completion+0x1c6/0x1570
         blk_done_softirq+0x22e/0x350
         __do_softirq+0x23d/0xad8
         irq_exit+0x23e/0x2b0
         do_IRQ+0x11a/0x200
         common_interrupt+0xf/0xf
         </IRQ>
      
      Both the hugetbl_lock and the subpool lock can be acquired in
      free_huge_page().  One way to solve the problem is to make both locks
      irq-safe.  However, Mike Kravetz had learned that the hugetlb_lock is
      held for a linear scan of ALL hugetlb pages during a cgroup reparentling
      operation.  So it is just too long to have irq disabled unless we can
      break hugetbl_lock down into finer-grained locks with shorter lock hold
      times.
      
      Another alternative is to defer the freeing to a workqueue job.  This
      patch implements the deferred freeing by adding a free_hpage_workfn()
      work function to do the actual freeing.  The free_huge_page() call in a
      non-task context saves the page to be freed in the hpage_freelist linked
      list in a lockless manner using the llist APIs.
      
      The generic workqueue is used to process the work, but a dedicated
      workqueue can be used instead if it is desirable to have the huge page
      freed ASAP.
      
      Thanks to Kirill Tkhai <ktkhai@virtuozzo.com> for suggesting the use of
      llist APIs which simplfy the code.
      
      Link: http://lkml.kernel.org/r/20191217170331.30893-1-longman@redhat.com
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
      Acked-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Reviewed-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c77c0a8a
    • Navid Emamdoost's avatar
      mm/gup: fix memory leak in __gup_benchmark_ioctl · a7c46c0c
      Navid Emamdoost authored
      In the implementation of __gup_benchmark_ioctl() the allocated pages
      should be released before returning in case of an invalid cmd.  Release
      pages via kvfree().
      
      [akpm@linux-foundation.org: rework code flow, return -EINVAL rather than -1]
      Link: http://lkml.kernel.org/r/20191211174653.4102-1-navid.emamdoost@gmail.com
      Fixes: 714a3a1e
      
       ("mm/gup_benchmark.c: add additional pinning methods")
      Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: David Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a7c46c0c
    • Ilya Dryomov's avatar
      mm/oom: fix pgtables units mismatch in Killed process message · 941f762b
      Ilya Dryomov authored
      pr_err() expects kB, but mm_pgtables_bytes() returns the number of bytes.
      As everything else is printed in kB, I chose to fix the value rather than
      the string.
      
      Before:
      
      [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
      ...
      [   1878]  1000  1878   217253   151144  1269760        0             0 python
      ...
      Out of memory: Killed process 1878 (python) total-vm:869012kB, anon-rss:604572kB, file-rss:4kB, shmem-rss:0kB, UID:1000 pgtables:1269760kB oom_score_adj:0
      
      After:
      
      [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
      ...
      [   1436]  1000  1436   217253   151890  1294336        0             0 python
      ...
      Out of memory: Killed process 1436 (python) total-vm:869012kB, anon-rss:607516kB, file-rss:44kB, shmem-rss:0kB, UID:1000 pgtables:1264kB oom_score_adj:0
      
      Link: http://lkml.kernel.org/r/20191211202830.1600-1-idryomov@gmail.com
      Fixes: 70cb6d26
      
       ("mm/oom: add oom_score_adj and pgtables to Killed process message")
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Edward Chron <echron@arista.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      941f762b
    • Randy Dunlap's avatar
      fs/posix_acl.c: fix kernel-doc warnings · e39e773a
      Randy Dunlap authored
      Fix kernel-doc warnings in fs/posix_acl.c.
      Also fix one typo (setgit -> setgid).
      
        fs/posix_acl.c:647: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode'
        fs/posix_acl.c:647: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode'
        fs/posix_acl.c:647: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode'
      
      Link: http://lkml.kernel.org/r/29b0dc46-1f28-a4e5-b1d0-ba2b65629779@infradead.org
      Fixes: 07393101
      
       ("posix_acl: Clear SGID bit when setting file permissions")
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Andreas Gruenbacher <agruenba@redhat.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e39e773a
    • Nick Desaulniers's avatar
      hexagon: work around compiler crash · 63e80314
      Nick Desaulniers authored
      
      
      Clang cannot translate the string "r30" into a valid register yet.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/755
      Link: http://lkml.kernel.org/r/20191028155722.23419-1-ndesaulniers@google.com
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Suggested-by: default avatarSid Manning <sidneym@quicinc.com>
      Reviewed-by: default avatarBrian Cain <bcain@codeaurora.org>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Richard Fontana <rfontana@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      63e80314
    • Nick Desaulniers's avatar
      hexagon: parenthesize registers in asm predicates · 780a0cfd
      Nick Desaulniers authored
      
      
      Hexagon requires that register predicates in assembly be parenthesized.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/754
      Link: http://lkml.kernel.org/r/20191209222956.239798-3-ndesaulniers@google.com
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Suggested-by: default avatarSid Manning <sidneym@codeaurora.org>
      Acked-by: default avatarBrian Cain <bcain@codeaurora.org>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Tuowen Zhao <ztuowen@gmail.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alexios Zavras <alexios.zavras@intel.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Will Deacon <will@kernel.org>
      Cc: Richard Fontana <rfontana@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      780a0cfd
    • Eric Biggers's avatar
      fs/namespace.c: make to_mnt_ns() static · 213921f9
      Eric Biggers authored
      
      
      Make to_mnt_ns() static to address the following 'sparse' warning:
      
          fs/namespace.c:1731:22: warning: symbol 'to_mnt_ns' was not declared. Should it be static?
      
      Link: http://lkml.kernel.org/r/20191209234830.156260-1-ebiggers@kernel.org
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      213921f9
    • Eric Biggers's avatar
      fs/nsfs.c: include headers for missing declarations · 7bebd69e
      Eric Biggers authored
      
      
      Include linux/proc_fs.h and fs/internal.h to address the following
      'sparse' warnings:
      
          fs/nsfs.c:41:32: warning: symbol 'ns_dentry_operations' was not declared. Should it be static?
          fs/nsfs.c:145:5: warning: symbol 'open_related_ns' was not declared. Should it be static?
      
      Link: http://lkml.kernel.org/r/20191209234822.156179-1-ebiggers@kernel.org
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7bebd69e
    • Eric Biggers's avatar
      fs/direct-io.c: include fs/internal.h for missing prototype · b16155a0
      Eric Biggers authored
      
      
      Include fs/internal.h to address the following 'sparse' warning:
      
          fs/direct-io.c:591:5: warning: symbol 'sb_init_dio_done_wq' was not declared. Should it be static?
      
      Link: http://lkml.kernel.org/r/20191209234544.128302-1-ebiggers@kernel.org
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b16155a0
    • Yang Shi's avatar
      mm: move_pages: return valid node id in status if the page is already on the target node · e0153fc2
      Yang Shi authored
      Felix Abecassis reports move_pages() would return random status if the
      pages are already on the target node by the below test program:
      
        int main(void)
        {
      	const long node_id = 1;
      	const long page_size = sysconf(_SC_PAGESIZE);
      	const int64_t num_pages = 8;
      
      	unsigned long nodemask =  1 << node_id;
      	long ret = set_mempolicy(MPOL_BIND, &nodemask, sizeof(nodemask));
      	if (ret < 0)
      		return (EXIT_FAILURE);
      
      	void **pages = malloc(sizeof(void*) * num_pages);
      	for (int i = 0; i < num_pages; ++i) {
      		pages[i] = mmap(NULL, page_size, PROT_WRITE | PROT_READ,
      				MAP_PRIVATE | MAP_POPULATE | MAP_ANONYMOUS,
      				-1, 0);
      		if (pages[i] == MAP_FAILED)
      			return (EXIT_FAILURE);
      	}
      
      	ret = set_mempolicy(MPOL_DEFAULT, NULL, 0);
      	if (ret < 0)
      		return (EXIT_FAILURE);
      
      	int *nodes = malloc(sizeof(int) * num_pages);
      	int *status = malloc(sizeof(int) * num_pages);
      	for (int i = 0; i < num_pages; ++i) {
      		nodes[i] = node_id;
      		status[i] = 0xd0; /* simulate garbage values */
      	}
      
      	ret = move_pages(0, num_pages, pages, nodes, status, MPOL_MF_MOVE);
      	printf("move_pages: %ld\n", ret);
      	for (int i = 0; i < num_pages; ++i)
      		printf("status[%d] = %d\n", i, status[i]);
        }
      
      Then running the program would return nonsense status values:
      
        $ ./move_pages_bug
        move_pages: 0
        status[0] = 208
        status[1] = 208
        status[2] = 208
        status[3] = 208
        status[4] = 208
        status[5] = 208
        status[6] = 208
        status[7] = 208
      
      This is because the status is not set if the page is already on the
      target node, but move_pages() should return valid status as long as it
      succeeds.  The valid status may be errno or node id.
      
      We can't simply initialize status array to zero since the pages may be
      not on node 0.  Fix it by updating status with node id which the page is
      already on.
      
      Link: http://lkml.kernel.org/r/1575584353-125392-1-git-send-email-yang.shi@linux.alibaba.com
      Fixes: a49bd4d7
      
       ("mm, numa: rework do_pages_move")
      Signed-off-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
      Reported-by: default avatarFelix Abecassis <fabecassis@nvidia.com>
      Tested-by: default avatarFelix Abecassis <fabecassis@nvidia.com>
      Suggested-by: default avatarMichal Hocko <mhocko@suse.com>
      Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: <stable@vger.kernel.org>	[4.17+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e0153fc2
    • Shakeel Butt's avatar
      memcg: account security cred as well to kmemcg · 84029fd0
      Shakeel Butt authored
      
      
      The cred_jar kmem_cache is already memcg accounted in the current kernel
      but cred->security is not.  Account cred->security to kmemcg.
      
      Recently we saw high root slab usage on our production and on further
      inspection, we found a buggy application leaking processes.  Though that
      buggy application was contained within its memcg but we observe much
      more system memory overhead, couple of GiBs, during that period.  This
      overhead can adversely impact the isolation on the system.
      
      One source of high overhead we found was cred->security objects, which
      have a lifetime of at least the life of the process which allocated
      them.
      
      Link: http://lkml.kernel.org/r/20191205223721.40034-1-shakeelb@google.com
      Signed-off-by: default avatarShakeel Butt <shakeelb@google.com>
      Acked-by: default avatarChris Down <chris@chrisdown.name>
      Reviewed-by: default avatarRoman Gushchin <guro@fb.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      84029fd0
    • Andrey Konovalov's avatar
      kcov: fix struct layout for kcov_remote_arg · a69b83e1
      Andrey Konovalov authored
      Make the layout of kcov_remote_arg the same for 32-bit and 64-bit code.
      This makes it more convenient to write userspace apps that can be
      compiled into 32-bit or 64-bit binaries and still work with the same
      64-bit kernel.
      
      Also use proper __u32 types in uapi headers instead of unsigned ints.
      
      Link: http://lkml.kernel.org/r/9e91020876029cfefc9211ff747685eba9536426.1575638983.git.andreyknvl@google.com
      Fixes: eec028c9
      
       ("kcov: remote coverage support")
      Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Acked-by: default avatarMarco Elver <elver@google.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: "Jacky . Cao @ sony . com" <Jacky.Cao@sony.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Marco Elver <elver@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a69b83e1
    • Chanho Min's avatar
      mm/zsmalloc.c: fix the migrated zspage statistics. · ac8f05da
      Chanho Min authored
      When zspage is migrated to the other zone, the zone page state should be
      updated as well, otherwise the NR_ZSPAGE for each zone shows wrong
      counts including proc/zoneinfo in practice.
      
      Link: http://lkml.kernel.org/r/1575434841-48009-1-git-send-email-chanho.min@lge.com
      Fixes: 91537fee
      
       ("mm: add NR_ZSMALLOC to vmstat")
      Signed-off-by: default avatarChanho Min <chanho.min@lge.com>
      Signed-off-by: default avatarJinsuk Choi <jjinsuk.choi@lge.com>
      Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: default avatarMinchan Kim <minchan@kernel.org>
      Cc: <stable@vger.kernel.org>        [4.9+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ac8f05da
    • David Hildenbrand's avatar
      mm/memory_hotplug: shrink zones when offlining memory · feee6b29
      David Hildenbrand authored
      We currently try to shrink a single zone when removing memory.  We use
      the zone of the first page of the memory we are removing.  If that
      memmap was never initialized (e.g., memory was never onlined), we will
      read garbage and can trigger kernel BUGs (due to a stale pointer):
      
          BUG: unable to handle page fault for address: 000000000000353d
          #PF: supervisor write access in kernel mode
          #PF: error_code(0x0002) - not-present page
          PGD 0 P4D 0
          Oops: 0002 [#1] SMP PTI
          CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.3.0-rc5-next-20190820+ #317
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.4
          Workqueue: kacpi_hotplug acpi_hotplug_work_fn
          RIP: 0010:clear_zone_contiguous+0x5/0x10
          Code: 48 89 c6 48 89 c3 e8 2a fe ff ff 48 85 c0 75 cf 5b 5d c3 c6 85 fd 05 00 00 01 5b 5d c3 0f 1f 840
          RSP: 0018:ffffad2400043c98 EFLAGS: 00010246
          RAX: 0000000000000000 RBX: 0000000200000000...
      feee6b29
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma · 5613970a
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "A bunch of fixes for:
      
         - uninitialized dma_slave_caps access
      
         - virt-dma use after free in vchan_complete()
      
         - driver fixes for ioat, k3dma and jz4780"
      
      * tag 'dmaengine-fix-5.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
        ioat: ioat_alloc_ring() failure handling.
        dmaengine: virt-dma: Fix access after free in vchan_complete()
        dmaengine: k3dma: Avoid null pointer traversal
        dmaengine: dma-jz4780: Also break descriptor chains on JZ4725B
        dmaengine: Fix access to uninitialized dma_slave_caps
      5613970a
    • Linus Torvalds's avatar
      Merge tag 'media/v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 50978df3
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - some fixes at CEC core to comply with HDMI 2.0 specs and fix some
         border cases
      
       - a fix at the transmission logic of the pulse8-cec driver
      
       - one alignment fix on a data struct at ipu3 when built with 32 bits
      
      * tag 'media/v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes
        media: pulse8-cec: fix lost cec_transmit_attempt_done() call
        media: cec: check 'transmit_in_progress', not 'transmitting'
        media: cec: avoid decrementing transmit_queue_sz if it is 0
        media: cec: CEC 2.0-only bcast messages were ignored
      50978df3
  2. Jan 04, 2020
    • Linus Torvalds's avatar
      Merge tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 3a562aee
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few fixes for btrfs:
      
         - blkcg accounting problem with compression that could stall writes
      
         - setting up blkcg bio for compression crashes due to NULL bdev
           pointer
      
         - fix possible infinite loop in writeback for nocow files (here
           possible means almost impossible, 13 things that need to happen to
           trigger it)"
      
      * tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix infinite loop during nocow writeback due to race
        btrfs: fix compressed write bio blkcg attribution
        btrfs: punt all bios created in btrfs_submit_compressed_write()
      3a562aee
    • Linus Torvalds's avatar
      Merge tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block · b6b4aafc
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Three fixes in here:
      
         - Fix for a missing split on default memory boundary mask (4G) (Ming)
      
         - Fix for multi-page read bio truncate (Ming)
      
         - Fix for null_blk zone close request handling (Damien)"
      
      * tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block:
        null_blk: Fix REQ_OP_ZONE_CLOSE handling
        block: fix splitting segments on boundary masks
        block: add bio_truncate to fix guard_bio_eod
      b6b4aafc
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.5-2' of... · bed72351
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - fix build error in usr/gen_initramfs_list.sh
      
       - fix libelf-dev dependency in deb-pkg build
      
      * tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild/deb-pkg: annotate libelf-dev dependency as :native
        gen_initramfs_list.sh: fix 'bad variable name' error
      bed72351
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2020-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · d9c82fd8
      Linus Torvalds authored
      Pull thread fixes from Christian Brauner:
       "Here are two fixes:
      
         - Panic earlier when global init exits to generate useable coredumps.
      
           Currently, when global init and all threads in its thread-group
           have exited we panic via:
      
             do_exit()
             -> exit_notify()
                -> forget_original_parent()
                   -> find_child_reaper()
      
           This makes it hard to extract a useable coredump for global init
           from a kernel crashdump because by the time we panic exit_mm() will
           have already released global init's mm. We now panic slightly
           earlier. This has been a problem in certain environments such as
           Android.
      
         - Fix a race in assigning and reading taskstats for thread-groups
           with more than one thread.
      
           This patch has been waiting for quite a while since people
           disagreed on what the correct fix was at first"
      
      * tag 'for-linus-2020-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        exit: panic before exit_mm() on global init exit
        taskstats: fix data-race
      d9c82fd8
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6f2e9c3d
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Two more powerpc fixes for 5.5:
      
         - One commit to fix a build error when CONFIG_JUMP_LABEL=n,
           introduced by our recent fix to is_shared_processor().
      
         - A commit marking some SLB related functions as notrace, as tracing
           them triggers warnings.
      
        Thanks to Jason A Donenfeld"
      
      * tag 'powerpc-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/spinlocks: Include correct header for static key
        powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace
      6f2e9c3d
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · e35d0165
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Nothing to worry at this stage but all nice small changes:
      
         - A regression fix for AMD GPU detection in HD-audio
      
         - A long-standing sleep-in-atomic fix for an ice1724 device
      
         - Usual suspects, the device-specific quirks for HD- and USB-audio"
      
      * tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC
        ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
        ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker
        ALSA: hda - Apply sync-write workaround to old Intel platforms, too
        ALSA: hda/hdmi - fix atpx_present when CLASS is not VGA
        ALSA: usb-audio: fix set_format altsetting sanity check
        ALSA: hda/realtek - Add headset Mic no shutup for ALC283
        ALSA: usb-audio: set the interface format after resume on Dell WD19
      e35d0165
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-01-03' of git://anongit.freedesktop.org/drm/drm · ca78fdeb
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "New Years fixes! Mostly amdgpu with a light smattering of arm
        graphics, and two AGP warning fixes.
      
        Quiet as expected, hopefully we don't get a post holiday rush.
      
        agp:
         - two unused variable removed
      
        amdgpu:
         - ATPX regression fix
         - SMU metrics table locking fixes
         - gfxoff fix for raven
         - RLC firmware loading stability fix
      
        mediatek:
         - external display fix
         - dsi timing fix
      
        sun4i:
         - Fix double-free in connector/encoder cleanup (Stefan)
      
        maildp:
         - Make vtable static (Ben)"
      
      * tag 'drm-fixes-2020-01-03' of git://anongit.freedesktop.org/drm/drm:
        agp: remove unused variable arqsz in agp_3_5_enable()
        agp: remove unused variable mcapndx
        drm/amdgpu: correct RLC firmwares loading sequence
        drm/amdgpu: enable gfxoff for raven1 refresh
        drm/amdgpu/smu: add metrics table lock for vega20 (v2)
        drm/amdgpu/smu: add metrics table lock for navi (v2)
        drm/amdgpu/smu: add metrics table lock for arcturus (v2)
        drm/amdgpu/smu: add metrics table lock
        Revert "drm/amdgpu: simplify ATPX detection"
        drm/arm/mali: make malidp_mw_connector_helper_funcs static
        drm/sun4i: hdmi: Remove duplicate cleanup calls
        drm/mediatek: reduce the hbp and hfp for phy timing
        drm/mediatek: Fix can't get component for external display plane.
        drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane.
      ca78fdeb
    • Jan Stancek's avatar
      mm/hugetlbfs: fix for_each_hstate() loop in init_hugetlbfs_fs() · 15f0ec94
      Jan Stancek authored
      LTP memfd_create04 started failing for some huge page sizes
      after v5.4-10135-gc3bfc5dd73c6.
      
      The problem is the check introduced to for_each_hstate() loop that
      should skip default_hstate_idx.  Since it doesn't update 'i' counter,
      all subsequent huge page sizes are skipped as well.
      
      Fixes: 8fc312b3
      
       ("mm/hugetlbfs: fix error handling when setting up mounts")
      Signed-off-by: default avatarJan Stancek <jstancek@redhat.com>
      Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      15f0ec94
  3. Jan 03, 2020