[AEP]WARN triggered by the device-dax unit test with 4.19-rc1

Bug #1801246 reported by quanxian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description
[ +0.003470] WARNING: CPU: 3 PID: 7380 at fs/buffer.c:581 __set_page_dirty+0xb1/0xc0
[ +0.001177] Modules linked in: nd_pmem(O) dax_pmem(O) device_dax(O) nd_btt(O) nd_e820(O) nfit(O) libnvdimm(O) nfit_test_iomap(O)
[ 0.001941] CPU: 3 PID: 7380 Comm: lt-device-dax Tainted: G O 4.19.0-rc1 #3
[ +0.001423] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04/01/2014
[ +0.002023] RIP: 0010:__set_page_dirty+0xb1/0xc0
[ +0.000789] Code: 80 00 5b 4c 89 e6 48 89 ef 5d 41 5c 41 5d 41 5e e9 a4 ac 82 00 48 8b 00 f6 c4 02 74 d7 48 89 df e8 54 bb f6 ff 48 89 c6 eb ce <0f> 0b eb 92 90 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55
[ +0.003122] RSP: 0018:ffffc90001bbba38 EFLAGS: 00010046
[ +0.000911] RAX: 007fff8000000815 RBX: ffffea0008108000 RCX: eb851eb851eb851f
[ +0.001212] RDX: 0000000000000000 RSI: ffff880310c51560 RDI: 0000000000000046
[ +0.001203] RBP: ffff880310c51548 R08: 0000000000000000 R09: 0000000000000001
[ +0.001220] R10: ffffc90001bbb9a8 R11: 000000000000b200 R12: 0000000000000246
[ +0.001202] R13: ffff880310c51540 R14: 0000000000000001 R15: ffff88016dd68040
[ +0.001205] FS: 00007f418f6cf780(0000) GS:ffff880311a00000(0000) knlGS:0000000000000000
[ +0.001363] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000975] CR2: 00007f418f6ee000 CR3: 00000001a1a36003 CR4: 00000000001606e0
[ +0.001217] Call Trace:
[ +0.000435] __set_page_dirty_buffers+0xad/0x100
[ +0.000791] set_page_dirty_lock+0x41/0x60
[ +0.000709] dio_bio_complete+0x12c/0x160
[ +0.000693] ? do_blockdev_direct_IO+0x1c8b/0x2b60
[ +0.000825] do_blockdev_direct_IO+0x1d29/0x2b60
[ +0.000827] ? ext4_dio_get_block_unwritten_sync+0x50/0x50
[ +0.000944] ? ext4_direct_IO+0x15a/0x790
[ +0.000681] ext4_direct_IO+0x15a/0x790
[ +0.000672] ? touch_atime+0xc6/0xd0
[ +0.000621] generic_file_read_iter+0xbb/0xd40
[ +0.000762] ? up_write+0x1c/0x80
[ +0.000565] ? ext4_file_write_iter+0x20d/0x400
[ +0.000789] __vfs_read+0x112/0x190
[ +0.000619] vfs_read+0x9e/0x150
[ +0.000418] ksys_pread64+0x74/0x90
[ +0.000505] do_syscall_64+0x60/0x210
[ +0.000466] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ +0.000618] RIP: 0033:0x7f418e7a1f63
[ +0.000437] Code: f3 a9 f2 ff e8 4e 5b 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 83 3d e9 d8 2d 00 00 75 13 49 89 ca b8 11 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 6b 15 02 00 48 89 04 24
[ +0.002233] RSP: 002b:00007ffc3fb777e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000011
[ +0.000916] RAX: ffffffffffffffda RBX: 00007f418f6ea000 RCX: 00007f418e7a1f63
[ +0.000879] RDX: 0000000000001000 RSI: 00007f418f6ea000 RDI: 0000000000000005
[ +0.000896] RBP: 0000000000000000 R08: 000000000000001b R09: 0000000000000000
[ +0.000884] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005
[ +0.000879] R13: 0000000000000000 R14: 0000000000000004 R15: 0000000000002000
[ +0.000889] irq event stamp: 136672
[ +0.000443] hardirqs last enabled at (136671): [<ffffffff81b2b232>] _raw_spin_unlock_irqrestore+0x32/0x60
[ +0.001185] hardirqs last disabled at (136672): [<ffffffff81b2b912>] _raw_spin_lock_irqsave+0x22/0x80
[ +0.001120] softirqs last enabled at (136542): [<ffffffff81e0032e>] __do_softirq+0x32e/0x428
[ +0.001028] softirqs last disabled at (136535): [<ffffffff810bd4e6>] irq_exit+0xf6/0x100
[ +0.000995] --[ end trace 2dbcab5579c2e08f ]--

