From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: [mm -next] mapping->tree_lock inconsistent lock state Date: Thu, 4 Feb 2016 00:36:33 +0900 Message-ID: <20160203153633.GA32219@swordfish> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=tQtQwP5K/NA/xosyiLS/TAfu4bFWmfVRF1kltWAbxi0=; b=MbpryFU4cLqPzjMaFKeZ5wyHl7tk41+LzOAOWlE9qhg97A9X7jgyxeh/1P1WBNpbYZ okANAwcXJxnJiz7U8gsUbtoZZxox0nK5UA6+VcslU/sUJCcovigxiVij4P4wBlhvRP83 yVKOlUuHe4gEUkt6ywwgMRo9ZacaXD72Nweqh1T15/FwBtpOtGeUozWBAXVHHZFUM2vI czIIubeZF3Kk3YJhT4w0rMoRyFI2GdbQ+V2N1cM4Gk2HrFny3+vz637XFHL18n8/X6Da ydtBD3R1qbM84dJO+9mF5rsH+IZGw1zEPo7rU9cr+fT+lPkpGpTJ40Y1gStIAfNOAw81 OBKg== Content-Disposition: inline Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Vlastimil Babka , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Hello, next-20160203 [ 3587.997451] ================================= [ 3587.997453] [ INFO: inconsistent lock state ] [ 3587.997456] 4.5.0-rc2-next-20160203-dbg-00007-g37a0a9d-dirty #377 Not tainted [ 3587.997457] --------------------------------- [ 3587.997459] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 3587.997462] cc1plus/22766 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 3587.997464] (&(&mapping->tree_lock)->rlock){+.?...}, at: [] migrate_page_move_mapping+0xbd/0x33f [ 3587.997474] {IN-SOFTIRQ-W} state was registered at: [ 3587.997476] [] __lock_acquire+0x973/0x18fc [ 3587.997481] [] lock_acquire+0x10d/0x1a8 [ 3587.997484] [] _raw_spin_lock_irqsave+0x3d/0x51 [ 3587.997489] [] test_clear_page_writeback+0x75/0x1b4 [ 3587.997493] [] end_page_writeback+0x29/0x4a [ 3587.997497] [] end_buffer_async_write+0xfb/0x176 [ 3587.997501] [] end_bio_bh_io_sync+0x2c/0x37 [ 3587.997503] [] bio_endio+0x53/0x5b [ 3587.997508] [] blk_update_request+0x1fb/0x34d [ 3587.997512] [] scsi_end_request+0x31/0x182 [scsi_mod] [ 3587.997522] [] scsi_io_completion+0x186/0x46e [scsi_mod] [ 3587.997530] [] scsi_finish_command+0xd4/0xdd [scsi_mod] [ 3587.997537] [] scsi_softirq_done+0xe0/0xe7 [scsi_mod] [ 3587.997544] [] blk_done_softirq+0x84/0x8b [ 3587.997548] [] __do_softirq+0x196/0x3f5 [ 3587.997552] [] irq_exit+0x40/0x94 [ 3587.997554] [] do_IRQ+0x101/0x119 [ 3587.997558] [] ret_from_intr+0x0/0x19 [ 3587.997561] [] cpuidle_enter+0x17/0x19 [ 3587.997565] [] call_cpuidle+0x3e/0x40 [ 3587.997569] [] cpu_startup_entry+0x242/0x35e [ 3587.997572] [] rest_init+0x131/0x137 [ 3587.997575] [] start_kernel+0x3dd/0x3ea [ 3587.997579] [] x86_64_start_reservations+0x2a/0x2c [ 3587.997582] [] x86_64_start_kernel+0x16a/0x178 [ 3587.997586] irq event stamp: 191930 [ 3587.997587] hardirqs last enabled at (191929): [] free_hot_cold_page+0x166/0x179 [ 3587.997591] hardirqs last disabled at (191930): [] _raw_spin_lock_irq+0x13/0x47 [ 3587.997594] softirqs last enabled at (191758): [] __do_softirq+0x2df/0x3f5 [ 3587.997597] softirqs last disabled at (191741): [] irq_exit+0x40/0x94 [ 3587.997600] other info that might help us debug this: [ 3587.997602] Possible unsafe locking scenario: [ 3587.997604] CPU0 [ 3587.997605] ---- [ 3587.997607] lock(&(&mapping->tree_lock)->rlock); [ 3587.997610] [ 3587.997611] lock(&(&mapping->tree_lock)->rlock); [ 3587.997614] *** DEADLOCK *** [ 3587.997617] 2 locks held by cc1plus/22766: [ 3587.997618] #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x140/0x35a [ 3587.997626] #1: (&(&mapping->tree_lock)->rlock){+.?...}, at: [] migrate_page_move_mapping+0xbd/0x33f [ 3587.997633] stack backtrace: [ 3587.997636] CPU: 7 PID: 22766 Comm: cc1plus Not tainted 4.5.0-rc2-next-20160203-dbg-00007-g37a0a9d-dirty #377 [ 3587.997638] 0000000000000000 ffff88010f73f818 ffffffff811f1b02 ffffffff81f35160 [ 3587.997643] ffff88013813e900 ffff88010f73f850 ffffffff810f3000 0000000000000006 [ 3587.997647] ffff88013813f058 ffff88013813e900 ffffffff8107f99d 0000000000000006 [ 3587.997651] Call Trace: [ 3587.997656] [] dump_stack+0x67/0x90 [ 3587.997660] [] print_usage_bug.part.24+0x259/0x268 [ 3587.997663] [] ? check_usage_forwards+0x11c/0x11c [ 3587.997666] [] mark_lock+0x381/0x567 [ 3587.997670] [] mark_held_locks+0x5e/0x74 [ 3587.997673] [] ? _raw_spin_unlock_irq+0x2c/0x4a [ 3587.997676] [] trace_hardirqs_on_caller+0x16c/0x188 [ 3587.997679] [] trace_hardirqs_on+0xd/0xf [ 3587.997682] [] _raw_spin_unlock_irq+0x2c/0x4a [ 3587.997686] [] unlock_page_lru+0x11f/0x12a [ 3587.997689] [] mem_cgroup_migrate+0x196/0x1d9 [ 3587.997692] [] migrate_page_move_mapping+0x1c2/0x33f [ 3587.997696] [] buffer_migrate_page+0x47/0x102 [ 3587.997699] [] move_to_new_page+0x56/0x194 [ 3587.997702] [] migrate_pages+0x447/0x978 [ 3587.997705] [] ? isolate_freepages_block+0x353/0x353 [ 3587.997708] [] ? pageblock_pfn_to_page+0xbf/0xbf [ 3587.997711] [] compact_zone+0x690/0x92e [ 3587.997714] [] compact_zone_order+0x6e/0x8a [ 3587.997717] [] try_to_compact_pages+0x151/0x28f [ 3587.997720] [] ? try_to_compact_pages+0x151/0x28f [ 3587.997723] [] ? __lock_is_held+0x3c/0x57 [ 3587.997726] [] __alloc_pages_direct_compact+0x3e/0xeb [ 3587.997729] [] __alloc_pages_nodemask+0x447/0xb8b [ 3587.997732] [] ? handle_mm_fault+0x8b4/0x16bf [ 3587.997737] [] ? __might_sleep+0x75/0x7c [ 3587.997740] [] do_huge_pmd_anonymous_page+0x1d1/0x3fc [ 3587.997744] [] ? handle_mm_fault+0x14a/0x16bf [ 3587.997747] [] handle_mm_fault+0x4bf/0x16bf [ 3587.997750] [] ? __lock_is_held+0x3c/0x57 [ 3587.997754] [] __do_page_fault+0x1df/0x35a [ 3587.997757] [] do_page_fault+0xc/0xe [ 3587.997760] [] page_fault+0x22/0x30 -ss -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org