{"push_id":1048410777,"size":1,"distinct_size":1,"ref":"refs/heads/mr1-staging","head":"2aaec24d96133584b84082d433914ea017102505","before":"7084d430ea3aba4fc0d710e3b65eb8931083f998","commits":[{"sha":"2aaec24d96133584b84082d433914ea017102505","author":{"email":"8e7a128cd0264d3269a891fb3e87507c2985f8af@ah.jp.nec.com","name":"Naoya Horiguchi"},"message":"mm: soft-offline: check return value in second __get_any_page() call\n\ncommit d96b339f453997f2f08c52da3f41423be48c978f upstream.\n\nI saw the following BUG_ON triggered in a testcase where a process calls\nmadvise(MADV_SOFT_OFFLINE) on thps, along with a background process that\ncalls migratepages command repeatedly (doing ping-pong among different\nNUMA nodes) for the first process:\n\n   Soft offlining page 0x60000 at 0x700000600000\n   __get_any_page: 0x60000 free buddy page\n   page:ffffea0001800000 count:0 mapcount:-127 mapping:          (null) index:0x1\n   flags: 0x1fffc0000000000()\n   page dumped because: VM_BUG_ON_PAGE(atomic_read(&page->_count) == 0)\n   ------------[ cut here ]------------\n   kernel BUG at /src/linux-dev/include/linux/mm.h:342!\n   invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC\n   Modules linked in: cfg80211 rfkill crc32c_intel serio_raw virtio_balloon i2c_piix4 virtio_blk virtio_net ata_generic pata_acpi\n   CPU: 3 PID: 3035 Comm: test_alloc_gene Tainted: G           O    4.4.0-rc8-v4.4-rc8-160107-1501-00000-rc8+ #74\n   Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011\n   task: ffff88007c63d5c0 ti: ffff88007c210000 task.ti: ffff88007c210000\n   RIP: 0010:[<ffffffff8118998c>]  [<ffffffff8118998c>] put_page+0x5c/0x60\n   RSP: 0018:ffff88007c213e00  EFLAGS: 00010246\n   Call Trace:\n     put_hwpoison_page+0x4e/0x80\n     soft_offline_page+0x501/0x520\n     SyS_madvise+0x6bc/0x6f0\n     entry_SYSCALL_64_fastpath+0x12/0x6a\n   Code: 8b fc ff ff 5b 5d c3 48 89 df e8 b0 fa ff ff 48 89 df 31 f6 e8 c6 7d ff ff 5b 5d c3 48 c7 c6 08 54 a2 81 48 89 df e8 a4 c5 01 00 <0f> 0b 66 90 66 66 66 66 90 55 48 89 e5 41 55 41 54 53 48 8b 47\n   RIP  [<ffffffff8118998c>] put_page+0x5c/0x60\n    RSP <ffff88007c213e00>\n\nThe root cause resides in get_any_page() which retries to get a refcount\nof the page to be soft-offlined.  This function calls\nput_hwpoison_page(), expecting that the target page is putback to LRU\nlist.  But it can be also freed to buddy.  So the second check need to\ncare about such case.\n\nFixes: af8fae7c0886 (\"mm/memory-failure.c: clean up soft_offline_page()\")\nSigned-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>\nCc: Sasha Levin <sasha.levin@oracle.com>\nCc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>\nCc: Vlastimil Babka <vbabka@suse.cz>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Hugh Dickins <hughd@google.com>\nCc: Dave Hansen <dave.hansen@intel.com>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Rik van Riel <riel@redhat.com>\nCc: Steve Capper <steve.capper@linaro.org>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nCc: Michal Hocko <mhocko@suse.cz>\nCc: Christoph Lameter <cl@linux.com>\nCc: David Rientjes <rientjes@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Chairshot215/starship_kernel_moto_shamu/commits/2aaec24d96133584b84082d433914ea017102505"}]}