Skip to content
  1. Jan 15, 2022
    • Kefeng Wang's avatar
      mm: defer kmemleak object creation of module_alloc() · 60115fa5
      Kefeng Wang authored
      Yongqiang reports a kmemleak panic when module insmod/rmmod with KASAN
      enabled(without KASAN_VMALLOC) on x86[1].
      
      When the module area allocates memory, it's kmemleak_object is created
      successfully, but the KASAN shadow memory of module allocation is not
      ready, so when kmemleak scan the module's pointer, it will panic due to
      no shadow memory with KASAN check.
      
        module_alloc
          __vmalloc_node_range
            kmemleak_vmalloc
      				kmemleak_scan
      				  update_checksum
          kasan_module_alloc
            kmemleak_ignore
      
      Note, there is no problem if KASAN_VMALLOC enabled, the modules area
      entire shadow memory is preallocated.  Thus, the bug only exits on ARCH
      which supports dynamic allocation of module area per module load, for
      now, only x86/arm64/s390 are involved.
      
      Add a VM_DEFER_KMEMLEAK flags, defer vmalloc'ed object register of
      kmemleak in module_alloc() to fix this issue.
      
      [1] https://lore.kernel.org/all/6d41e2b9-4692-5ec4-b1cd-cbe29ae89739@huawei.com/
      
      [wangkefeng.wang@huawei.com: fix build]
        Link: https://lkml.kernel.org/r/20211125080307.27225-1-wangkefeng.wang@huawei.com
      [akpm@linux-foundation.org: simplify ifdefs, per Andrey]
        Link: https://lkml.kernel.org/r/CA+fCnZcnwJHUQq34VuRxpdoY6_XbJCDJ-jopksS5Eia4PijPzw@mail.gmail.com
      
      Link: https://lkml.kernel.org/r/20211124142034.192078-1-wangkefeng.wang@huawei.com
      Fixes: 793213a8 ("s390/kasan: dynamic shadow mem allocation for modules")
      Fixes: 39d114dd ("arm64: add KASAN support")
      Fixes: bebf56a1
      
       ("kasan: enable instrumentation of global variables")
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Reported-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Andrey Konovalov <andreyknvl@gmail.com>
      Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
      Cc: Alexander Gordeev <agordeev@linux.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60115fa5
    • Calvin Zhang's avatar
      mm: kmemleak: alloc gray object for reserved region with direct map · 972fa3a7
      Calvin Zhang authored
      
      
      Reserved regions with direct mapping may contain references to other
      regions.  CMA region with fixed location is reserved without creating
      kmemleak_object for it.
      
      So add them as gray kmemleak objects.
      
      Link: https://lkml.kernel.org/r/20211123090641.3654006-1-calvinzhang.cool@gmail.com
      Signed-off-by: default avatarCalvin Zhang <calvinzhang.cool@gmail.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      972fa3a7
    • Kuan-Ying Lee's avatar
      kmemleak: fix kmemleak false positive report with HW tag-based kasan enable · ad1a3e15
      Kuan-Ying Lee authored
      
      
      With HW tag-based kasan enable, We will get the warning when we free
      object whose address starts with 0xFF.
      
      It is because kmemleak rbtree stores tagged object and this freeing
      object's tag does not match with rbtree object.
      
      In the example below, kmemleak rbtree stores the tagged object in the
      kmalloc(), and kfree() gets the pointer with 0xFF tag.
      
      Call sequence:
          ptr = kmalloc(size, GFP_KERNEL);
          page = virt_to_page(ptr);
          offset = offset_in_page(ptr);
          kfree(page_address(page) + offset);
          ptr = kmalloc(size, GFP_KERNEL);
      
      A sequence like that may cause the warning as following:
      
       1) Freeing unknown object:
      
          In kfree(), we will get free unknown object warning in
          kmemleak_free(). Because object(0xFx) in kmemleak rbtree and
          pointer(0xFF) in kfree() have different tag.
      
       2) Overlap existing:
      
          When we allocate that object with the same hw-tag again, we will
          find the overlap in the kmemleak rbtree and kmemleak thread will be
          killed.
      
      	kmemleak: Freeing unknown object at 0xffff000003f88000
      	CPU: 5 PID: 177 Comm: cat Not tainted 5.16.0-rc1-dirty #21
      	Hardware name: linux,dummy-virt (DT)
      	Call trace:
      	 dump_backtrace+0x0/0x1ac
      	 show_stack+0x1c/0x30
      	 dump_stack_lvl+0x68/0x84
      	 dump_stack+0x1c/0x38
      	 kmemleak_free+0x6c/0x70
      	 slab_free_freelist_hook+0x104/0x200
      	 kmem_cache_free+0xa8/0x3d4
      	 test_version_show+0x270/0x3a0
      	 module_attr_show+0x28/0x40
      	 sysfs_kf_seq_show+0xb0/0x130
      	 kernfs_seq_show+0x30/0x40
      	 seq_read_iter+0x1bc/0x4b0
      	 seq_read_iter+0x1bc/0x4b0
      	 kernfs_fop_read_iter+0x144/0x1c0
      	 generic_file_splice_read+0xd0/0x184
      	 do_splice_to+0x90/0xe0
      	 splice_direct_to_actor+0xb8/0x250
      	 do_splice_direct+0x88/0xd4
      	 do_sendfile+0x2b0/0x344
      	 __arm64_sys_sendfile64+0x164/0x16c
      	 invoke_syscall+0x48/0x114
      	 el0_svc_common.constprop.0+0x44/0xec
      	 do_el0_svc+0x74/0x90
      	 el0_svc+0x20/0x80
      	 el0t_64_sync_handler+0x1a8/0x1b0
      	 el0t_64_sync+0x1ac/0x1b0
      	...
      	kmemleak: Cannot insert 0xf2ff000003f88000 into the object search tree (overlaps existing)
      	CPU: 5 PID: 178 Comm: cat Not tainted 5.16.0-rc1-dirty #21
      	Hardware name: linux,dummy-virt (DT)
      	Call trace:
      	 dump_backtrace+0x0/0x1ac
      	 show_stack+0x1c/0x30
      	 dump_stack_lvl+0x68/0x84
      	 dump_stack+0x1c/0x38
      	 create_object.isra.0+0x2d8/0x2fc
      	 kmemleak_alloc+0x34/0x40
      	 kmem_cache_alloc+0x23c/0x2f0
      	 test_version_show+0x1fc/0x3a0
      	 module_attr_show+0x28/0x40
      	 sysfs_kf_seq_show+0xb0/0x130
      	 kernfs_seq_show+0x30/0x40
      	 seq_read_iter+0x1bc/0x4b0
      	 kernfs_fop_read_iter+0x144/0x1c0
      	 generic_file_splice_read+0xd0/0x184
      	 do_splice_to+0x90/0xe0
      	 splice_direct_to_actor+0xb8/0x250
      	 do_splice_direct+0x88/0xd4
      	 do_sendfile+0x2b0/0x344
      	 __arm64_sys_sendfile64+0x164/0x16c
      	 invoke_syscall+0x48/0x114
      	 el0_svc_common.constprop.0+0x44/0xec
      	 do_el0_svc+0x74/0x90
      	 el0_svc+0x20/0x80
      	 el0t_64_sync_handler+0x1a8/0x1b0
      	 el0t_64_sync+0x1ac/0x1b0
      	kmemleak: Kernel memory leak detector disabled
      	kmemleak: Object 0xf2ff000003f88000 (size 128):
      	kmemleak:   comm "cat", pid 177, jiffies 4294921177
      	kmemleak:   min_count = 1
      	kmemleak:   count = 0
      	kmemleak:   flags = 0x1
      	kmemleak:   checksum = 0
      	kmemleak:   backtrace:
      	     kmem_cache_alloc+0x23c/0x2f0
      	     test_version_show+0x1fc/0x3a0
      	     module_attr_show+0x28/0x40
      	     sysfs_kf_seq_show+0xb0/0x130
      	     kernfs_seq_show+0x30/0x40
      	     seq_read_iter+0x1bc/0x4b0
      	     kernfs_fop_read_iter+0x144/0x1c0
      	     generic_file_splice_read+0xd0/0x184
      	     do_splice_to+0x90/0xe0
      	     splice_direct_to_actor+0xb8/0x250
      	     do_splice_direct+0x88/0xd4
      	     do_sendfile+0x2b0/0x344
      	     __arm64_sys_sendfile64+0x164/0x16c
      	     invoke_syscall+0x48/0x114
      	     el0_svc_common.constprop.0+0x44/0xec
      	     do_el0_svc+0x74/0x90
      	kmemleak: Automatic memory scanning thread ended
      
      [akpm@linux-foundation.org: whitespace tweak]
      
      Link: https://lkml.kernel.org/r/20211118054426.4123-1-Kuan-Ying.Lee@mediatek.com
      Signed-off-by: default avatarKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Doug Berger <opendmb@gmail.com>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ad1a3e15
    • Muchun Song's avatar
      mm: slab: make slab iterator functions static · c29b5b3d
      Muchun Song authored
      
      
      There is no external users of slab_start/next/stop(), so make them
      static.  And the memory.kmem.slabinfo is deprecated, which outputs
      nothing now, so move memcg_slab_show() into mm/memcontrol.c and rename
      it to mem_cgroup_slab_show to be consistent with other function names.
      
      Link: https://lkml.kernel.org/r/20211109133359.32881-1-songmuchun@bytedance.com
      Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c29b5b3d
    • Marco Elver's avatar
      mm/slab_common: use WARN() if cache still has objects on destroy · 7302e91f
      Marco Elver authored
      Calling kmem_cache_destroy() while the cache still has objects allocated
      is a kernel bug, and will usually result in the entire cache being
      leaked.  While the message in kmem_cache_destroy() resembles a warning,
      it is currently not implemented using a real WARN().
      
      This is problematic for infrastructure testing the kernel, all of which
      rely on the specific format of WARN()s to pick up on bugs.
      
      Some 13 years ago this used to be a simple WARN_ON() in slub, but commit
      d629d819
      
       ("slub: improve kmem_cache_destroy() error message")
      changed it into an open-coded warning to avoid confusion with a bug in
      slub itself.
      
      Instead, turn the open-coded warning into a real WARN() with the message
      preserved, so that test systems can actually identify these issues, and
      we get all the other benefits of using a normal WARN().  The warning
      message is extended with "when called from <caller-ip>" to make it even
      clearer where the fault lies.
      
      For most configurations this is only a cosmetic change, however, note
      that WARN() here will now also respect panic_on_warn.
      
      Link: https://lkml.kernel.org/r/20211102170733.648216-1-elver@google.com
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7302e91f
    • Amit Daniel Kachhap's avatar
      fs/ioctl: remove unnecessary __user annotation · a12cf8b3
      Amit Daniel Kachhap authored
      
      
      __user annotations are used by the checker (e.g sparse) to mark user
      pointers.  However here __user is applied to a struct directly, without a
      pointer being directly involved.
      
      Although the presence of __user does not cause sparse to emit a warning,
      __user should be removed for consistency with other uses of offsetof().
      
      Note: No functional changes intended.
      
      Link: https://lkml.kernel.org/r/20211122101256.7875-1-amit.kachhap@arm.com
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
      Cc: Kevin Brodsky <Kevin.Brodsky@arm.com>
      Cc: Al 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>
      a12cf8b3
    • Colin Ian King's avatar
      ocfs2: remove redundant assignment to variable free_space · 9a25d051
      Colin Ian King authored
      
      
      The variable 'free_space' is being initialized with a value that is not
      read, it is being re-assigned later in the two paths of an if statement.
      The early initialization is redundant and can be removed.
      
      Link: https://lkml.kernel.org/r/20220112230411.1090761-1-colin.i.king@gmail.com
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Acked-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9a25d051
    • Greg Kroah-Hartman's avatar
      ocfs2: cluster: use default_groups in kobj_type · d141b39b
      Greg Kroah-Hartman authored
      There are currently two ways to create a set of sysfs files for a
      kobj_type, through the default_attrs field, and the default_groups
      field.
      
      Move the ocfs2 cluster sysfs code to use default_groups field which has
      been the preferred way since aa30f47c
      
       ("kobject: Add support for
      default attribute groups to kobj_type") so that we can soon get rid of
      the obsolete default_attrs field.
      
      Link: https://lkml.kernel.org/r/20220106102028.3345634-1-gregkh@linuxfoundation.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Tested-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d141b39b
    • Colin Ian King's avatar
      ocfs2: remove redundant assignment to pointer root_bh · f018844f
      Colin Ian King authored
      
      
      The variable 'root_bh' is being initialized with a value that is not
      read, it is being re-assigned later on closer to its use.  The early
      initialization is redundant and can be removed.
      
      Link: https://lkml.kernel.org/r/20211228013719.620923-1-colin.i.king@gmail.com
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Acked-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f018844f
    • Greg Kroah-Hartman's avatar
      ocfs2: use default_groups in kobj_type · 59430cc1
      Greg Kroah-Hartman authored
      There are currently two ways to create a set of sysfs files for a
      kobj_type, through the default_attrs field, and the default_groups
      field.
      
      Move the ocfs2 code to use default_groups field which has been the
      preferred way since aa30f47c
      
       ("kobject: Add support for default
      attribute groups to kobj_type") so that we can soon get rid of the
      obsolete default_attrs field.
      
      Link: https://lkml.kernel.org/r/20211228144517.391660-1-gregkh@linuxfoundation.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      59430cc1
    • Joseph Qi's avatar
      ocfs2: clearly handle ocfs2_grab_pages_for_write() return value · e07bf00c
      Joseph Qi authored
      
      
      ocfs2_grab_pages_for_write() may return -EAGAIN if write context type is
      mmap and it could not lock the target page.  In this case, we exit with
      no error and no target page.  And then trigger the caller page_mkwrite()
      to retry.
      
      Since there are other caller types, e.g.  buffer and direct io, make the
      return value handling more clear.
      
      Link: https://lkml.kernel.org/r/20211206065051.103353-1-joseph.qi@linux.alibaba.com
      Signed-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e07bf00c
    • Zhang Mingyu's avatar
      ocfs2: use BUG_ON instead of if condition followed by BUG. · 783cc68d
      Zhang Mingyu authored
      
      
      This issue was detected with the help of Coccinelle.
      
      Link: https://lkml.kernel.org/r/20211105014424.75372-1-zhang.mingyu@zte.com.cn
      Signed-off-by: default avatarZhang Mingyu <zhang.mingyu@zte.com.cn>
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Acked-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      783cc68d
    • Zheng Liang's avatar
      squashfs: provide backing_dev_info in order to disable read-ahead · 9eec1d89
      Zheng Liang authored
      Commit c1f6925e ("mm: put readahead pages in cache earlier") causes
      the read performance of squashfs to deteriorate.Through testing, we find
      that the performance will be back by closing the readahead of squashfs.
      
      So we want to learn the way of ubifs, provides backing_dev_info and
      disable read-ahead
      
      We tested the following data by fio.
      squashfs image blocksize=128K
      test command:
      
        fio --name basic --bs=? --filename="/mnt/test_file" --rw=? --iodepth=1 --ioengine=psync --runtime=200 --time_based
      
        turn on squashfs readahead in 5.10 kernel
        bs(k)      read/randread           MB/s
        4            randread              271
        128          randread              231
        1024         randread              246
        4            read                  310
        128          read                  245
        1024         read                  247
      
        turn off squashfs readahead in 5.10 kernel
        bs(k)      read/randread           MB/s
        4            randread              293
        128          randread              330
        1024         randread              363
        4            read                  338
        128          read                  360
        1024         read                  365
      
        turn on squashfs readahead and revert the
        commit c1f6925e
      
      ("mm: put readahead
        pages in cache earlier") in 5.10 kernel
        bs(k)      read/randread           MB/s
        4           randread               289
        128         randread               306
        1024        randread               335
        4           read                   337
        128         read                   336
        1024        read                   338
      
      Link: https://lkml.kernel.org/r/20211116113141.1391026-1-zhengliang6@huawei.com
      Signed-off-by: default avatarZheng Liang <zhengliang6@huawei.com>
      Reviewed-by: default avatarPhillip Lougher <phillip@squashfs.org.uk>
      Cc: Zhang Yi <yi.zhang@huawei.com>
      Cc: Hou Tao <houtao1@huawei.com>
      Cc: Miao Xie <miaoxie@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9eec1d89
    • Yang Li's avatar
      fs/ntfs/attrib.c: fix one kernel-doc comment · 7e0af978
      Yang Li authored
      
      
      The comments for the file should not be in kernel-doc format:
      
      /**
       * attrib.c - NTFS attribute operations.  Part of the Linux-NTFS
      
      as it causes it to be incorrectly identified for function
      ntfs_map_runlist_nolock(), causing some warnings found by running
      scripts/kernel-doc.:
      
        fs/ntfs/attrib.c:25: warning: Incorrect use of kernel-doc format:  * ntfs_map_runlist_nolock - map (a part of) a runlist of an ntfs inode
        fs/ntfs/attrib.c:71: warning: Function parameter or member 'ni' not described in 'ntfs_map_runlist_nolock'
        fs/ntfs/attrib.c:71: warning: Function parameter or member 'vcn' not described in 'ntfs_map_runlist_nolock'
        fs/ntfs/attrib.c:71: warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'
        fs/ntfs/attrib.c:71: warning: expecting prototype for attrib.c - NTFS attribute operations.  Part of the Linux(). Prototype was for ntfs_map_runlist_nolock() instead
      
      Link: https://lkml.kernel.org/r/20220106015145.67067-1-yang.lee@linux.alibaba.com
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Anton Altaparmakov <anton@tuxera.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7e0af978
    • Drew Fustini's avatar
      scripts/spelling.txt: add "oveflow" · 9a69f2b0
      Drew Fustini authored
      
      
      Add typo "oveflow" for "overflow".  This typo was found and fixed in
      tools/testing/selftests/bpf/prog_tests/btf_dump.c
      
      Link: https://lore.kernel.org/all/20211122070528.837806-1-dfustini@baylibre.com/
      Link: https://lkml.kernel.org/r/20211122072302.839102-1-dfustini@baylibre.com
      Signed-off-by: default avatarDrew Fustini <dfustini@baylibre.com>
      Suggested-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Colin Ian King <colin.king@intel.com>
      Cc: Drew Fustini <dfustini@baylibre.com>
      Cc: zuoqilin <zuoqilin@yulong.com>
      Cc: Tom Saeger <tom.saeger@oracle.com>
      Cc: Sven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9a69f2b0
    • Greg Kroah-Hartman's avatar
      ia64: topology: use default_groups in kobj_type · a7eddfc9
      Greg Kroah-Hartman authored
      There are currently two ways to create a set of sysfs files for a kobj_type,
      through the default_attrs field, and the default_groups field.
      
      Move the ia64 topology sysfs code to use default_groups field which has
      been the preferred way since aa30f47c
      
       ("kobject: Add support for
      default attribute groups to kobj_type") so that we can soon get rid of
      the obsolete default_attrs field.
      
      Link: https://lkml.kernel.org/r/20220104154800.1287947-1-gregkh@linuxfoundation.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mike Rapoport <rppt@kernel.org>
      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>
      a7eddfc9
    • Jason Wang's avatar
      ia64: fix typo in a comment · c5c21354
      Jason Wang authored
      
      
      The double `the' in a comment is repeated, thus it should be removed.
      
      Link: https://lkml.kernel.org/r/20211113030316.22650-1-wangborong@cdjrlc.com
      Signed-off-by: default avatarJason Wang <wangborong@cdjrlc.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c5c21354
    • Yang Guang's avatar
      arch/ia64/kernel/setup.c: use swap() to make code cleaner · 6c4420b0
      Yang Guang authored
      
      
      Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
      opencoding it.
      
      Link: https://lkml.kernel.org/r/20211104001908.695110-1-yang.guang5@zte.com.cn
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
      Cc: David Yang <davidcomponentone@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c4420b0
    • Yang Guang's avatar
      ia64: module: use swap() to make code cleaner · f2fed022
      Yang Guang authored
      
      
      Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
      opencoding it.
      
      Link: https://lkml.kernel.org/r/20211104062642.1506539-1-yang.guang5@zte.com.cn
      Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Cc: David Yang <davidcomponentone@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2fed022
    • Cai Huoqing's avatar
      trace/hwlat: make use of the helper function kthread_run_on_cpu() · ff78f667
      Cai Huoqing authored
      
      
      Replace kthread_create_on_cpu/wake_up_process() with kthread_run_on_cpu()
      to simplify the code.
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-7-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ff78f667
    • Cai Huoqing's avatar
      trace/osnoise: make use of the helper function kthread_run_on_cpu() · 11e4e352
      Cai Huoqing authored
      
      
      Replace kthread_create_on_cpu/wake_up_process() with kthread_run_on_cpu()
      to simplify the code.
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-6-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      11e4e352
    • Cai Huoqing's avatar
      rcutorture: make use of the helper function kthread_run_on_cpu() · 3b9cb4ba
      Cai Huoqing authored
      
      
      Replace kthread_create_on_node/kthread_bind/wake_up_process() with
      kthread_run_on_cpu() to simplify the code.
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-5-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b9cb4ba
    • Cai Huoqing's avatar
      ring-buffer: make use of the helper function kthread_run_on_cpu() · 64ed3a04
      Cai Huoqing authored
      
      
      Replace kthread_create/kthread_bind/wake_up_process() with
      kthread_run_on_cpu() to simplify the code.
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-4-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64ed3a04
    • Cai Huoqing's avatar
      RDMA/siw: make use of the helper function kthread_run_on_cpu() · e0850113
      Cai Huoqing authored
      
      
      Replace kthread_create/kthread_bind/wake_up_process() with
      kthread_run_on_cpu() to simplify the code.
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-3-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e0850113
    • Cai Huoqing's avatar
      kthread: add the helper function kthread_run_on_cpu() · 800977f6
      Cai Huoqing authored
      
      
      Add a new helper function kthread_run_on_cpu(), which includes
      kthread_create_on_cpu/wake_up_process().
      
      In some cases, use kthread_run_on_cpu() directly instead of
      kthread_create_on_node/kthread_bind/wake_up_process() or
      kthread_create_on_cpu/wake_up_process() or
      kthreadd_create/kthread_bind/wake_up_process() to simplify the code.
      
      [akpm@linux-foundation.org: export kthread_create_on_cpu to modules]
      
      Link: https://lkml.kernel.org/r/20211022025711.3673-2-caihuoqing@baidu.com
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Cc: Bernard Metzler <bmt@zurich.ibm.com>
      Cc: Cai Huoqing <caihuoqing@baidu.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Paul E . McKenney" <paulmck@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      800977f6
  2. Jan 10, 2022
    • Linus Torvalds's avatar
      Linux 5.16 · df0cc57e
      Linus Torvalds authored
      v5.16
      df0cc57e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e900deb2
      Linus Torvalds authored
      Pull input fix from Dmitry Torokhov:
       "A small fixup to the Zinitix touchscreen driver to avoid enabling the
        IRQ line before we successfully requested it"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: zinitix - make sure the IRQ is allocated before it gets enabled
      e900deb2
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 95350123
      Linus Torvalds authored
      Pull ARM SoC fix from Olof Johansson:
       "One more fix for 5.16
      
        I had missed one patch when I sent up what I thought was the last
        batch of fixes for this release. This one fixes issues on the
        Raspberry Pi platforms due to gpio init changes this release, so
        hopefully we can get it merged before final release is cut"
      
      * tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: dts: gpio-ranges property is now required
      95350123
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of... · 9a12a5aa
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Revert "libtraceevent: Increase libtraceevent logging when verbose",
         breaks the build with libtraceevent-1.3.0, i.e. when building with
         'LIBTRACEEVENT_DYNAMIC=1'.
      
       - Avoid early exit in 'perf trace' due to running SIGCHLD handler
         before it makes sense to. It can happen when using a BPF source code
         event that have to be first built into an object file.
      
      * tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        Revert "libtraceevent: Increase libtraceevent logging when verbose"
        perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to
      9a12a5aa
    • Len Brown's avatar
      Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)" · df5bc0aa
      Len Brown authored
      This reverts commit f7d6779d.
      
      This bisected regression has impacted suspend-resume stability
      since 5.15-rc1. It regressed -stable via 5.14.10.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215315
      Fixes: f7d6779d
      
       ("drm/amdgpu: stop scheduler when calling hw_fini (v2)")
      Cc: Guchun Chen <guchun.chen@amd.com>
      Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
      Cc: Christian Koenig <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: <stable@vger.kernel.org> # 5.14+
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      df5bc0aa
  3. Jan 09, 2022
  4. Jan 08, 2022