Skip to content
  1. Jan 13, 2021
  2. Dec 19, 2020
  3. Dec 16, 2020
  4. Dec 14, 2020
  5. Dec 13, 2020
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6bff9bb8
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Five small fixes.  Four in drivers:
      
         - hisi_sas: fix internal queue timeout
      
         - be2iscsi: revert a prior fix causing problems
      
         - bnx2i: add missing dependency
      
         - storvsc: late arriving revert of a problem fix
      
        and one in the core.
      
        The core one is a minor change to stop paying attention to the busy
        count when returning out of resources because there's a race window
        where the queue might not restart due to missing returning I/O"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()"
        scsi: hisi_sas: Select a suitable queue for internal I/Os
        scsi: core: Fix race between handling STS_RESOURCE and completion
        scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()"
        scsi: bnx2i: Requires MMU
      6bff9bb8
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 5ee595d9
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "Bugfix for the AT24 EEPROM driver"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        misc: eeprom: at24: fix NVMEM name with custom AT24 device name
      5ee595d9
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7b1b868e
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Bugfixes for ARM, x86 and tools"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        tools/kvm_stat: Exempt time-based counters
        KVM: mmu: Fix SPTE encoding of MMIO generation upper half
        kvm: x86/mmu: Use cpuid to determine max gfn
        kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit()
        selftests: kvm/set_memory_region_test: Fix race in move region test
        KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort()
        KVM: arm64: Fix handling of merging tables into a block entry
        KVM: arm64: Fix memory leak on stage2 update of a valid PTE
      7b1b868e
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · b53966ff
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "A short series fixing a regression introduced in 5.9 for running as
        Xen dom0 on a system with NVMe backed storage"
      
      * tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: don't use page->lru for ZONE_DEVICE memory
        xen: add helpers for caching grant mapping pages
      b53966ff
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · b01deddb
      Linus Torvalds authored
      Pull RISC-V fix from Palmer Dabbelt:
       "Just one fix. It's nothing critical, just a randconfig that wasn't
        building. That said, it does seem pretty safe and is technically a
        regression so I'm sending it along for 5.10:
      
         - define get_cycles64() all the time, as it's used by most
           configurations"
      
      * tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Define get_cycles64() regardless of M-mode
      b01deddb
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block · 31d00f6e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two fixes in here, fixing issues introduced in this merge window"
      
      * tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block:
        io_uring: fix file leak on error path of io ctx creation
        io_uring: fix mis-seting personality's creds
      31d00f6e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 643e69af
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - a fix for cm109 stomping on its own control URB if it tries to toggle
         buzzer immediately after userspace opens input device (found by
         syzcaller)
      
       - another fix for Raydium touchscreens that do not like splitting
         command transfers
      
       - quirks for i8042, soc_button_array, and goodix drivers to make them
         work better with certain hardware.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
        Input: cm109 - do not stomp on control URB
        Input: i8042 - add Acer laptops to the i8042 reset list
        Input: cros_ec_keyb - send 'scancodes' in addition to key events
        Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the dmi_use_low_level_irq list
        Input: raydium_ts_i2c - do not split tx transactions
      643e69af
    • Mike Snitzer's avatar
      md: change mddev 'chunk_sectors' from int to unsigned · 6ffeb1c3
      Mike Snitzer authored
      Commit e2782f56 ("Revert "dm raid: remove unnecessary discard
      limits for raid10"") exposed compiler warnings introduced by commit
      e0910c8e
      
       ("dm raid: fix discard limits for raid1 and raid10"):
      
      In file included from ./include/linux/kernel.h:14,
                       from ./include/asm-generic/bug.h:20,
                       from ./arch/x86/include/asm/bug.h:93,
                       from ./include/linux/bug.h:5,
                       from ./include/linux/mmdebug.h:5,
                       from ./include/linux/gfp.h:5,
                       from ./include/linux/slab.h:15,
                       from drivers/md/dm-raid.c:8:
      drivers/md/dm-raid.c: In function ‘raid_io_hints’:
      ./include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast
        (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                  ^~
      ./include/linux/minmax.h:32:4: note: in expansion of macro ‘__typecheck’
         (__typecheck(x, y) && __no_side_effects(x, y))
          ^~~~~~~~~~~
      ./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’
        __builtin_choose_expr(__safe_cmp(x, y), \
                              ^~~~~~~~~~
      ./include/linux/minmax.h:51:19: note: in expansion of macro ‘__careful_cmp’
       #define min(x, y) __careful_cmp(x, y, <)
                         ^~~~~~~~~~~~~
      ./include/linux/minmax.h:84:39: note: in expansion of macro ‘min’
        __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
                                             ^~~
      drivers/md/dm-raid.c:3739:33: note: in expansion of macro ‘min_not_zero’
         limits->max_discard_sectors = min_not_zero(rs->md.chunk_sectors,
                                       ^~~~~~~~~~~~
      
      Fix this by changing the chunk_sectors member of 'struct mddev' from
      int to 'unsigned int' to match the type used for the 'chunk_sectors'
      member of 'struct queue_limits'.  Various MD code still uses 'int' but
      none of it appears to ever make use of signed int; and storing
      positive signed int in unsigned is perfectly safe.
      
      Reported-by: default avatarSong Liu <songliubraving@fb.com>
      Fixes: e2782f56 ("Revert "dm raid: remove unnecessary discard limits for raid10"")
      Fixes: e0910c8e ("dm raid: fix discard limits for raid1 and raid10")
      Cc: stable@vger,kernel.org # e0910c8e
      
       was marked for stable@
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Reviewed-by: default avatarSong Liu <song@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6ffeb1c3
  6. Dec 12, 2020
    • Masami Hiramatsu's avatar
      x86/kprobes: Fix optprobe to detect INT3 padding correctly · 0d07c0ec
      Masami Hiramatsu authored
      Commit
      
        7705dc85 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes")
      
      changed the padding bytes between functions from NOP to INT3. However,
      when optprobe decodes a target function it finds INT3 and gives up the
      jump optimization.
      
      Instead of giving up any INT3 detection, check whether the rest of the
      bytes to the end of the function are INT3. If all of them are INT3,
      those come from the linker. In that case, continue the optprobe jump
      optimization.
      
       [ bp: Massage commit message. ]
      
      Fixes: 7705dc85
      
       ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes")
      Reported-by: default avatarAdam Zabrocki <pi3@pi3.com.pl>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/160767025681.3880685.16021570341428835411.stgit@devnote2
      0d07c0ec
    • Simon Beginn's avatar
      Input: goodix - add upside-down quirk for Teclast X98 Pro tablet · cffdd6d9
      Simon Beginn authored
      
      
      The touchscreen on the Teclast x98 Pro is also mounted upside-down in
      relation to the display orientation.
      
      Signed-off-by: default avatarSimon Beginn <linux@simonmicro.de>
      Signed-off-by: default avatarBastien Nocera <hadess@hadess.net>
      Link: https://lore.kernel.org/r/20201117004253.27A5A27EFD@localhost
      
      
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      cffdd6d9
    • Stefan Raspl's avatar
      tools/kvm_stat: Exempt time-based counters · 111d0bda
      Stefan Raspl authored
      
      
      The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
      events. Instead they provide a time, and mess up our statistics. Therefore,
      we should exclude them.
      Removal is currently implemented with an exempt list. If more counters like
      these appear, we can think about a more general rule like excluding all
      fields name "*_ns", in case that's a standing convention.
      
      Signed-off-by: default avatarStefan Raspl <raspl@linux.ibm.com>
      Tested-and-reported-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Message-Id: <20201208210829.101324-1-raspl@linux.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      111d0bda
    • Maciej S. Szmigiero's avatar
      KVM: mmu: Fix SPTE encoding of MMIO generation upper half · 34c0f6f2
      Maciej S. Szmigiero authored
      Commit cae7ed3c ("KVM: x86: Refactor the MMIO SPTE generation handling")
      cleaned up the computation of MMIO generation SPTE masks, however it
      introduced a bug how the upper part was encoded:
      SPTE bits 52-61 were supposed to contain bits 10-19 of the current
      generation number, however a missing shift encoded bits 1-10 there instead
      (mostly duplicating the lower part of the encoded generation number that
      then consisted of bits 1-9).
      
      In the meantime, the upper part was shrunk by one bit and moved by
      subsequent commits to become an upper half of the encoded generation number
      (bits 9-17 of bits 0-17 encoded in a SPTE).
      
      In addition to the above, commit 56871d44 ("KVM: x86: fix overlap between SPTE_MMIO_MASK and generation")
      has changed the SPTE bit range assigned to encode the generation number and
      the total number of bits encoded but did not update them in the comment
      attached to their defines, nor in the KVM MMU doc.
      Let's do it here, too, since it is too trivial thing to warrant a separate
      commit.
      
      Fixes: cae7ed3c
      
       ("KVM: x86: Refactor the MMIO SPTE generation handling")
      Signed-off-by: default avatarMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
      Message-Id: <156700708db2a5296c5ed7a8b9ac71f1e9765c85.1607129096.git.maciej.szmigiero@oracle.com>
      Cc: stable@vger.kernel.org
      [Reorganize macros so that everything is computed from the bit ranges. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      34c0f6f2
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 7f376f19
      Linus Torvalds authored
      Pull mtd fixes from Miquel Raynal:
       "Second series of fixes for raw NAND drivers initiated because of a
        rework of the ECC engine subsystem.
      
        The location of the DT parsing logic got moved, breaking several
        drivers which in fact were not doing the ECC engine initialization at
        the right place.
      
        These drivers have been fixed by enforcing a particular ECC engine
        type and algorithm, software Hamming, while the algorithm may be
        overwritten by a DT property. This merge request fixes this in the
        xway, socrates, plat_nand, pasemi, orion, mpc5121, gpio, au1550 and
        ams-delta controller drivers"
      
      * tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: rawnand: xway: Do not force a particular software ECC engine
        mtd: rawnand: socrates: Do not force a particular software ECC engine
        mtd: rawnand: plat_nand: Do not force a particular software ECC engine
        mtd: rawnand: pasemi: Do not force a particular software ECC engine
        mtd: rawnand: orion: Do not force a particular software ECC engine
        mtd: rawnand: mpc5121: Do not force a particular software ECC engine
        mtd: rawnand: gpio: Do not force a particular software ECC engine
        mtd: rawnand: au1550: Do not force a particular software ECC engine
        mtd: rawnand: ams-delta: Do not force a particular software ECC engine
      7f376f19
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 1de5d12b
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "A couple of MMC fixes:
      
        MMC core:
         - Fixup condition for CMD13 polling for RPMB requests
      
        MMC host:
         - mtk-sd: Fix system suspend/resume support for CQHCI
         - mtd-sd: Extend SDIO IRQ fix to more variants
         - sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
         - tmio: Bring HW to a sane state after a power off"
      
      * tag 'mmc-v5.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: mediatek: mark PM functions as __maybe_unused
        mmc: block: Fixup condition for CMD13 polling for RPMB requests
        mmc: tmio: improve bringing HW to a sane state with MMC_POWER_OFF
        mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
        mmc: mediatek: Extend recheck_sdio_irq fix to more variants
        mmc: mediatek: Fix system suspend/resume support for CQHCI
      1de5d12b
    • Wolfram Sang's avatar
      Merge tag 'at24-fixes-for-v5.10' of... · e977aaf8
      Wolfram Sang authored
      Merge tag 'at24-fixes-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current
      
      at24 fixes for v5.10
      
      - fix NVMEM name with custom AT24 device name
      e977aaf8
    • Linus Torvalds's avatar
      Merge tag 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 782598ec
      Linus Torvalds authored
      Pull zonefs fix from Damien Le Moal:
       "A single patch in this pull request to fix a BIO and page reference
        leak when writing sequential zone files"
      
      * tag 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: fix page reference and BIO leak
      782598ec
    • Andrii Nakryiko's avatar
      bpf: Fix enum names for bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers · b7906b70
      Andrii Nakryiko authored
      Remove bpf_ prefix, which causes these helpers to be reported in verifier
      dump as bpf_bpf_this_cpu_ptr() and bpf_bpf_per_cpu_ptr(), respectively. Lets
      fix it as long as it is still possible before UAPI freezes on these helpers.
      
      Fixes: eaa6bcb7
      
       ("bpf: Introduce bpf_per_cpu_ptr()")
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b7906b70
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a06caa4a
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "8 patches.
      
        Subsystems affected by this patch series: proc, selftests, kbuild, and
        mm (pagecache, kasan, hugetlb)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm/hugetlb: clear compound_nr before freeing gigantic pages
        kasan: fix object remaining in offline per-cpu quarantine
        elfcore: fix building with clang
        initramfs: fix clang build failure
        kbuild: avoid static_assert for genksyms
        selftest/fpu: avoid clang warning
        proc: use untagged_addr() for pagemap_read addresses
        revert "mm/filemap: add static for function __add_to_page_cache_locked"
      a06caa4a
    • Gerald Schaefer's avatar
      mm/hugetlb: clear compound_nr before freeing gigantic pages · ba9c1201
      Gerald Schaefer authored
      Commit 1378a5ee ("mm: store compound_nr as well as compound_order")
      added compound_nr counter to first tail struct page, overlaying with
      page->mapping.  The overlay itself is fine, but while freeing gigantic
      hugepages via free_contig_range(), a "bad page" check will trigger for
      non-NULL page->mapping on the first tail page:
      
        BUG: Bad page state in process bash  pfn:380001
        page:00000000c35f0856 refcount:0 mapcount:0 mapping:00000000126b68aa index:0x0 pfn:0x380001
        aops:0x0
        flags: 0x3ffff00000000000()
        raw: 3ffff00000000000 0000000000000100 0000000000000122 0000000100000000
        raw: 0000000000000000 0000000000000000 ffffffff00000000 0000000000000000
        page dumped because: non-NULL mapping
        Modules linked in:
        CPU: 6 PID: 616 Comm: bash Not tainted 5.10.0-rc7-next-20201208 #1
        Hardware name: IBM 3906 M03 703 (LPAR)
        Call Trace:
          show_stack+0x6e/0xe8
          dump_stack+0x90/0xc8
          bad_page+0xd6/0x130
          free_pcppages_bulk+0x26a/0x800
          free_unref_page+0x6e/0x90
          free_contig_range+0x94/0xe8
          update_and_free_page+0x1c4/0x2c8
          free_pool_huge_page+0x11e/0x138
          set_max_huge_pages+0x228/0x300
          nr_hugepages_store_common+0xb8/0x130
          kernfs_fop_write+0xd2/0x218
          vfs_write+0xb0/0x2b8
          ksys_write+0xac/0xe0
          system_call+0xe6/0x288
        Disabling lock debugging due to kernel taint
      
      This is because only the compound_order is cleared in
      destroy_compound_gigantic_page(), and compound_nr is set to
      1U << order == 1 for order 0 in set_compound_order(page, 0).
      
      Fix this by explicitly clearing compound_nr for first tail page after
      calling set_compound_order(page, 0).
      
      Link: https://lkml.kernel.org/r/20201208182813.66391-2-gerald.schaefer@linux.ibm.com
      Fixes: 1378a5ee
      
       ("mm: store compound_nr as well as compound_order")
      Signed-off-by: default avatarGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: <stable@vger.kernel.org>	[5.9+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba9c1201
    • Kuan-Ying Lee's avatar
      kasan: fix object remaining in offline per-cpu quarantine · 6c82d45c
      Kuan-Ying Lee authored
      We hit this issue in our internal test.  When enabling generic kasan, a
      kfree()'d object is put into per-cpu quarantine first.  If the cpu goes
      offline, object still remains in the per-cpu quarantine.  If we call
      kmem_cache_destroy() now, slub will report "Objects remaining" error.
      
        =============================================================================
        BUG test_module_slab (Not tainted): Objects remaining in test_module_slab on __kmem_cache_shutdown()
        -----------------------------------------------------------------------------
      
        Disabling lock debugging due to kernel taint
        INFO: Slab 0x(____ptrval____) objects=34 used=1 fp=0x(____ptrval____) flags=0x2ffff00000010200
        CPU: 3 PID: 176 Comm: cat Tainted: G    B             5.10.0-rc1-00007-g4525c8781ec0-dirty #10
        Hardware name: linux,dummy-virt (DT)
        Call trace:
           dump_backtrace+0x0/0x2b0
           show_stack+0x18/0x68
           dump_stack+0xfc/0x168
           slab_err+0xac/0xd4
           __kmem_cache_shutdown+0x1e4/0x3c8
           kmem_cache_destroy+0x68/0x130
           test_version_show+0x84/0xf0
           module_attr_show+0x40/0x60
           sysfs_kf_seq_show+0x128/0x1c0
           kernfs_seq_show+0xa0/0xb8
           seq_read+0x1f0/0x7e8
           kernfs_fop_read+0x70/0x338
           vfs_read+0xe4/0x250
           ksys_read+0xc8/0x180
           __arm64_sys_read+0x44/0x58
           el0_svc_common.constprop.0+0xac/0x228
           do_el0_svc+0x38/0xa0
           el0_sync_handler+0x170/0x178
           el0_sync+0x174/0x180
        INFO: Object 0x(____ptrval____) @offset=15848
        INFO: Allocated in test_version_show+0x98/0xf0 age=8188 cpu=6 pid=172
           stack_trace_save+0x9c/0xd0
           set_track+0x64/0xf0
           alloc_debug_processing+0x104/0x1a0
           ___slab_alloc+0x628/0x648
           __slab_alloc.isra.0+0x2c/0x58
           kmem_cache_alloc+0x560/0x588
           test_version_show+0x98/0xf0
           module_attr_show+0x40/0x60
           sysfs_kf_seq_show+0x128/0x1c0
           kernfs_seq_show+0xa0/0xb8
           seq_read+0x1f0/0x7e8
           kernfs_fop_read+0x70/0x338
           vfs_read+0xe4/0x250
           ksys_read+0xc8/0x180
           __arm64_sys_read+0x44/0x58
           el0_svc_common.constprop.0+0xac/0x228
        kmem_cache_destroy test_module_slab: Slab cache still has objects
      
      Register a cpu hotplug function to remove all objects in the offline
      per-cpu quarantine when cpu is going offline.  Set a per-cpu variable to
      indicate this cpu is offline.
      
      [qiang.zhang@windriver.com: fix slab double free when cpu-hotplug]
        Link: https://lkml.kernel.org/r/20201204102206.20237-1-qiang.zhang@windriver.com
      
      Link: https://lkml.kernel.org/r/1606895585-17382-2-git-send-email-Kuan-Ying.Lee@mediatek.com
      
      
      Signed-off-by: default avatarKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
      Signed-off-by: default avatarZqiang <qiang.zhang@windriver.com>
      Suggested-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reported-by: default avatarGuangye Yang <guangye.yang@mediatek.com>
      Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Nicholas Tang <nicholas.tang@mediatek.com>
      Cc: Miles Chen <miles.chen@mediatek.com>
      Cc: Qian Cai <qcai@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c82d45c
    • Arnd Bergmann's avatar
      elfcore: fix building with clang · 6e7b64b9
      Arnd Bergmann authored
      kernel/elfcore.c only contains weak symbols, which triggers a bug with
      clang in combination with recordmcount:
      
        Cannot find symbol for section 2: .text.
        kernel/elfcore.o: failed
      
      Move the empty stubs into linux/elfcore.h as inline functions.  As only
      two architectures use these, just use the architecture specific Kconfig
      symbols to key off the declaration.
      
      Link: https://lkml.kernel.org/r/20201204165742.3815221-2-arnd@kernel.org
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Nathan Chancellor <natechancellor@gmail.com>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Barret Rhoden <brho@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6e7b64b9
    • Arnd Bergmann's avatar
      initramfs: fix clang build failure · 55d5b7dd
      Arnd Bergmann authored
      There is only one function in init/initramfs.c that is in the .text
      section, and it is marked __weak.  When building with clang-12 and the
      integrated assembler, this leads to a bug with recordmcount:
      
        ./scripts/recordmcount  "init/initramfs.o"
        Cannot find symbol for section 2: .text.
        init/initramfs.o: failed
      
      I'm not quite sure what exactly goes wrong, but I notice that this
      function is only ever called from an __init function, and normally
      inlined.  Marking it __init as well is clearly correct and it leads to
      recordmcount no longer complaining.
      
      Link: https://lkml.kernel.org/r/20201204165742.3815221-1-arnd@kernel.org
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Nathan Chancellor <natechancellor@gmail.com>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Barret Rhoden <brho@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      55d5b7dd