$ git bisect log
git bisect start

good: [021c91791a5e7e85c567452f1be3e4c2c6cb6063] Linux 4.18-rc3
git bisect good 021c91791a5e7e85c567452f1be3e4c2c6cb6063
bad: [c953cc987ab87d180e1d5de2f1c217abe33aac77] libnvdimm, pmem: Restore page attributes when clearing errors
git bisect bad c953cc987ab87d180e1d5de2f1c217abe33aac77
bad: [2fa147bdbf672c53386a8f5f2c7fe358004c3ef8] mm, dev_pagemap: Do not clear ->mapping on final put
git bisect bad 2fa147bdbf672c53386a8f5f2c7fe358004c3ef8
bad: [35de299547d1c3300e078f9f7c6eb01dadae47f9] device-dax: Set page->index
git bisect bad 35de299547d1c3300e078f9f7c6eb01dadae47f9
bad: [2232c6382a453db73d2e723df1b52030066e135e] device-dax: Enable page_mapping()
git bisect bad 2232c6382a453db73d2e723df1b52030066e135e
good: [226ab561075f6f8f3cd5f7b3b7544f3997aab51f] device-dax: Convert to vmf_insert_mixed and vm_fault_t
git bisect good 226ab561075f6f8f3cd5f7b3b7544f3997aab51f
first bad commit: [2232c6382a453db73d2e723df1b52030066e135e] device-dax: Enable page_mapping()
commit 2232c6382a453db73d2e723df1b52030066e135e
Author: Dan Williams <email address hidden>
Date: Fri Jul 13 21:49:40 2018 -0700

device-dax: Enable page_mapping()

In support of enabling memory_failure() handling for device-dax
mappings, set the ->mapping association of pages backing device-dax
mappings. The rmap implementation requires page_mapping() to return the
address_space hosting the vmas that map the page.

The ->mapping pointer is never cleared. There is no possibility for the
page to become associated with another address_space while the device is
enabled. When the device is disabled the 'struct page' array for the
device is destroyed / later reinitialized to zero.

Reviewed-by: Jan Kara <email address hidden>
Signed-off-by: Dan Williams <email address hidden>
Signed-off-by: Dave Jiang <email address hidden>

Target Kernel: 4.19
Target Release: 19.04

Revision history for this message
quanxian (quanxian-wang) wrote :

Fix added in 4.19-rc6:

commit 41c9b1be335b5afc3b5fb71c5d16f9d5939cd13f
Author: Dave Jiang <email address hidden>
Date: Mon Sep 10 16:18:29 2018 -0700

device-dax: Add missing address_space_operations

With address_space_operations missing for device dax, namely the
.set_page_dirty, we hit a kernel warning when running destructive
ndctl unit test: make TESTS=device-dax check

WARNING: CPU: 3 PID: 7380 at fs/buffer.c:581 __set_page_dirty+0xb1/0xc0

Setting address_space_operations to noop_set_page_dirty and
noop_invalidatepage for device dax to prevent fallback to
__set_page_dirty_buffers() and block_invalidatepage() respectively.

Fixes: 2232c6382a ("device-dax: Enable page_mapping()")

Acked-by: Jeff Moyer <email address hidden>
Reported-by: Vishal Verma <email address hidden>
Signed-off-by: Dave Jiang <email address hidden>
Signed-off-by: Dan Williams <email address hidden>

Changed in linux (Ubuntu):
status: New → Fix Released
Changed in intel:
status: New → Fix Released
Brad Figg (brad-figg)
tags: added: cscc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.