1. 26 Dec, 2021 35 commits
  2. 25 Dec, 2021 5 commits
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.16-rc7' of... · e2ae0d4a
      Linus Torvalds authored
      Merge tag 'hwmon-for-v5.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "A couple of lm90 driver fixes. None of them are critical, but they
        should nevertheless be fixed"
      
      * tag 'hwmon-for-v5.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (lm90) Do not report 'busy' status bit as alarm
        hwmom: (lm90) Fix citical alarm status for MAX6680/MAX6681
        hwmon: (lm90) Drop critical attribute support for MAX6654
        hwmon: (lm90) Prevent integer overflow/underflow in hysteresis calculations
        hwmon: (lm90) Fix usage of CONFIG2 register in detect function
      e2ae0d4a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 5b5e3d03
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "A few small updates to drivers.
      
        Of note we are now deferring probes of i8042 on some Asus devices as
        the controller is not ready to respond to queries first time around
        when the driver is compiled into the kernel"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: elants_i2c - do not check Remark ID on eKTH3900/eKTH5312
        Input: atmel_mxt_ts - fix double free in mxt_read_info_block
        Input: goodix - fix memory leak in goodix_firmware_upload
        Input: goodix - add id->model mapping for the "9111" model
        Input: goodix - try not to touch the reset-pin on x86/ACPI devices
        Input: i8042 - enable deferred probe quirk for ASUS UM325UA
        Input: elantech - fix stack out of bound access in elantech_change_report_id()
        Input: iqs626a - prohibit inlining of channel parsing functions
        Input: i8042 - add deferred probe support
      5b5e3d03
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · d0cc67b2
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "9 patches.
      
        Subsystems affected by this patch series: mm (kfence, mempolicy,
        memory-failure, pagemap, pagealloc, damon, and memory-failure),
        core-kernel, and MAINTAINERS"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm/hwpoison: clear MF_COUNT_INCREASED before retrying get_any_page()
        mm/damon/dbgfs: protect targets destructions with kdamond_lock
        mm/page_alloc: fix __alloc_size attribute for alloc_pages_exact_nid
        mm: delete unsafe BUG from page_cache_add_speculative()
        mm, hwpoison: fix condition in free hugetlb page path
        MAINTAINERS: mark more list instances as moderated
        kernel/crash_core: suppress unknown crashkernel parameter warning
        mm: mempolicy: fix THP allocations escaping mempolicy restrictions
        kfence: fix memory leak when cat kfence objects
      d0cc67b2
    • Liu Shixin's avatar
      mm/hwpoison: clear MF_COUNT_INCREASED before retrying get_any_page() · 2a57d83c
      Liu Shixin authored
      Hulk Robot reported a panic in put_page_testzero() when testing
      madvise() with MADV_SOFT_OFFLINE.  The BUG() is triggered when retrying
      get_any_page().  This is because we keep MF_COUNT_INCREASED flag in
      second try but the refcnt is not increased.
      
          page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
          ------------[ cut here ]------------
          kernel BUG at include/linux/mm.h:737!
          invalid opcode: 0000 [#1] PREEMPT SMP
          CPU: 5 PID: 2135 Comm: sshd Tainted: G    B             5.16.0-rc6-dirty #373
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
          RIP: release_pages+0x53f/0x840
          Call Trace:
            free_pages_and_swap_cache+0x64/0x80
            tlb_flush_mmu+0x6f/0x220
            unmap_page_range+0xe6c/0x12c0
            unmap_single_vma+0x90/0x170
            unmap_vmas+0xc4/0x180
            exit_mmap+0xde/0x3a0
            mmput+0xa3/0x250
            do_exit+0x564/0x1470
            do_group_exit+0x3b/0x100
            __do_sys_exit_group+0x13/0x20
            __x64_sys_exit_group+0x16/0x20
            do_syscall_64+0x34/0x80
            entry_SYSCALL_64_after_hwframe+0x44/0xae
          Modules linked in:
          ---[ end trace e99579b570fe0649 ]---
          RIP: 0010:release_pages+0x53f/0x840
      
      Link: https://lkml.kernel.org/r/20211221074908.3910286-1-liushixin2@huawei.com
      Fixes: b94e0282 ("mm,hwpoison: try to narrow window race for free pages")
      Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
      Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.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>
      2a57d83c
    • SeongJae Park's avatar
      mm/damon/dbgfs: protect targets destructions with kdamond_lock · 34796417
      SeongJae Park authored
      DAMON debugfs interface iterates current monitoring targets in
      'dbgfs_target_ids_read()' while holding the corresponding
      'kdamond_lock'.  However, it also destructs the monitoring targets in
      'dbgfs_before_terminate()' without holding the lock.  This can result in
      a use_after_free bug.  This commit avoids the race by protecting the
      destruction with the corresponding 'kdamond_lock'.
      
      Link: https://lkml.kernel.org/r/20211221094447.2241-1-sj@kernel.orgReported-by: default avatarSangwoo Bae <sangwoob@amazon.com>
      Fixes: 4bc05954 ("mm/damon: implement a debugfs-based user space interface")
      Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
      Cc: <stable@vger.kernel.org>	[5.15.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      34796417