* Re: [PATCH v2] block: serialize elevator changes for the same queue using a writer lock
From: Shin'ichiro Kawasaki @ 2026-06-24 11:48 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-block, Jens Axboe, Nilay Shroff
In-Reply-To: <ajum7l5BPDRoeJgi@fedora>
On Jun 24, 2026 / 04:44, Ming Lei wrote:
> On Tue, Jun 23, 2026 at 10:32:38AM +0900, Shin'ichiro Kawasaki wrote:
[...]
> > Please refer to [1] for details of the failure. Also, I created a
> > blktests test case that recreates the hang [2], which I used to test the
> > fix.
> >
> > * Changes from RFC v1
> > - Instead of adding a new mutex to struct request_queue, replace the
> > reader lock on update_nr_hwq_lock with the writer lock in
> > elv_iosched_store().
> >
> > [1] https://lore.kernel.org/linux-block/20260611074200.474676-1-shinichiro.kawasaki@wdc.com/
> > [2] https://github.com/kawasaki/blktests/commit/8e80b3ccc0bbbe3f209d00eacd138d020de97fc6
> >
> > block/elevator.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
[...]
> I feel this is still abuse of the above lock, which serves writer vs
> reader wrt. updating hw queue.
>
> How about the following fix?
(snip)
Thank you for the idea. I applied the suggested fix on top of the v7.1 kernel,
and ran the test case that does the concurrent write to the sysfs sched file
[2]. Unfortunately, the test case hung. Before the hang, the kernel reported
WARNs in sysfs_create_dir_ns() [3]. KASAN slab-use-after-free was observed also.
I also noticed that another WARN was observed during boot [4].
[3]
[ 75.184223] [ T1820] run blktests block/044 at 2026-06-24 20:37:20
[ 75.229561] [ T1830] null_blk: disk nullb0 created
[ 75.234717] [ T1830] null_blk: module loaded
[ 75.249186] [ T1820] null_blk: disk nullb1 created
[ 88.092222] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 88.102051] [ T1842] CPU: 6 UID: 0 PID: 1842 Comm: check Tainted: G W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 88.102067] [ T1842] Tainted: [W]=WARN
[ 88.102070] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 88.102075] [ T1842] Call Trace:
[ 88.102080] [ T1842] <TASK>
[ 88.102084] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 88.102105] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 88.102117] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 88.102132] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 88.102146] [ T1842] ? kfree+0x1d6/0x620
[ 88.102156] [ T1842] kobject_add_internal+0x26f/0x800
[ 88.102171] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102180] [ T1842] kobject_add+0x139/0x1a0
[ 88.102190] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 88.102199] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 88.102208] [ T1842] ? kasan_quarantine_put+0xf5/0x240
[ 88.102218] [ T1842] ? kfree+0x21c/0x620
[ 88.102228] [ T1842] ? trace_hardirqs_on+0x53/0x1a0
[ 88.102237] [ T1842] elevator_change_done+0x26f/0x690
[ 88.102250] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 88.102259] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 88.102274] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102285] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102293] [ T1842] elevator_change+0x283/0x4f0
[ 88.102305] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102314] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 88.102326] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 88.102335] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 88.102351] [ T1842] ? lock_acquire+0x126/0x140
[ 88.102364] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102373] [ T1842] queue_attr_store+0x23f/0x360
[ 88.102382] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 88.102393] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 88.102401] [ T1842] ? lock_release+0xfa/0x120
[ 88.102412] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 88.102442] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 88.102452] [ T1842] ? lock_acquire+0x126/0x140
[ 88.102462] [ T1842] ? lock_acquire+0x126/0x140
[ 88.102473] [ T1842] ? lock_release+0xfa/0x120
[ 88.102483] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 88.102492] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 88.102503] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 88.102511] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 88.102522] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 88.102530] [ T1842] vfs_write+0x524/0x1010
[ 88.102541] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 88.102548] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 88.102558] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 88.102574] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 88.102586] [ T1842] ksys_write+0xff/0x200
[ 88.102595] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 88.102607] [ T1842] do_syscall_64+0xf4/0x660
[ 88.102620] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 88.102637] [ T1842] ? count_memcg_events+0x37f/0x480
[ 88.102651] [ T1842] ? lock_release+0xfa/0x120
[ 88.102662] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 88.102670] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 88.102680] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 88.102693] [ T1842] ? lock_release+0xfa/0x120
[ 88.102703] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 88.102713] [ T1842] ? irqentry_exit+0xb0/0x810
[ 88.102720] [ T1842] ? do_syscall_64+0x34/0x660
[ 88.102730] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 88.102737] [ T1842] ? irqentry_exit+0xb5/0x810
[ 88.102743] [ T1842] ? do_syscall_64+0xab/0x660
[ 88.102754] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 88.102762] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 88.102772] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 88.102779] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 88.102789] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 88.102800] [ T1842] RDX: 0000000000000004 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 88.102809] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 88.102818] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
[ 88.102827] [ T1842] R13: 0000000000000004 R14: 0000562ec532aa50 R15: 0000562ec5397300
[ 88.102854] [ T1842] </TASK>
[ 88.536717] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 90.116333] [ T1841] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 90.127915] [ T1841] CPU: 0 UID: 0 PID: 1841 Comm: check Tainted: G W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 90.127935] [ T1841] Tainted: [W]=WARN
[ 90.127937] [ T1841] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 90.127941] [ T1841] Call Trace:
[ 90.127945] [ T1841] <TASK>
[ 90.127952] [ T1841] dump_stack_lvl+0x6e/0xa0
[ 90.127971] [ T1841] sysfs_warn_dup.cold+0x17/0x24
[ 90.127982] [ T1841] sysfs_create_dir_ns+0x1fc/0x270
[ 90.128000] [ T1841] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 90.128010] [ T1841] ? kfree+0x1d6/0x620
[ 90.128024] [ T1841] kobject_add_internal+0x26f/0x800
[ 90.128032] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128039] [ T1841] kobject_add+0x139/0x1a0
[ 90.128044] [ T1841] ? trace_hardirqs_on+0x19/0x1a0
[ 90.128048] [ T1841] ? __pfx_kobject_add+0x10/0x10
[ 90.128053] [ T1841] ? kasan_quarantine_put+0xf5/0x240
[ 90.128058] [ T1841] ? kfree+0x21c/0x620
[ 90.128063] [ T1841] ? trace_hardirqs_on+0x53/0x1a0
[ 90.128066] [ T1841] elevator_change_done+0x26f/0x690
[ 90.128074] [ T1841] ? __pfx_elevator_change_done+0x10/0x10
[ 90.128078] [ T1841] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 90.128086] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128091] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128095] [ T1841] elevator_change+0x283/0x4f0
[ 90.128103] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128107] [ T1841] elv_iosched_store+0x30c/0x3a0
[ 90.128112] [ T1841] ? __pfx_elv_iosched_store+0x10/0x10
[ 90.128116] [ T1841] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 90.128131] [ T1841] ? lock_acquire+0x126/0x140
[ 90.128138] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128142] [ T1841] queue_attr_store+0x23f/0x360
[ 90.128150] [ T1841] ? __mutex_lock+0x1536/0x25a0
[ 90.128155] [ T1841] ? __pfx_queue_attr_store+0x10/0x10
[ 90.128159] [ T1841] ? lock_release+0xfa/0x120
[ 90.128164] [ T1841] ? __pfx___mutex_lock+0x10/0x10
[ 90.128169] [ T1841] ? __pfx__copy_from_iter+0x10/0x10
[ 90.128175] [ T1841] ? lock_acquire+0x126/0x140
[ 90.128179] [ T1841] ? lock_acquire+0x126/0x140
[ 90.128184] [ T1841] ? lock_release+0xfa/0x120
[ 90.128192] [ T1841] ? sysfs_file_kobj+0xb9/0x1b0
[ 90.128196] [ T1841] ? sysfs_kf_write+0x65/0x170
[ 90.128201] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.128205] [ T1841] kernfs_fop_write_iter+0x3da/0x5e0
[ 90.128214] [ T1841] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 90.128218] [ T1841] vfs_write+0x524/0x1010
[ 90.128223] [ T1841] ? __pfx_vfs_write+0x10/0x10
[ 90.128229] [ T1841] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 90.128238] [ T1841] ? __pfx_pte_val+0x10/0x10
[ 90.128244] [ T1841] ksys_write+0xff/0x200
[ 90.128248] [ T1841] ? __pfx_ksys_write+0x10/0x10
[ 90.128252] [ T1841] ? lock_release+0xfa/0x120
[ 90.128257] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 90.128260] [ T1841] ? wp_page_reuse+0x160/0x1e0
[ 90.128265] [ T1841] do_syscall_64+0xf4/0x660
[ 90.128277] [ T1841] ? handle_pte_fault+0x54e/0x760
[ 90.128283] [ T1841] ? __pfx_handle_pte_fault+0x10/0x10
[ 90.128288] [ T1841] ? __pfx_pmd_val+0x10/0x10
[ 90.128293] [ T1841] ? __handle_mm_fault+0xa02/0xef0
[ 90.128302] [ T1841] ? do_raw_spin_unlock+0x59/0x230
[ 90.128306] [ T1841] ? __pfx___css_rstat_updated+0x10/0x10
[ 90.128315] [ T1841] ? count_memcg_events+0x37f/0x480
[ 90.128328] [ T1841] ? lock_release+0xfa/0x120
[ 90.128332] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 90.128336] [ T1841] ? handle_mm_fault+0x4d1/0x7d0
[ 90.128341] [ T1841] ? do_user_addr_fault+0x15d/0xed0
[ 90.128347] [ T1841] ? lock_release+0xfa/0x120
[ 90.128351] [ T1841] ? do_user_addr_fault+0x811/0xed0
[ 90.128356] [ T1841] ? irqentry_exit+0xb0/0x810
[ 90.128359] [ T1841] ? do_syscall_64+0x34/0x660
[ 90.128367] [ T1841] ? trace_hardirqs_on+0x19/0x1a0
[ 90.128370] [ T1841] ? irqentry_exit+0xb5/0x810
[ 90.128373] [ T1841] ? do_syscall_64+0xab/0x660
[ 90.128378] [ T1841] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 90.128388] [ T1841] RIP: 0033:0x7f96f4878bbe
[ 90.128393] [ T1841] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 90.128396] [ T1841] RSP: 002b:00007ffcb76eba90 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 90.128402] [ T1841] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 90.128405] [ T1841] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 90.128410] [ T1841] RBP: 00007ffcb76ebaa0 R08: 0000000000000000 R09: 0000000000000000
[ 90.128413] [ T1841] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 90.128415] [ T1841] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5397e70
[ 90.128421] [ T1841] </TASK>
[ 90.128435] [ T1841] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 90.638084] [ T1841] ==================================================================
[ 90.646403] [ T1841] BUG: KASAN: slab-use-after-free in blk_mq_free_sched_tags+0x124/0x160
[ 90.654950] [ T1841] Read of size 4 at addr ffff88818265ad40 by task check/1841
[ 90.665102] [ T1841] CPU: 4 UID: 0 PID: 1841 Comm: check Tainted: G W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 90.665108] [ T1841] Tainted: [W]=WARN
[ 90.665109] [ T1841] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 90.665111] [ T1841] Call Trace:
[ 90.665113] [ T1841] <TASK>
[ 90.665115] [ T1841] dump_stack_lvl+0x6e/0xa0
[ 90.665123] [ T1841] print_address_description.constprop.0+0x70/0x300
[ 90.665129] [ T1841] ? blk_mq_free_sched_tags+0x124/0x160
[ 90.665132] [ T1841] print_report+0xfc/0x1ff
[ 90.665136] [ T1841] ? __virt_addr_valid+0x1d1/0x3f0
[ 90.665141] [ T1841] ? blk_mq_free_sched_tags+0x124/0x160
[ 90.665143] [ T1841] kasan_report+0xf6/0x1c0
[ 90.665148] [ T1841] ? blk_mq_free_sched_tags+0x124/0x160
[ 90.665152] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665157] [ T1841] blk_mq_free_sched_tags+0x124/0x160
[ 90.665160] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665163] [ T1841] blk_mq_free_sched_res+0x50/0x170
[ 90.665167] [ T1841] elevator_change_done+0x4f6/0x690
[ 90.665172] [ T1841] ? __pfx_elevator_change_done+0x10/0x10
[ 90.665175] [ T1841] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 90.665181] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665185] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665188] [ T1841] elevator_change+0x283/0x4f0
[ 90.665192] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665196] [ T1841] elv_iosched_store+0x30c/0x3a0
[ 90.665200] [ T1841] ? __pfx_elv_iosched_store+0x10/0x10
[ 90.665204] [ T1841] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 90.665209] [ T1841] ? lock_acquire+0x126/0x140
[ 90.665215] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665218] [ T1841] queue_attr_store+0x23f/0x360
[ 90.665222] [ T1841] ? __mutex_lock+0x1536/0x25a0
[ 90.665226] [ T1841] ? __pfx_queue_attr_store+0x10/0x10
[ 90.665229] [ T1841] ? lock_release+0xfa/0x120
[ 90.665233] [ T1841] ? __pfx___mutex_lock+0x10/0x10
[ 90.665237] [ T1841] ? __pfx__copy_from_iter+0x10/0x10
[ 90.665241] [ T1841] ? lock_acquire+0x126/0x140
[ 90.665244] [ T1841] ? lock_acquire+0x126/0x140
[ 90.665248] [ T1841] ? lock_release+0xfa/0x120
[ 90.665252] [ T1841] ? sysfs_file_kobj+0xb9/0x1b0
[ 90.665255] [ T1841] ? sysfs_kf_write+0x65/0x170
[ 90.665259] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 90.665262] [ T1841] kernfs_fop_write_iter+0x3da/0x5e0
[ 90.665266] [ T1841] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 90.665268] [ T1841] vfs_write+0x524/0x1010
[ 90.665273] [ T1841] ? __pfx_vfs_write+0x10/0x10
[ 90.665278] [ T1841] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 90.665281] [ T1841] ? __pfx_pte_val+0x10/0x10
[ 90.665286] [ T1841] ksys_write+0xff/0x200
[ 90.665289] [ T1841] ? __pfx_ksys_write+0x10/0x10
[ 90.665292] [ T1841] ? lock_release+0xfa/0x120
[ 90.665295] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 90.665298] [ T1841] ? wp_page_reuse+0x160/0x1e0
[ 90.665302] [ T1841] do_syscall_64+0xf4/0x660
[ 90.665308] [ T1841] ? handle_pte_fault+0x54e/0x760
[ 90.665312] [ T1841] ? __pfx_handle_pte_fault+0x10/0x10
[ 90.665316] [ T1841] ? __pfx_pmd_val+0x10/0x10
[ 90.665320] [ T1841] ? __handle_mm_fault+0xa02/0xef0
[ 90.665324] [ T1841] ? do_raw_spin_unlock+0x59/0x230
[ 90.665327] [ T1841] ? __pfx___css_rstat_updated+0x10/0x10
[ 90.665334] [ T1841] ? count_memcg_events+0x37f/0x480
[ 90.665339] [ T1841] ? lock_release+0xfa/0x120
[ 90.665343] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 90.665345] [ T1841] ? handle_mm_fault+0x4d1/0x7d0
[ 90.665349] [ T1841] ? do_user_addr_fault+0x15d/0xed0
[ 90.665353] [ T1841] ? lock_release+0xfa/0x120
[ 90.665357] [ T1841] ? do_user_addr_fault+0x811/0xed0
[ 90.665360] [ T1841] ? irqentry_exit+0xb0/0x810
[ 90.665363] [ T1841] ? do_syscall_64+0x34/0x660
[ 90.665366] [ T1841] ? trace_hardirqs_on+0x19/0x1a0
[ 90.665369] [ T1841] ? irqentry_exit+0xb5/0x810
[ 90.665372] [ T1841] ? do_syscall_64+0xab/0x660
[ 90.665375] [ T1841] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 90.665378] [ T1841] RIP: 0033:0x7f96f4878bbe
[ 90.665383] [ T1841] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 90.665385] [ T1841] RSP: 002b:00007ffcb76eba90 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 90.665390] [ T1841] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 90.665392] [ T1841] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 90.665394] [ T1841] RBP: 00007ffcb76ebaa0 R08: 0000000000000000 R09: 0000000000000000
[ 90.665396] [ T1841] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 90.665397] [ T1841] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5397e70
[ 90.665402] [ T1841] </TASK>
[ 91.124911] [ T1841] Allocated by task 1841:
[ 91.129401] [ T1841] kasan_save_stack+0x30/0x50
[ 91.134237] [ T1841] kasan_save_track+0x14/0x30
[ 91.139072] [ T1841] __kasan_kmalloc+0x9a/0xb0
[ 91.143822] [ T1841] __kmalloc_noprof+0x2bb/0x820
[ 91.148832] [ T1841] blk_mq_alloc_sched_tags+0x72/0x2f0
[ 91.154364] [ T1841] blk_mq_alloc_sched_res+0x86/0x220
[ 91.159802] [ T1841] elevator_change+0x113/0x4f0
[ 91.164725] [ T1841] elv_iosched_store+0x30c/0x3a0
[ 91.169821] [ T1841] queue_attr_store+0x23f/0x360
[ 91.174832] [ T1841] kernfs_fop_write_iter+0x3da/0x5e0
[ 91.180276] [ T1841] vfs_write+0x524/0x1010
[ 91.184765] [ T1841] ksys_write+0xff/0x200
[ 91.189168] [ T1841] do_syscall_64+0xf4/0x660
[ 91.193833] [ T1841] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 91.202386] [ T1841] Freed by task 1842:
[ 91.206535] [ T1841] kasan_save_stack+0x30/0x50
[ 91.211380] [ T1841] kasan_save_track+0x14/0x30
[ 91.216222] [ T1841] kasan_save_free_info+0x3b/0x70
[ 91.221414] [ T1841] __kasan_slab_free+0x6b/0x90
[ 91.226346] [ T1841] kfree+0x21c/0x620
[ 91.230409] [ T1841] blk_mq_free_sched_res+0x50/0x170
[ 91.235777] [ T1841] elevator_change_done+0x17f/0x690
[ 91.241141] [ T1841] elevator_change+0x283/0x4f0
[ 91.246069] [ T1841] elv_iosched_store+0x30c/0x3a0
[ 91.251174] [ T1841] queue_attr_store+0x23f/0x360
[ 91.256195] [ T1841] kernfs_fop_write_iter+0x3da/0x5e0
[ 91.261647] [ T1841] vfs_write+0x524/0x1010
[ 91.266146] [ T1841] ksys_write+0xff/0x200
[ 91.270556] [ T1841] do_syscall_64+0xf4/0x660
[ 91.275227] [ T1841] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 91.283792] [ T1841] The buggy address belongs to the object at ffff88818265ad40
which belongs to the cache kmalloc-rnd-04-32 of size 32
[ 91.298776] [ T1841] The buggy address is located 0 bytes inside of
freed 32-byte region [ffff88818265ad40, ffff88818265ad60)
[ 91.315327] [ T1841] The buggy address belongs to the physical page:
[ 91.321911] [ T1841] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18265a
[ 91.330919] [ T1841] flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff)
[ 91.338457] [ T1841] page_type: f5(slab)
[ 91.342604] [ T1841] raw: 0017ffffc0000000 ffff88810004ca00 dead000000000100 dead000000000122
[ 91.351361] [ T1841] raw: 0000000000000000 0000000800400040 00000000f5000000 0000000000000000
[ 91.360116] [ T1841] page dumped because: kasan: bad access detected
[ 91.369218] [ T1841] Memory state around the buggy address:
[ 91.375028] [ T1841] ffff88818265ac00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[ 91.383280] [ T1841] ffff88818265ac80: fc fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc
[ 91.391530] [ T1841] >ffff88818265ad00: fc fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc
[ 91.399782] [ T1841] ^
[ 91.406132] [ T1841] ffff88818265ad80: fc fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc
[ 91.414400] [ T1841] ffff88818265ae00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[ 91.422666] [ T1841] ==================================================================
[ 91.431032] [ T1841] Oops: general protection fault, probably for non-canonical address 0xe066fc31c00000fa: 0000 [#1] SMP KASAN PTI
[ 91.449248] [ T1841] KASAN: maybe wild-memory-access in range [0x0338018e000007d0-0x0338018e000007d7]
[ 91.458755] [ T1841] CPU: 0 UID: 0 PID: 1841 Comm: check Tainted: G B W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 91.469576] [ T1841] Tainted: [B]=BAD_PAGE, [W]=WARN
[ 91.474834] [ T1841] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 91.483316] [ T1841] RIP: 0010:blk_mq_free_rqs+0x38/0x790
[ 91.489034] [ T1841] Code: 00 00 fc ff df 41 57 49 89 f7 48 81 c6 a0 00 00 00 41 56 49 89 fe 41 55 41 54 55 53 48 83 ec 48 89 14 24 48 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 fa 05 00 00 49 8b 87 a0 00 00 00 48 39 c6 0f 84
[ 91.509311] [ T1841] RSP: 0018:ffff88815455f530 EFLAGS: 00010206
[ 91.515656] [ T1841] RAX: dffffc0000000000 RBX: 0338018e00000732 RCX: 0000000000000000
[ 91.523920] [ T1841] RDX: 00670031c00000fa RSI: 0338018e000007d2 RDI: ffff888148d6f838
[ 91.532185] [ T1841] RBP: ffff888148d6f838 R08: ffffffffa7baa33a R09: fffffbfff5c10688
[ 91.540452] [ T1841] R10: fffffbfff5c10689 R11: 0000000000000001 R12: ffff88818265ad40
[ 91.548727] [ T1841] R13: ffff888148d6f838 R14: ffff888148d6f838 R15: 0338018e00000732
[ 91.557009] [ T1841] FS: 00007f96f4807780(0000) GS:ffff8887afe48000(0000) knlGS:0000000000000000
[ 91.566248] [ T1841] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 91.573153] [ T1841] CR2: 0000562ec532aa51 CR3: 0000000144fee001 CR4: 00000000001726f0
[ 91.581447] [ T1841] Call Trace:
[ 91.585060] [ T1841] <TASK>
[ 91.588325] [ T1841] blk_mq_free_map_and_rqs+0x23/0x130
[ 91.594029] [ T1841] blk_mq_free_sched_tags+0xbd/0x160
[ 91.599636] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.605159] [ T1841] blk_mq_free_sched_res+0x50/0x170
[ 91.610681] [ T1841] elevator_change_done+0x4f6/0x690
[ 91.616204] [ T1841] ? __pfx_elevator_change_done+0x10/0x10
[ 91.622245] [ T1841] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 91.628363] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.633880] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.639384] [ T1841] elevator_change+0x283/0x4f0
[ 91.644453] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.649987] [ T1841] elv_iosched_store+0x30c/0x3a0
[ 91.655224] [ T1841] ? __pfx_elv_iosched_store+0x10/0x10
[ 91.660981] [ T1841] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 91.667337] [ T1841] ? lock_acquire+0x126/0x140
[ 91.672301] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.677778] [ T1841] queue_attr_store+0x23f/0x360
[ 91.682911] [ T1841] ? __mutex_lock+0x1536/0x25a0
[ 91.688037] [ T1841] ? __pfx_queue_attr_store+0x10/0x10
[ 91.693674] [ T1841] ? lock_release+0xfa/0x120
[ 91.698532] [ T1841] ? __pfx___mutex_lock+0x10/0x10
[ 91.703815] [ T1841] ? __pfx__copy_from_iter+0x10/0x10
[ 91.709362] [ T1841] ? lock_acquire+0x126/0x140
[ 91.714306] [ T1841] ? lock_acquire+0x126/0x140
[ 91.719248] [ T1841] ? lock_release+0xfa/0x120
[ 91.724094] [ T1841] ? sysfs_file_kobj+0xb9/0x1b0
[ 91.729198] [ T1841] ? sysfs_kf_write+0x65/0x170
[ 91.734214] [ T1841] ? __pfx_sysfs_kf_write+0x10/0x10
[ 91.739640] [ T1841] kernfs_fop_write_iter+0x3da/0x5e0
[ 91.745162] [ T1841] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 91.751187] [ T1841] vfs_write+0x524/0x1010
[ 91.755728] [ T1841] ? __pfx_vfs_write+0x10/0x10
[ 91.760694] [ T1841] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 91.766260] [ T1841] ? __pfx_pte_val+0x10/0x10
[ 91.771042] [ T1841] ksys_write+0xff/0x200
[ 91.775465] [ T1841] ? __pfx_ksys_write+0x10/0x10
[ 91.780477] [ T1841] ? lock_release+0xfa/0x120
[ 91.785218] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 91.790134] [ T1841] ? wp_page_reuse+0x160/0x1e0
[ 91.795053] [ T1841] do_syscall_64+0xf4/0x660
[ 91.799701] [ T1841] ? handle_pte_fault+0x54e/0x760
[ 91.804864] [ T1841] ? __pfx_handle_pte_fault+0x10/0x10
[ 91.810371] [ T1841] ? __pfx_pmd_val+0x10/0x10
[ 91.815090] [ T1841] ? __handle_mm_fault+0xa02/0xef0
[ 91.820327] [ T1841] ? do_raw_spin_unlock+0x59/0x230
[ 91.825555] [ T1841] ? __pfx___css_rstat_updated+0x10/0x10
[ 91.831307] [ T1841] ? count_memcg_events+0x37f/0x480
[ 91.836623] [ T1841] ? lock_release+0xfa/0x120
[ 91.841334] [ T1841] ? rcu_read_unlock+0x1c/0x60
[ 91.846214] [ T1841] ? handle_mm_fault+0x4d1/0x7d0
[ 91.851268] [ T1841] ? do_user_addr_fault+0x15d/0xed0
[ 91.856588] [ T1841] ? lock_release+0xfa/0x120
[ 91.861293] [ T1841] ? do_user_addr_fault+0x811/0xed0
[ 91.866606] [ T1841] ? irqentry_exit+0xb0/0x810
[ 91.871396] [ T1841] ? do_syscall_64+0x34/0x660
[ 91.876188] [ T1841] ? trace_hardirqs_on+0x19/0x1a0
[ 91.881331] [ T1841] ? irqentry_exit+0xb5/0x810
[ 91.886129] [ T1841] ? do_syscall_64+0xab/0x660
[ 91.890926] [ T1841] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 91.896937] [ T1841] RIP: 0033:0x7f96f4878bbe
[ 91.901471] [ T1841] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 91.921483] [ T1841] RSP: 002b:00007ffcb76eba90 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 91.930047] [ T1841] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 91.938176] [ T1841] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 91.946306] [ T1841] RBP: 00007ffcb76ebaa0 R08: 0000000000000000 R09: 0000000000000000
[ 91.954436] [ T1841] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 91.962567] [ T1841] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5397e70
[ 91.970702] [ T1841] </TASK>
[ 91.973886] [ T1841] Modules linked in: null_blk nft_masq nft_reject_ipv4 act_csum cls_u32 sch_htb nf_nat_tftp nf_conntrack_tftp bridge stp llc target_core_user target_core_mod rfkill nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security nf_tables ip6table_filter ip6_tables iptable_filter ip_tables qrtr intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel iTCO_wdt intel_pmc_bxt kvm irqbypass rapl sunrpc intel_cstate intel_uncore pcspkr i2c_i801 i2c_smbus igb mei_me lpc_ich mei ioatdma dca wmi binfmt_misc joydev acpi_pad acpi_power_meter btrfs raid6_pq xor ses enclosure loop dm_multipath nfnetlink zram lz4hc_compress lz4_compress zstd_compress ast drm_client_lib i2c_algo_bit drm_shmem_helper
[ 91.974026] [ T1841] drm_kms_helper drm mpt3sas mpi3mr raid_class scsi_transport_sas scsi_dh_rdac scsi_dh_emc scsi_dh_alua i2c_dev fuse
[ 92.080026] [ T1841] ---[ end trace 0000000000000000 ]---
[ 92.106503] [ T1841] pstore: backend (erst) writing error (-28)
[ 92.112860] [ T1841] RIP: 0010:blk_mq_free_rqs+0x38/0x790
[ 92.118708] [ T1841] Code: 00 00 fc ff df 41 57 49 89 f7 48 81 c6 a0 00 00 00 41 56 49 89 fe 41 55 41 54 55 53 48 83 ec 48 89 14 24 48 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 fa 05 00 00 49 8b 87 a0 00 00 00 48 39 c6 0f 84
[ 92.139931] [ T1841] RSP: 0018:ffff88815455f530 EFLAGS: 00010206
[ 92.140007] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 92.145981] [ T1841] RAX: dffffc0000000000 RBX: 0338018e00000732 RCX: 0000000000000000
[ 92.155553] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 92.155560] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 92.155561] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 92.155563] [ T1842] Call Trace:
[ 92.155564] [ T1842] <TASK>
[ 92.155566] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 92.155624] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 92.155644] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 92.155652] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 92.155666] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 92.155672] [ T1842] ? kfree+0x1d6/0x620
[ 92.155682] [ T1842] kobject_add_internal+0x26f/0x800
[ 92.155690] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155693] [ T1842] kobject_add+0x139/0x1a0
[ 92.155696] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 92.155703] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 92.155707] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 92.155710] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 92.155713] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 92.155716] [ T1842] elevator_change_done+0x26f/0x690
[ 92.155725] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 92.155728] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 92.155733] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155737] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155740] [ T1842] elevator_change+0x283/0x4f0
[ 92.155749] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155752] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 92.155755] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 92.155759] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 92.155764] [ T1842] ? lock_acquire+0x126/0x140
[ 92.155773] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155776] [ T1842] queue_attr_store+0x23f/0x360
[ 92.155779] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 92.155782] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 92.155785] [ T1842] ? lock_release+0xfa/0x120
[ 92.155793] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 92.155796] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 92.155801] [ T1842] ? lock_acquire+0x126/0x140
[ 92.155804] [ T1842] ? lock_acquire+0x126/0x140
[ 92.155807] [ T1842] ? lock_release+0xfa/0x120
[ 92.155811] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 92.155816] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 92.155820] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.155823] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 92.155826] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 92.155829] [ T1842] vfs_write+0x524/0x1010
[ 92.155843] [ T1842] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 92.155845] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 92.155850] [ T1842] ? do_fcntl+0x605/0x1030
[ 92.155860] [ T1842] ? __pfx_do_fcntl+0x10/0x10
[ 92.155864] [ T1842] ksys_write+0xff/0x200
[ 92.155867] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 92.155869] [ T1842] ? selinux_file_fcntl+0x1e/0x110
[ 92.155876] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 92.155881] [ T1842] do_syscall_64+0xf4/0x660
[ 92.155885] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 92.155888] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 92.155892] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 92.155897] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 92.155901] [ T1842] ? lock_release+0xfa/0x120
[ 92.155904] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 92.155907] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 92.155911] [ T1842] ? do_wp_page+0x57e/0xf40
[ 92.155917] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 92.155959] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 92.155982] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 92.155991] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 92.155998] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 92.156003] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 92.156017] [ T1842] ? count_memcg_events+0x37f/0x480
[ 92.156028] [ T1842] ? lock_release+0xfa/0x120
[ 92.156033] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 92.156036] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 92.156039] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 92.156044] [ T1842] ? lock_release+0xfa/0x120
[ 92.156057] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 92.156060] [ T1842] ? irqentry_exit+0xb0/0x810
[ 92.156063] [ T1842] ? do_syscall_64+0x34/0x660
[ 92.156066] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 92.156073] [ T1842] ? irqentry_exit+0xb5/0x810
[ 92.156075] [ T1842] ? do_syscall_64+0xab/0x660
[ 92.156079] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 92.156081] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 92.156085] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 92.156087] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 92.156096] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 92.156098] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 92.156100] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 92.156102] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 92.156103] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5394f20
[ 92.156108] [ T1842] </TASK>
[ 92.156122] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 92.163427] [ T1841] RDX: 00670031c00000fa RSI: 0338018e000007d2 RDI: ffff888148d6f838
[ 92.701628] [ T1841] RBP: ffff888148d6f838 R08: ffffffffa7baa33a R09: fffffbfff5c10688
[ 92.717075] [ T1841] R10: fffffbfff5c10689 R11: 0000000000000001 R12: ffff88818265ad40
[ 92.732771] [ T1841] R13: ffff888148d6f838 R14: ffff888148d6f838 R15: 0338018e00000732
[ 92.748062] [ T1841] FS: 00007f96f4807780(0000) GS:ffff8887aff48000(0000) knlGS:0000000000000000
[ 92.763917] [ T1841] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 92.779232] [ T1841] CR2: 0000562ec532aa50 CR3: 0000000144fee003 CR4: 00000000001726f0
[ 92.831074] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 92.841145] [ T1842] CPU: 3 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 92.841152] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 92.841154] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 92.841155] [ T1842] Call Trace:
[ 92.841157] [ T1842] <TASK>
[ 92.841159] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 92.841168] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 92.841173] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 92.841179] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 92.841183] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 92.841188] [ T1842] ? kfree+0x1d6/0x620
[ 92.841192] [ T1842] kobject_add_internal+0x26f/0x800
[ 92.841197] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841200] [ T1842] kobject_add+0x139/0x1a0
[ 92.841203] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 92.841208] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 92.841212] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 92.841215] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 92.841219] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 92.841222] [ T1842] elevator_change_done+0x26f/0x690
[ 92.841227] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 92.841230] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 92.841236] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841239] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841242] [ T1842] elevator_change+0x283/0x4f0
[ 92.841246] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841249] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 92.841253] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 92.841256] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 92.841261] [ T1842] ? lock_acquire+0x126/0x140
[ 92.841266] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841269] [ T1842] queue_attr_store+0x23f/0x360
[ 92.841273] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 92.841276] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 92.841279] [ T1842] ? lock_release+0xfa/0x120
[ 92.841283] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 92.841286] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 92.841290] [ T1842] ? lock_acquire+0x126/0x140
[ 92.841294] [ T1842] ? lock_acquire+0x126/0x140
[ 92.841297] [ T1842] ? lock_release+0xfa/0x120
[ 92.841301] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 92.841304] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 92.841307] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 92.841310] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 92.841314] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 92.841317] [ T1842] vfs_write+0x524/0x1010
[ 92.841321] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 92.841327] [ T1842] ksys_write+0xff/0x200
[ 92.841330] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 92.841333] [ T1842] ? count_memcg_events+0x37f/0x480
[ 92.841338] [ T1842] do_syscall_64+0xf4/0x660
[ 92.841342] [ T1842] ? lock_release+0xfa/0x120
[ 92.841345] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 92.841349] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 92.841353] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 92.841358] [ T1842] ? lock_release+0xfa/0x120
[ 92.841362] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 92.841365] [ T1842] ? irqentry_exit+0xb0/0x810
[ 92.841368] [ T1842] ? do_syscall_64+0x34/0x660
[ 92.841371] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 92.841374] [ T1842] ? irqentry_exit+0xb5/0x810
[ 92.841376] [ T1842] ? do_syscall_64+0xab/0x660
[ 92.841380] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 92.841382] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 92.841386] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 92.841389] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 92.841393] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 92.841395] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 92.841397] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 92.841398] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 92.841400] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5382090
[ 92.841405] [ T1842] </TASK>
[ 92.841410] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 93.347152] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 93.357995] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 93.358003] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 93.358004] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 93.358006] [ T1842] Call Trace:
[ 93.358008] [ T1842] <TASK>
[ 93.358015] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 93.358025] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 93.358030] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 93.358042] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 93.358047] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 93.358051] [ T1842] ? kasan_save_track+0x14/0x30
[ 93.358060] [ T1842] ? kfree+0x1d6/0x620
[ 93.358064] [ T1842] kobject_add_internal+0x26f/0x800
[ 93.358071] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358074] [ T1842] kobject_add+0x139/0x1a0
[ 93.358085] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 93.358090] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 93.358094] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 93.358097] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 93.358109] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 93.358112] [ T1842] elevator_change_done+0x26f/0x690
[ 93.358122] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 93.358125] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 93.358131] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358134] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358137] [ T1842] elevator_change+0x283/0x4f0
[ 93.358144] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358147] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 93.358151] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 93.358154] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 93.358160] [ T1842] ? lock_acquire+0x126/0x140
[ 93.358181] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358190] [ T1842] queue_attr_store+0x23f/0x360
[ 93.358195] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 93.358198] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 93.358200] [ T1842] ? lock_release+0xfa/0x120
[ 93.358204] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 93.358211] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 93.358216] [ T1842] ? lock_acquire+0x126/0x140
[ 93.358219] [ T1842] ? lock_acquire+0x126/0x140
[ 93.358223] [ T1842] ? lock_release+0xfa/0x120
[ 93.358226] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 93.358238] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 93.358241] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.358244] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 93.358248] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 93.358254] [ T1842] vfs_write+0x524/0x1010
[ 93.358259] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 93.358262] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 93.358266] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 93.358274] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 93.358280] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 93.358282] [ T1842] ? lock_release+0xfa/0x120
[ 93.358285] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 93.358290] [ T1842] ksys_write+0xff/0x200
[ 93.358297] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 93.358300] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 93.358305] [ T1842] do_syscall_64+0xf4/0x660
[ 93.358310] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 93.358317] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 93.358324] [ T1842] ? fput_close+0x137/0x1a0
[ 93.358328] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 93.358349] [ T1842] ? count_memcg_events+0x37f/0x480
[ 93.358365] [ T1842] ? lock_release+0xfa/0x120
[ 93.358371] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 93.358375] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 93.358381] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 93.358390] [ T1842] ? lock_release+0xfa/0x120
[ 93.358395] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 93.358400] [ T1842] ? irqentry_exit+0xb0/0x810
[ 93.358415] [ T1842] ? do_syscall_64+0x34/0x660
[ 93.358420] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 93.358427] [ T1842] ? irqentry_exit+0xb5/0x810
[ 93.358430] [ T1842] ? do_syscall_64+0xab/0x660
[ 93.358436] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 93.358440] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 93.358450] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 93.358453] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 93.358459] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 93.358462] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 93.358465] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 93.358469] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 93.358471] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec53929c0
[ 93.358478] [ T1842] </TASK>
[ 93.358495] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 93.906005] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 93.916008] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 93.916015] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 93.916017] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 93.916018] [ T1842] Call Trace:
[ 93.916020] [ T1842] <TASK>
[ 93.916022] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 93.916031] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 93.916037] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 93.916043] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 93.916048] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 93.916052] [ T1842] ? kfree+0x1d6/0x620
[ 93.916056] [ T1842] kobject_add_internal+0x26f/0x800
[ 93.916062] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916065] [ T1842] kobject_add+0x139/0x1a0
[ 93.916069] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 93.916073] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 93.916077] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 93.916080] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 93.916085] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 93.916088] [ T1842] elevator_change_done+0x26f/0x690
[ 93.916093] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 93.916096] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 93.916102] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916106] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916109] [ T1842] elevator_change+0x283/0x4f0
[ 93.916113] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916116] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 93.916120] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 93.916123] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 93.916129] [ T1842] ? lock_acquire+0x126/0x140
[ 93.916133] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916137] [ T1842] queue_attr_store+0x23f/0x360
[ 93.916141] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 93.916144] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 93.916146] [ T1842] ? lock_release+0xfa/0x120
[ 93.916150] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 93.916154] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 93.916158] [ T1842] ? lock_acquire+0x126/0x140
[ 93.916162] [ T1842] ? lock_acquire+0x126/0x140
[ 93.916165] [ T1842] ? lock_release+0xfa/0x120
[ 93.916169] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 93.916172] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 93.916176] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 93.916179] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 93.916183] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 93.916185] [ T1842] vfs_write+0x524/0x1010
[ 93.916189] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 93.916193] [ T1842] ? fput_close+0x137/0x1a0
[ 93.916198] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 93.916202] [ T1842] ksys_write+0xff/0x200
[ 93.916205] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 93.916208] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 93.916211] [ T1842] ? lock_release+0xfa/0x120
[ 93.916215] [ T1842] do_syscall_64+0xf4/0x660
[ 93.916219] [ T1842] ? do_wp_page+0x57e/0xf40
[ 93.916224] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 93.916228] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 93.916231] [ T1842] ? fput_close_sync+0x137/0x1a0
[ 93.916234] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 93.916238] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 93.916242] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 93.916249] [ T1842] ? count_memcg_events+0x37f/0x480
[ 93.916255] [ T1842] ? lock_release+0xfa/0x120
[ 93.916258] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 93.916261] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 93.916265] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 93.916270] [ T1842] ? lock_release+0xfa/0x120
[ 93.916274] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 93.916277] [ T1842] ? irqentry_exit+0xb0/0x810
[ 93.916280] [ T1842] ? do_syscall_64+0x34/0x660
[ 93.916283] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 93.916286] [ T1842] ? irqentry_exit+0xb5/0x810
[ 93.916289] [ T1842] ? do_syscall_64+0xab/0x660
[ 93.916292] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 93.916295] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 93.916299] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 93.916302] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 93.916306] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 93.916308] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 93.916310] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 93.916311] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 93.916313] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5397300
[ 93.916318] [ T1842] </TASK>
[ 93.916324] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 94.437220] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 94.447276] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 94.447287] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 94.447289] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 94.447292] [ T1842] Call Trace:
[ 94.447295] [ T1842] <TASK>
[ 94.447297] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 94.447310] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 94.447317] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 94.447326] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 94.447333] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 94.447338] [ T1842] ? kasan_save_track+0x14/0x30
[ 94.447344] [ T1842] ? kfree+0x1d6/0x620
[ 94.447350] [ T1842] kobject_add_internal+0x26f/0x800
[ 94.447390] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.447455] [ T1842] kobject_add+0x139/0x1a0
[ 94.447521] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 94.447630] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 94.447696] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 94.447761] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 94.447849] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 94.447915] [ T1842] elevator_change_done+0x26f/0x690
[ 94.447943] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 94.447947] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 94.448008] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.448094] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.448117] [ T1842] elevator_change+0x283/0x4f0
[ 94.448204] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.448291] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 94.448379] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 94.448422] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 94.448552] [ T1842] ? lock_acquire+0x126/0x140
[ 94.448619] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.448684] [ T1842] queue_attr_store+0x23f/0x360
[ 94.448771] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 94.448837] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 94.448880] [ T1842] ? lock_release+0xfa/0x120
[ 94.448926] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 94.448933] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 94.449011] [ T1842] ? lock_acquire+0x126/0x140
[ 94.449077] [ T1842] ? lock_acquire+0x126/0x140
[ 94.449121] [ T1842] ? lock_release+0xfa/0x120
[ 94.449186] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 94.449251] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 94.449296] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 94.449360] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 94.449426] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 94.449513] [ T1842] vfs_write+0x524/0x1010
[ 94.449622] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 94.449688] [ T1842] ksys_write+0xff/0x200
[ 94.449732] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 94.449797] [ T1842] ? lock_release+0xfa/0x120
[ 94.449862] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 94.449933] [ T1842] do_syscall_64+0xf4/0x660
[ 94.449940] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 94.449945] [ T1842] ? irqentry_exit+0xb5/0x810
[ 94.449961] [ T1842] ? do_syscall_64+0xab/0x660
[ 94.449983] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 94.449988] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 94.450027] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 94.450071] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 94.450179] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 94.450223] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 94.450246] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 94.450289] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 94.450311] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5395410
[ 94.450420] [ T1842] </TASK>
[ 95.163048] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 95.211096] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 95.221135] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 95.221215] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 95.221258] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 95.221260] [ T1842] Call Trace:
[ 95.221303] [ T1842] <TASK>
[ 95.221367] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 95.221528] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 95.221636] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 95.221768] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 95.221855] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 95.221943] [ T1842] ? kfree+0x1d6/0x620
[ 95.221950] [ T1842] kobject_add_internal+0x26f/0x800
[ 95.221958] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.222036] [ T1842] kobject_add+0x139/0x1a0
[ 95.222102] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 95.222210] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 95.222297] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 95.222363] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 95.222451] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 95.222495] [ T1842] elevator_change_done+0x26f/0x690
[ 95.222624] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 95.222690] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 95.222798] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.222865] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.222930] [ T1842] elevator_change+0x283/0x4f0
[ 95.222958] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.222963] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 95.222969] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 95.222974] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 95.222984] [ T1842] ? lock_acquire+0x126/0x140
[ 95.222992] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.222997] [ T1842] queue_attr_store+0x23f/0x360
[ 95.223003] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 95.223009] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 95.223014] [ T1842] ? lock_release+0xfa/0x120
[ 95.223031] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 95.223117] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 95.223204] [ T1842] ? lock_acquire+0x126/0x140
[ 95.223249] [ T1842] ? lock_acquire+0x126/0x140
[ 95.223314] [ T1842] ? lock_release+0xfa/0x120
[ 95.223379] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 95.223444] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 95.223489] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 95.223553] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 95.223640] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 95.223684] [ T1842] vfs_write+0x524/0x1010
[ 95.223772] [ T1842] ? __pfx_locks_remove_posix+0x10/0x10
[ 95.223902] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 95.223953] [ T1842] ksys_write+0xff/0x200
[ 95.223972] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 95.223977] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 95.224036] [ T1842] ? lock_release+0xfa/0x120
[ 95.224122] [ T1842] do_syscall_64+0xf4/0x660
[ 95.224189] [ T1842] ? do_wp_page+0x57e/0xf40
[ 95.224256] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 95.224340] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 95.224385] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 95.224429] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 95.224516] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 95.224690] [ T1842] ? count_memcg_events+0x37f/0x480
[ 95.224777] [ T1842] ? lock_release+0xfa/0x120
[ 95.224843] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 95.224908] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 95.224954] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 95.224973] [ T1842] ? lock_release+0xfa/0x120
[ 95.225039] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 95.225084] [ T1842] ? irqentry_exit+0xb0/0x810
[ 95.225148] [ T1842] ? do_syscall_64+0x34/0x660
[ 95.225214] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 95.225279] [ T1842] ? irqentry_exit+0xb5/0x810
[ 95.225322] [ T1842] ? do_syscall_64+0xab/0x660
[ 95.225388] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 95.225454] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 95.225562] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 95.225628] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 95.225715] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 95.225780] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 95.225803] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 95.225846] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 95.225890] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5395360
[ 95.225959] [ T1842] </TASK>
[ 96.121095] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 96.243207] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 96.254050] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 96.254058] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 96.254064] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 96.254066] [ T1842] Call Trace:
[ 96.254068] [ T1842] <TASK>
[ 96.254070] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 96.254079] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 96.254089] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 96.254096] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 96.254100] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 96.254111] [ T1842] ? kfree+0x1d6/0x620
[ 96.254115] [ T1842] kobject_add_internal+0x26f/0x800
[ 96.254121] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254127] [ T1842] kobject_add+0x139/0x1a0
[ 96.254131] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 96.254135] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 96.254139] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 96.254142] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 96.254151] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 96.254154] [ T1842] elevator_change_done+0x26f/0x690
[ 96.254159] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 96.254162] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 96.254170] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254174] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254177] [ T1842] elevator_change+0x283/0x4f0
[ 96.254180] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254183] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 96.254187] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 96.254192] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 96.254198] [ T1842] ? lock_acquire+0x126/0x140
[ 96.254202] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254205] [ T1842] queue_attr_store+0x23f/0x360
[ 96.254209] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 96.254216] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 96.254219] [ T1842] ? lock_release+0xfa/0x120
[ 96.254223] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 96.254227] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 96.254231] [ T1842] ? lock_acquire+0x126/0x140
[ 96.254235] [ T1842] ? lock_acquire+0x126/0x140
[ 96.254238] [ T1842] ? lock_release+0xfa/0x120
[ 96.254242] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 96.254245] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 96.254248] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.254251] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 96.254265] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 96.254268] [ T1842] vfs_write+0x524/0x1010
[ 96.254272] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 96.254284] [ T1842] ksys_write+0xff/0x200
[ 96.254287] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 96.254290] [ T1842] ? lock_release+0xfa/0x120
[ 96.254294] [ T1842] do_syscall_64+0xf4/0x660
[ 96.254301] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 96.254307] [ T1842] ? lock_release+0xfa/0x120
[ 96.254310] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 96.254314] [ T1842] ? irqentry_exit+0xb0/0x810
[ 96.254316] [ T1842] ? do_syscall_64+0x34/0x660
[ 96.254321] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 96.254326] [ T1842] ? irqentry_exit+0xb5/0x810
[ 96.254328] [ T1842] ? do_syscall_64+0xab/0x660
[ 96.254331] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 96.254334] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 96.254338] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 96.254348] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 96.254352] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 96.254354] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 96.254356] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 96.254357] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 96.254359] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec53956a0
[ 96.254373] [ T1842] </TASK>
[ 96.254379] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 96.715123] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 96.725123] [ T1842] CPU: 3 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 96.725129] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 96.725131] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 96.725133] [ T1842] Call Trace:
[ 96.725135] [ T1842] <TASK>
[ 96.725136] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 96.725145] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 96.725150] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 96.725156] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 96.725161] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 96.725165] [ T1842] ? kfree+0x1d6/0x620
[ 96.725169] [ T1842] kobject_add_internal+0x26f/0x800
[ 96.725175] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725178] [ T1842] kobject_add+0x139/0x1a0
[ 96.725181] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 96.725185] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 96.725189] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 96.725192] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 96.725196] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 96.725199] [ T1842] elevator_change_done+0x26f/0x690
[ 96.725204] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 96.725207] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 96.725212] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725216] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725219] [ T1842] elevator_change+0x283/0x4f0
[ 96.725223] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725226] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 96.725230] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 96.725233] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 96.725238] [ T1842] ? lock_acquire+0x126/0x140
[ 96.725243] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725245] [ T1842] queue_attr_store+0x23f/0x360
[ 96.725249] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 96.725252] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 96.725255] [ T1842] ? lock_release+0xfa/0x120
[ 96.725259] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 96.725262] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 96.725267] [ T1842] ? lock_acquire+0x126/0x140
[ 96.725270] [ T1842] ? lock_acquire+0x126/0x140
[ 96.725274] [ T1842] ? lock_release+0xfa/0x120
[ 96.725277] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 96.725280] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 96.725284] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 96.725286] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 96.725290] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 96.725293] [ T1842] vfs_write+0x524/0x1010
[ 96.725297] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 96.725302] [ T1842] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 96.725304] [ T1842] ? lock_acquire+0x126/0x140
[ 96.725308] [ T1842] ksys_write+0xff/0x200
[ 96.725311] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 96.725314] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 96.725318] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 96.725323] [ T1842] do_syscall_64+0xf4/0x660
[ 96.725327] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 96.725331] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 96.725334] [ T1842] ? lock_release+0xfa/0x120
[ 96.725337] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 96.725340] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 96.725344] [ T1842] ? do_wp_page+0x57e/0xf40
[ 96.725348] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 96.725352] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 96.725355] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 96.725359] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 96.725363] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 96.725370] [ T1842] ? count_memcg_events+0x37f/0x480
[ 96.725375] [ T1842] ? lock_release+0xfa/0x120
[ 96.725378] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 96.725381] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 96.725385] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 96.725389] [ T1842] ? lock_release+0xfa/0x120
[ 96.725393] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 96.725396] [ T1842] ? irqentry_exit+0xb0/0x810
[ 96.725399] [ T1842] ? do_syscall_64+0x34/0x660
[ 96.725402] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 96.725405] [ T1842] ? irqentry_exit+0xb5/0x810
[ 96.725407] [ T1842] ? do_syscall_64+0xab/0x660
[ 96.725411] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 96.725413] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 96.725417] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 96.725419] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 96.725423] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 96.725425] [ T1842] RDX: 0000000000000004 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 96.725427] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 96.725429] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
[ 96.725430] [ T1842] R13: 0000000000000004 R14: 0000562ec532aa50 R15: 0000562ec5399dc0
[ 96.725435] [ T1842] </TASK>
[ 96.725440] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 97.266189] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 97.276171] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 97.276178] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 97.276179] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 97.276181] [ T1842] Call Trace:
[ 97.276183] [ T1842] <TASK>
[ 97.276185] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 97.276194] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 97.276199] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 97.276206] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 97.276210] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 97.276214] [ T1842] ? kasan_save_track+0x14/0x30
[ 97.276218] [ T1842] ? kfree+0x1d6/0x620
[ 97.276222] [ T1842] kobject_add_internal+0x26f/0x800
[ 97.276228] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276232] [ T1842] kobject_add+0x139/0x1a0
[ 97.276235] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 97.276239] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 97.276243] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 97.276246] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 97.276250] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 97.276253] [ T1842] elevator_change_done+0x26f/0x690
[ 97.276259] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 97.276262] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 97.276268] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276272] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276275] [ T1842] elevator_change+0x283/0x4f0
[ 97.276279] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276282] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 97.276286] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 97.276289] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 97.276295] [ T1842] ? lock_acquire+0x126/0x140
[ 97.276300] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276303] [ T1842] queue_attr_store+0x23f/0x360
[ 97.276307] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 97.276310] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 97.276313] [ T1842] ? lock_release+0xfa/0x120
[ 97.276317] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 97.276321] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 97.276325] [ T1842] ? lock_acquire+0x126/0x140
[ 97.276329] [ T1842] ? lock_acquire+0x126/0x140
[ 97.276332] [ T1842] ? lock_release+0xfa/0x120
[ 97.276336] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 97.276339] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 97.276343] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.276345] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 97.276349] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 97.276352] [ T1842] vfs_write+0x524/0x1010
[ 97.276356] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 97.276361] [ T1842] ? __pfx_fput_close_sync+0x10/0x10
[ 97.276365] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 97.276369] [ T1842] ksys_write+0xff/0x200
[ 97.276372] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 97.276374] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 97.276378] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 97.276381] [ T1842] do_syscall_64+0xf4/0x660
[ 97.276386] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 97.276390] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 97.276394] [ T1842] ? do_wp_page+0x57e/0xf40
[ 97.276398] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 97.276402] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 97.276406] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 97.276410] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 97.276414] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 97.276422] [ T1842] ? count_memcg_events+0x37f/0x480
[ 97.276428] [ T1842] ? lock_release+0xfa/0x120
[ 97.276431] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 97.276434] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 97.276437] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 97.276443] [ T1842] ? lock_release+0xfa/0x120
[ 97.276446] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 97.276450] [ T1842] ? irqentry_exit+0xb0/0x810
[ 97.276452] [ T1842] ? do_syscall_64+0x34/0x660
[ 97.276456] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 97.276458] [ T1842] ? irqentry_exit+0xb5/0x810
[ 97.276461] [ T1842] ? do_syscall_64+0xab/0x660
[ 97.276464] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 97.276467] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 97.276470] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 97.276473] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 97.276477] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 97.276479] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 97.276481] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 97.276483] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 97.276484] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec53972c0
[ 97.276489] [ T1842] </TASK>
[ 97.276495] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 97.804201] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 97.814639] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 97.814813] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 97.814835] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 97.814879] [ T1842] Call Trace:
[ 97.814923] [ T1842] <TASK>
[ 97.814988] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 97.815022] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 97.815123] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 97.815233] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 97.815320] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 97.815407] [ T1842] ? kfree+0x1d6/0x620
[ 97.815494] [ T1842] kobject_add_internal+0x26f/0x800
[ 97.815605] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.815669] [ T1842] kobject_add+0x139/0x1a0
[ 97.815734] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 97.815843] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 97.815888] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 97.815931] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 97.815998] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 97.816004] [ T1842] elevator_change_done+0x26f/0x690
[ 97.816105] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 97.816149] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 97.816237] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.816323] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.816367] [ T1842] elevator_change+0x283/0x4f0
[ 97.816454] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.816520] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 97.816564] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 97.816585] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 97.816672] [ T1842] ? lock_acquire+0x126/0x140
[ 97.816803] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.816847] [ T1842] queue_attr_store+0x23f/0x360
[ 97.816935] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 97.817002] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 97.817007] [ T1842] ? lock_release+0xfa/0x120
[ 97.817014] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 97.817052] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 97.817073] [ T1842] ? lock_acquire+0x126/0x140
[ 97.817139] [ T1842] ? lock_acquire+0x126/0x140
[ 97.817183] [ T1842] ? lock_release+0xfa/0x120
[ 97.817205] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 97.817269] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 97.817335] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 97.817400] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 97.817467] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 97.817509] [ T1842] vfs_write+0x524/0x1010
[ 97.817597] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 97.817667] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 97.817684] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 97.817772] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 97.817859] [ T1842] ? do_wp_page+0x57e/0xf40
[ 97.817926] [ T1842] ksys_write+0xff/0x200
[ 97.817989] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 97.818005] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 97.818033] [ T1842] do_syscall_64+0xf4/0x660
[ 97.818103] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 97.818143] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 97.818295] [ T1842] ? count_memcg_events+0x37f/0x480
[ 97.818405] [ T1842] ? lock_release+0xfa/0x120
[ 97.818471] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 97.818557] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 97.818624] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 97.818733] [ T1842] ? lock_release+0xfa/0x120
[ 97.818818] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 97.818885] [ T1842] ? irqentry_exit+0xb0/0x810
[ 97.818929] [ T1842] ? do_syscall_64+0x34/0x660
[ 97.818995] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 97.819000] [ T1842] ? irqentry_exit+0xb5/0x810
[ 97.819016] [ T1842] ? do_syscall_64+0xab/0x660
[ 97.819103] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 97.819169] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 97.819256] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 97.819300] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 97.819408] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 97.819452] [ T1842] RDX: 0000000000000004 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 97.819475] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 97.819539] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
[ 97.819543] [ T1842] R13: 0000000000000004 R14: 0000562ec532aa50 R15: 0000562ec53997a0
[ 97.819649] [ T1842] </TASK>
[ 98.701369] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 98.743363] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 98.753340] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 98.753346] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 98.753347] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 98.753349] [ T1842] Call Trace:
[ 98.753351] [ T1842] <TASK>
[ 98.753353] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 98.753362] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 98.753367] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 98.753373] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 98.753377] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 98.753381] [ T1842] ? kasan_save_track+0x14/0x30
[ 98.753385] [ T1842] ? kfree+0x1d6/0x620
[ 98.753388] [ T1842] kobject_add_internal+0x26f/0x800
[ 98.753395] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753398] [ T1842] kobject_add+0x139/0x1a0
[ 98.753402] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 98.753406] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 98.753410] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 98.753413] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 98.753417] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 98.753420] [ T1842] elevator_change_done+0x26f/0x690
[ 98.753426] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 98.753429] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 98.753435] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753439] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753442] [ T1842] elevator_change+0x283/0x4f0
[ 98.753446] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753449] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 98.753453] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 98.753456] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 98.753461] [ T1842] ? lock_acquire+0x126/0x140
[ 98.753466] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753469] [ T1842] queue_attr_store+0x23f/0x360
[ 98.753473] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 98.753476] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 98.753479] [ T1842] ? lock_release+0xfa/0x120
[ 98.753482] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 98.753486] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 98.753490] [ T1842] ? lock_acquire+0x126/0x140
[ 98.753494] [ T1842] ? lock_acquire+0x126/0x140
[ 98.753497] [ T1842] ? lock_release+0xfa/0x120
[ 98.753501] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 98.753504] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 98.753508] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 98.753510] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 98.753514] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 98.753517] [ T1842] vfs_write+0x524/0x1010
[ 98.753521] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 98.753525] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 98.753528] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 98.753534] [ T1842] ? count_memcg_events+0x37f/0x480
[ 98.753540] [ T1842] ksys_write+0xff/0x200
[ 98.753543] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 98.753545] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 98.753550] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 98.753556] [ T1842] do_syscall_64+0xf4/0x660
[ 98.753561] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 98.753565] [ T1842] ? irqentry_exit+0xb0/0x810
[ 98.753567] [ T1842] ? do_syscall_64+0x34/0x660
[ 98.753571] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 98.753573] [ T1842] ? irqentry_exit+0xb5/0x810
[ 98.753576] [ T1842] ? do_syscall_64+0xab/0x660
[ 98.753579] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 98.753582] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 98.753585] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 98.753588] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 98.753592] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 98.753594] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 98.753596] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 98.753598] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 98.753599] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5399990
[ 98.753604] [ T1842] </TASK>
[ 98.753610] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 99.221237] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 99.231263] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 99.231273] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 99.231275] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 99.231278] [ T1842] Call Trace:
[ 99.231280] [ T1842] <TASK>
[ 99.231283] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 99.231295] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 99.231355] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 99.231528] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 99.231594] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 99.231660] [ T1842] ? kfree+0x1d6/0x620
[ 99.231726] [ T1842] kobject_add_internal+0x26f/0x800
[ 99.231855] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.231921] [ T1842] kobject_add+0x139/0x1a0
[ 99.231965] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 99.232031] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 99.232039] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 99.232044] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 99.232081] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 99.232126] [ T1842] elevator_change_done+0x26f/0x690
[ 99.232234] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 99.232278] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 99.232387] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.232452] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.232496] [ T1842] elevator_change+0x283/0x4f0
[ 99.232583] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.232649] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 99.232715] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 99.232801] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 99.232888] [ T1842] ? lock_acquire+0x126/0x140
[ 99.232955] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.233019] [ T1842] queue_attr_store+0x23f/0x360
[ 99.233047] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 99.233052] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 99.233057] [ T1842] ? lock_release+0xfa/0x120
[ 99.233063] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 99.233070] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 99.233077] [ T1842] ? lock_acquire+0x126/0x140
[ 99.233082] [ T1842] ? lock_acquire+0x126/0x140
[ 99.233089] [ T1842] ? lock_release+0xfa/0x120
[ 99.233094] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 99.233100] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 99.233106] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 99.233163] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 99.233208] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 99.233228] [ T1842] vfs_write+0x524/0x1010
[ 99.233294] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 99.233381] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 99.233447] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 99.233584] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 99.233671] [ T1842] ksys_write+0xff/0x200
[ 99.233737] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 99.233824] [ T1842] do_syscall_64+0xf4/0x660
[ 99.233913] [ T1842] ? count_memcg_events+0x37f/0x480
[ 99.233977] [ T1842] ? lock_release+0xfa/0x120
[ 99.234023] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 99.234028] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 99.234045] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 99.234066] [ T1842] ? lock_release+0xfa/0x120
[ 99.234132] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 99.234197] [ T1842] ? irqentry_exit+0xb0/0x810
[ 99.234262] [ T1842] ? do_syscall_64+0x34/0x660
[ 99.234306] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 99.234328] [ T1842] ? irqentry_exit+0xb5/0x810
[ 99.234372] [ T1842] ? do_syscall_64+0xab/0x660
[ 99.234437] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 99.234524] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 99.234611] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 99.234676] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 99.234764] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 99.234808] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 99.234873] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 99.234895] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 99.234918] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5399ad0
[ 99.235027] [ T1842] </TASK>
[ 100.030097] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 100.109352] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 100.119423] [ T1842] CPU: 6 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 100.119434] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 100.119436] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 100.119439] [ T1842] Call Trace:
[ 100.119442] [ T1842] <TASK>
[ 100.119444] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 100.119468] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 100.119534] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 100.119665] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 100.119751] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 100.119817] [ T1842] ? kasan_save_track+0x14/0x30
[ 100.119882] [ T1842] ? kfree+0x1d6/0x620
[ 100.119948] [ T1842] kobject_add_internal+0x26f/0x800
[ 100.120035] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.120061] [ T1842] kobject_add+0x139/0x1a0
[ 100.120066] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 100.120105] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 100.120170] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 100.120216] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 100.120302] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 100.120346] [ T1842] elevator_change_done+0x26f/0x690
[ 100.120454] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 100.120498] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 100.120628] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.120695] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.120760] [ T1842] elevator_change+0x283/0x4f0
[ 100.120829] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.120891] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 100.120977] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 100.121022] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 100.121052] [ T1842] ? lock_acquire+0x126/0x140
[ 100.121153] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.121219] [ T1842] queue_attr_store+0x23f/0x360
[ 100.121306] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 100.121372] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 100.121437] [ T1842] ? lock_release+0xfa/0x120
[ 100.121524] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 100.121589] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 100.121676] [ T1842] ? lock_acquire+0x126/0x140
[ 100.121721] [ T1842] ? lock_acquire+0x126/0x140
[ 100.121765] [ T1842] ? lock_release+0xfa/0x120
[ 100.121808] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 100.121895] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 100.121940] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 100.122004] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 100.122053] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 100.122058] [ T1842] vfs_write+0x524/0x1010
[ 100.122137] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 100.122203] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 100.122224] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 100.122289] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 100.122349] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 100.122406] [ T1842] ? lock_release+0xfa/0x120
[ 100.122471] [ T1842] ? do_wp_page+0x57e/0xf40
[ 100.122536] [ T1842] ksys_write+0xff/0x200
[ 100.122561] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 100.122603] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 100.122646] [ T1842] ? fput_close_sync+0x137/0x1a0
[ 100.122755] [ T1842] do_syscall_64+0xf4/0x660
[ 100.122864] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 100.122911] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 100.123040] [ T1842] ? count_memcg_events+0x37f/0x480
[ 100.123049] [ T1842] ? lock_release+0xfa/0x120
[ 100.123083] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 100.123148] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 100.123193] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 100.123280] [ T1842] ? lock_release+0xfa/0x120
[ 100.123324] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 100.123367] [ T1842] ? irqentry_exit+0xb0/0x810
[ 100.123411] [ T1842] ? do_syscall_64+0x34/0x660
[ 100.123457] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 100.123542] [ T1842] ? irqentry_exit+0xb5/0x810
[ 100.123585] [ T1842] ? do_syscall_64+0xab/0x660
[ 100.123650] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 100.123737] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 100.123825] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 100.123890] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 100.123956] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 100.124021] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 100.124044] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 100.124047] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 100.124050] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5394f20
[ 100.124110] [ T1842] </TASK>
[ 101.040053] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 101.115173] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 101.125215] [ T1842] CPU: 3 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 101.125222] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 101.125223] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 101.125225] [ T1842] Call Trace:
[ 101.125227] [ T1842] <TASK>
[ 101.125229] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 101.125238] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 101.125243] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 101.125249] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 101.125254] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 101.125258] [ T1842] ? kfree+0x1d6/0x620
[ 101.125262] [ T1842] kobject_add_internal+0x26f/0x800
[ 101.125268] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125271] [ T1842] kobject_add+0x139/0x1a0
[ 101.125274] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 101.125278] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 101.125283] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 101.125285] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 101.125290] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 101.125293] [ T1842] elevator_change_done+0x26f/0x690
[ 101.125298] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 101.125301] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 101.125306] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125310] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125313] [ T1842] elevator_change+0x283/0x4f0
[ 101.125318] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125321] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 101.125325] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 101.125328] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 101.125333] [ T1842] ? lock_acquire+0x126/0x140
[ 101.125338] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125341] [ T1842] queue_attr_store+0x23f/0x360
[ 101.125345] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 101.125348] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 101.125351] [ T1842] ? lock_release+0xfa/0x120
[ 101.125355] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 101.125358] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 101.125363] [ T1842] ? lock_acquire+0x126/0x140
[ 101.125366] [ T1842] ? lock_acquire+0x126/0x140
[ 101.125370] [ T1842] ? lock_release+0xfa/0x120
[ 101.125373] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 101.125377] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 101.125380] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.125383] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 101.125387] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 101.125390] [ T1842] vfs_write+0x524/0x1010
[ 101.125394] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 101.125397] [ T1842] ? fput_close_sync+0x137/0x1a0
[ 101.125402] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 101.125406] [ T1842] ? do_syscall_64+0x1b9/0x660
[ 101.125410] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 101.125414] [ T1842] ksys_write+0xff/0x200
[ 101.125418] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 101.125420] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 101.125424] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 101.125429] [ T1842] do_syscall_64+0xf4/0x660
[ 101.125432] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 101.125437] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 101.125440] [ T1842] ? trace_hardirqs_on_prepare+0x150/0x1a0
[ 101.125444] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 101.125446] [ T1842] ? do_syscall_64+0x1d7/0x660
[ 101.125451] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 101.125455] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 101.125462] [ T1842] ? count_memcg_events+0x37f/0x480
[ 101.125467] [ T1842] ? lock_release+0xfa/0x120
[ 101.125471] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 101.125474] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 101.125477] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 101.125482] [ T1842] ? lock_release+0xfa/0x120
[ 101.125485] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 101.125489] [ T1842] ? irqentry_exit+0xb0/0x810
[ 101.125492] [ T1842] ? do_syscall_64+0x34/0x660
[ 101.125495] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 101.125497] [ T1842] ? irqentry_exit+0xb5/0x810
[ 101.125500] [ T1842] ? do_syscall_64+0xab/0x660
[ 101.125504] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 101.125506] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 101.125510] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 101.125513] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 101.125517] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 101.125519] [ T1842] RDX: 0000000000000004 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 101.125521] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 101.125523] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
[ 101.125524] [ T1842] R13: 0000000000000004 R14: 0000562ec532aa50 R15: 0000562ec5382090
[ 101.125529] [ T1842] </TASK>
[ 101.125535] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 101.664224] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 101.675194] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 101.675208] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 101.675210] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 101.675212] [ T1842] Call Trace:
[ 101.675214] [ T1842] <TASK>
[ 101.675216] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 101.675236] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 101.675245] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 101.675253] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 101.675258] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 101.675277] [ T1842] ? kfree+0x1d6/0x620
[ 101.675282] [ T1842] kobject_add_internal+0x26f/0x800
[ 101.675296] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675300] [ T1842] kobject_add+0x139/0x1a0
[ 101.675304] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 101.675318] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 101.675323] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 101.675326] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 101.675336] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 101.675340] [ T1842] elevator_change_done+0x26f/0x690
[ 101.675346] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 101.675353] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 101.675361] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675366] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675369] [ T1842] elevator_change+0x283/0x4f0
[ 101.675382] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675385] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 101.675390] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 101.675394] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 101.675403] [ T1842] ? lock_acquire+0x126/0x140
[ 101.675409] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675413] [ T1842] queue_attr_store+0x23f/0x360
[ 101.675424] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 101.675427] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 101.675431] [ T1842] ? lock_release+0xfa/0x120
[ 101.675435] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 101.675443] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 101.675447] [ T1842] ? lock_acquire+0x126/0x140
[ 101.675451] [ T1842] ? lock_acquire+0x126/0x140
[ 101.675455] [ T1842] ? lock_release+0xfa/0x120
[ 101.675463] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 101.675467] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 101.675471] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 101.675474] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 101.675479] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 101.675484] [ T1842] vfs_write+0x524/0x1010
[ 101.675489] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 101.675493] [ T1842] ? __pfx_locks_remove_posix+0x10/0x10
[ 101.675518] [ T1842] ksys_write+0xff/0x200
[ 101.675521] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 101.675524] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 101.675529] [ T1842] do_syscall_64+0xf4/0x660
[ 101.675543] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 101.675547] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 101.675553] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 101.675558] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 101.675560] [ T1842] ? lock_release+0xfa/0x120
[ 101.675564] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 101.675567] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 101.675572] [ T1842] ? do_wp_page+0x57e/0xf40
[ 101.675583] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 101.675586] [ T1842] ? do_syscall_64+0x1d7/0x660
[ 101.675590] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 101.675592] [ T1842] ? do_syscall_64+0x1d7/0x660
[ 101.675601] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 101.675605] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 101.675609] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 101.675620] [ T1842] ? count_memcg_events+0x37f/0x480
[ 101.675629] [ T1842] ? lock_release+0xfa/0x120
[ 101.675633] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 101.675635] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 101.675639] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 101.675648] [ T1842] ? lock_release+0xfa/0x120
[ 101.675651] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 101.675655] [ T1842] ? irqentry_exit+0xb0/0x810
[ 101.675657] [ T1842] ? do_syscall_64+0x34/0x660
[ 101.675665] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 101.675673] [ T1842] ? irqentry_exit+0xb5/0x810
[ 101.675675] [ T1842] ? do_syscall_64+0xab/0x660
[ 101.675679] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 101.675692] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 101.675695] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 101.675698] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 101.675702] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 101.675707] [ T1842] RDX: 0000000000000004 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 101.675709] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 101.675710] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
[ 101.675712] [ T1842] R13: 0000000000000004 R14: 0000562ec532aa50 R15: 0000562ec5397e70
[ 101.675717] [ T1842] </TASK>
[ 101.675723] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 102.235777] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 102.245750] [ T1842] CPU: 4 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 102.245756] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 102.245757] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 102.245759] [ T1842] Call Trace:
[ 102.245761] [ T1842] <TASK>
[ 102.245763] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 102.245771] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 102.245776] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 102.245782] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 102.245786] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 102.245789] [ T1842] ? kasan_save_track+0x14/0x30
[ 102.245793] [ T1842] ? kfree+0x1d6/0x620
[ 102.245796] [ T1842] kobject_add_internal+0x26f/0x800
[ 102.245802] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245805] [ T1842] kobject_add+0x139/0x1a0
[ 102.245808] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 102.245812] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 102.245816] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 102.245819] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 102.245823] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 102.245826] [ T1842] elevator_change_done+0x26f/0x690
[ 102.245831] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 102.245834] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 102.245839] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245843] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245846] [ T1842] elevator_change+0x283/0x4f0
[ 102.245850] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245853] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 102.245856] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 102.245860] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 102.245865] [ T1842] ? lock_acquire+0x126/0x140
[ 102.245869] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245872] [ T1842] queue_attr_store+0x23f/0x360
[ 102.245876] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 102.245879] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 102.245882] [ T1842] ? lock_release+0xfa/0x120
[ 102.245885] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 102.245889] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 102.245893] [ T1842] ? lock_acquire+0x126/0x140
[ 102.245896] [ T1842] ? lock_acquire+0x126/0x140
[ 102.245900] [ T1842] ? lock_release+0xfa/0x120
[ 102.245903] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 102.245906] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 102.245910] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.245913] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 102.245917] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 102.245919] [ T1842] vfs_write+0x524/0x1010
[ 102.245922] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 102.245926] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 102.245930] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 102.245936] [ T1842] ? count_memcg_events+0x37f/0x480
[ 102.245941] [ T1842] ksys_write+0xff/0x200
[ 102.245944] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 102.245947] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 102.245951] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 102.245957] [ T1842] do_syscall_64+0xf4/0x660
[ 102.245961] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 102.245964] [ T1842] ? irqentry_exit+0xb0/0x810
[ 102.245967] [ T1842] ? do_syscall_64+0x34/0x660
[ 102.245970] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 102.245973] [ T1842] ? irqentry_exit+0xb5/0x810
[ 102.245975] [ T1842] ? do_syscall_64+0xab/0x660
[ 102.245979] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 102.245982] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 102.245985] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 102.245987] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 102.245991] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 102.245993] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 102.245995] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 102.245997] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 102.245998] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec53929c0
[ 102.246003] [ T1842] </TASK>
[ 102.246009] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 102.718245] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 102.728223] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 102.728230] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 102.728231] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 102.728233] [ T1842] Call Trace:
[ 102.728235] [ T1842] <TASK>
[ 102.728237] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 102.728246] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 102.728251] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 102.728259] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 102.728263] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 102.728267] [ T1842] ? kfree+0x1d6/0x620
[ 102.728272] [ T1842] kobject_add_internal+0x26f/0x800
[ 102.728278] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728282] [ T1842] kobject_add+0x139/0x1a0
[ 102.728285] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 102.728289] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 102.728293] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 102.728296] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 102.728301] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 102.728304] [ T1842] elevator_change_done+0x26f/0x690
[ 102.728310] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 102.728313] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 102.728319] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728322] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728325] [ T1842] elevator_change+0x283/0x4f0
[ 102.728329] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728332] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 102.728336] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 102.728340] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 102.728345] [ T1842] ? lock_acquire+0x126/0x140
[ 102.728350] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728353] [ T1842] queue_attr_store+0x23f/0x360
[ 102.728358] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 102.728361] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 102.728363] [ T1842] ? lock_release+0xfa/0x120
[ 102.728367] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 102.728371] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 102.728375] [ T1842] ? lock_acquire+0x126/0x140
[ 102.728379] [ T1842] ? lock_acquire+0x126/0x140
[ 102.728382] [ T1842] ? lock_release+0xfa/0x120
[ 102.728386] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 102.728389] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 102.728393] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 102.728395] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 102.728399] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 102.728402] [ T1842] vfs_write+0x524/0x1010
[ 102.728406] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 102.728409] [ T1842] ? filp_close+0x25/0x40
[ 102.728415] [ T1842] ? do_syscall_64+0x1b9/0x660
[ 102.728420] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 102.728425] [ T1842] ksys_write+0xff/0x200
[ 102.728428] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 102.728430] [ T1842] ? lock_release+0xfa/0x120
[ 102.728434] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 102.728437] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 102.728441] [ T1842] do_syscall_64+0xf4/0x660
[ 102.728445] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 102.728450] [ T1842] ? do_syscall_64+0x1d7/0x660
[ 102.728453] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 102.728457] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 102.728459] [ T1842] ? __pfx_locks_remove_posix+0x10/0x10
[ 102.728465] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 102.728469] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 102.728477] [ T1842] ? count_memcg_events+0x37f/0x480
[ 102.728483] [ T1842] ? lock_release+0xfa/0x120
[ 102.728486] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 102.728489] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 102.728493] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 102.728497] [ T1842] ? lock_release+0xfa/0x120
[ 102.728501] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 102.728504] [ T1842] ? irqentry_exit+0xb0/0x810
[ 102.728507] [ T1842] ? do_syscall_64+0x34/0x660
[ 102.728510] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 102.728513] [ T1842] ? irqentry_exit+0xb5/0x810
[ 102.728515] [ T1842] ? do_syscall_64+0xab/0x660
[ 102.728519] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 102.728521] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 102.728525] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 102.728528] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 102.728532] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 102.728534] [ T1842] RDX: 000000000000000c RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 102.728536] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 102.728537] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000c
[ 102.728539] [ T1842] R13: 000000000000000c R14: 0000562ec532aa50 R15: 0000562ec5397300
[ 102.728544] [ T1842] </TASK>
[ 102.728549] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 103.292307] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 103.302399] [ T1842] CPU: 7 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 103.302408] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 103.302410] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 103.302422] [ T1842] Call Trace:
[ 103.302446] [ T1842] <TASK>
[ 103.302489] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 103.302728] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 103.302816] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 103.302990] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 103.303077] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 103.303124] [ T1842] ? kasan_save_track+0x14/0x30
[ 103.303129] [ T1842] ? kfree+0x1d6/0x620
[ 103.303135] [ T1842] kobject_add_internal+0x26f/0x800
[ 103.303258] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.303324] [ T1842] kobject_add+0x139/0x1a0
[ 103.303389] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 103.303476] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 103.303563] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 103.303629] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 103.303716] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 103.303782] [ T1842] elevator_change_done+0x26f/0x690
[ 103.303912] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 103.303978] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 103.304088] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.304114] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.304131] [ T1842] elevator_change+0x283/0x4f0
[ 103.304218] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.304262] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 103.304306] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 103.304349] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 103.304396] [ T1842] ? lock_acquire+0x126/0x140
[ 103.304481] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.304546] [ T1842] queue_attr_store+0x23f/0x360
[ 103.304612] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 103.304678] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 103.304699] [ T1842] ? lock_release+0xfa/0x120
[ 103.304785] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 103.304851] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 103.304960] [ T1842] ? lock_acquire+0x126/0x140
[ 103.305005] [ T1842] ? lock_acquire+0x126/0x140
[ 103.305091] [ T1842] ? lock_release+0xfa/0x120
[ 103.305117] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 103.305123] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 103.305129] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 103.305146] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 103.305211] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 103.305255] [ T1842] vfs_write+0x524/0x1010
[ 103.305279] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 103.305322] [ T1842] ? __pfx_pte_val+0x10/0x10
[ 103.305430] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 103.305539] [ T1842] ? __pfx_ptep_set_access_flags+0x10/0x10
[ 103.305649] [ T1842] ksys_write+0xff/0x200
[ 103.305715] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 103.305760] [ T1842] do_syscall_64+0xf4/0x660
[ 103.305802] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 103.305910] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 103.305934] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 103.305975] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 103.306106] [ T1842] ? count_memcg_events+0x37f/0x480
[ 103.306115] [ T1842] ? lock_release+0xfa/0x120
[ 103.306194] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 103.306260] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 103.306326] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 103.306434] [ T1842] ? lock_release+0xfa/0x120
[ 103.306478] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 103.306547] [ T1842] ? irqentry_exit+0xb0/0x810
[ 103.306609] [ T1842] ? do_syscall_64+0x34/0x660
[ 103.306674] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 103.306740] [ T1842] ? irqentry_exit+0xb5/0x810
[ 103.306783] [ T1842] ? do_syscall_64+0xab/0x660
[ 103.306870] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 103.306936] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 103.307023] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 103.307088] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 103.307114] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 103.307118] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 103.307133] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 103.307157] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 103.307179] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5395360
[ 103.307215] [ T1842] </TASK>
[ 104.197683] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 104.269345] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 104.279320] [ T1842] CPU: 3 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 104.279326] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 104.279327] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 104.279329] [ T1842] Call Trace:
[ 104.279331] [ T1842] <TASK>
[ 104.279333] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 104.279341] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 104.279346] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 104.279352] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 104.279356] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 104.279360] [ T1842] ? kasan_save_track+0x14/0x30
[ 104.279363] [ T1842] ? kfree+0x1d6/0x620
[ 104.279367] [ T1842] kobject_add_internal+0x26f/0x800
[ 104.279372] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279375] [ T1842] kobject_add+0x139/0x1a0
[ 104.279379] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 104.279383] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 104.279387] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 104.279390] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 104.279394] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 104.279397] [ T1842] elevator_change_done+0x26f/0x690
[ 104.279402] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 104.279404] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 104.279410] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279413] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279416] [ T1842] elevator_change+0x283/0x4f0
[ 104.279420] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279423] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 104.279427] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 104.279430] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 104.279435] [ T1842] ? lock_acquire+0x126/0x140
[ 104.279440] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279443] [ T1842] queue_attr_store+0x23f/0x360
[ 104.279446] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 104.279449] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 104.279452] [ T1842] ? lock_release+0xfa/0x120
[ 104.279456] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 104.279460] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 104.279464] [ T1842] ? lock_acquire+0x126/0x140
[ 104.279467] [ T1842] ? lock_acquire+0x126/0x140
[ 104.279471] [ T1842] ? lock_release+0xfa/0x120
[ 104.279474] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 104.279477] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 104.279481] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.279484] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 104.279487] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 104.279490] [ T1842] vfs_write+0x524/0x1010
[ 104.279494] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 104.279497] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 104.279501] [ T1842] ? ptep_set_access_flags+0xe5/0x130
[ 104.279505] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 104.279509] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 104.279511] [ T1842] ? lock_release+0xfa/0x120
[ 104.279515] [ T1842] ksys_write+0xff/0x200
[ 104.279518] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 104.279521] [ T1842] ? handle_pte_fault+0x54e/0x760
[ 104.279526] [ T1842] do_syscall_64+0xf4/0x660
[ 104.279530] [ T1842] ? __x64_sys_fcntl+0x10d/0x1c0
[ 104.279534] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 104.279538] [ T1842] ? trace_hardirqs_on_prepare+0x150/0x1a0
[ 104.279542] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 104.279546] [ T1842] ? kmem_cache_free+0x144/0x5f0
[ 104.279549] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 104.279556] [ T1842] ? count_memcg_events+0x37f/0x480
[ 104.279561] [ T1842] ? lock_release+0xfa/0x120
[ 104.279565] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 104.279568] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 104.279571] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 104.279576] [ T1842] ? lock_release+0xfa/0x120
[ 104.279579] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 104.279583] [ T1842] ? irqentry_exit+0xb0/0x810
[ 104.279585] [ T1842] ? do_syscall_64+0x34/0x660
[ 104.279588] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 104.279591] [ T1842] ? irqentry_exit+0xb5/0x810
[ 104.279593] [ T1842] ? do_syscall_64+0xab/0x660
[ 104.279597] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 104.279599] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 104.279603] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 104.279605] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 104.279609] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 104.279611] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 104.279613] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 104.279614] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 104.279616] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5395470
[ 104.279621] [ T1842] </TASK>
[ 104.279626] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 104.808451] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 104.818469] [ T1842] CPU: 4 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 104.818479] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 104.818482] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 104.818485] [ T1842] Call Trace:
[ 104.818488] [ T1842] <TASK>
[ 104.818491] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 104.818502] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 104.818508] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 104.818514] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 104.818518] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 104.818522] [ T1842] ? kasan_save_track+0x14/0x30
[ 104.818525] [ T1842] ? kfree+0x1d6/0x620
[ 104.818528] [ T1842] kobject_add_internal+0x26f/0x800
[ 104.818534] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818537] [ T1842] kobject_add+0x139/0x1a0
[ 104.818540] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 104.818544] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 104.818548] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 104.818551] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 104.818555] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 104.818558] [ T1842] elevator_change_done+0x26f/0x690
[ 104.818563] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 104.818566] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 104.818572] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818575] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818578] [ T1842] elevator_change+0x283/0x4f0
[ 104.818582] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818585] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 104.818589] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 104.818592] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 104.818597] [ T1842] ? lock_acquire+0x126/0x140
[ 104.818602] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818605] [ T1842] queue_attr_store+0x23f/0x360
[ 104.818609] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 104.818612] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 104.818614] [ T1842] ? lock_release+0xfa/0x120
[ 104.818618] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 104.818622] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 104.818626] [ T1842] ? lock_acquire+0x126/0x140
[ 104.818629] [ T1842] ? lock_acquire+0x126/0x140
[ 104.818633] [ T1842] ? lock_release+0xfa/0x120
[ 104.818636] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 104.818639] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 104.818643] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 104.818646] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 104.818649] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 104.818652] [ T1842] vfs_write+0x524/0x1010
[ 104.818656] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 104.818660] [ T1842] ? __pfx_pmd_val+0x10/0x10
[ 104.818664] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 104.818669] [ T1842] ksys_write+0xff/0x200
[ 104.818672] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 104.818675] [ T1842] ? count_memcg_events+0x37f/0x480
[ 104.818679] [ T1842] do_syscall_64+0xf4/0x660
[ 104.818684] [ T1842] ? lock_release+0xfa/0x120
[ 104.818688] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 104.818690] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 104.818694] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 104.818699] [ T1842] ? lock_release+0xfa/0x120
[ 104.818702] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 104.818706] [ T1842] ? irqentry_exit+0xb0/0x810
[ 104.818708] [ T1842] ? do_syscall_64+0x34/0x660
[ 104.818712] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 104.818715] [ T1842] ? irqentry_exit+0xb5/0x810
[ 104.818717] [ T1842] ? do_syscall_64+0xab/0x660
[ 104.818720] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 104.818723] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 104.818726] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 104.818729] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 104.818733] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 104.818735] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 104.818737] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 104.818739] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 104.818740] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec5397d90
[ 104.818745] [ T1842] </TASK>
[ 104.818750] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 105.300372] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 105.310342] [ T1842] CPU: 0 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 105.310349] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 105.310350] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 105.310352] [ T1842] Call Trace:
[ 105.310354] [ T1842] <TASK>
[ 105.310355] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 105.310364] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 105.310370] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 105.310376] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 105.310381] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 105.310384] [ T1842] ? kasan_save_track+0x14/0x30
[ 105.310388] [ T1842] ? kfree+0x1d6/0x620
[ 105.310392] [ T1842] kobject_add_internal+0x26f/0x800
[ 105.310398] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310401] [ T1842] kobject_add+0x139/0x1a0
[ 105.310405] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 105.310409] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 105.310413] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 105.310416] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 105.310420] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 105.310423] [ T1842] elevator_change_done+0x26f/0x690
[ 105.310429] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 105.310432] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 105.310438] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310442] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310444] [ T1842] elevator_change+0x283/0x4f0
[ 105.310448] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310451] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 105.310456] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 105.310459] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 105.310464] [ T1842] ? lock_acquire+0x126/0x140
[ 105.310469] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310472] [ T1842] queue_attr_store+0x23f/0x360
[ 105.310477] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 105.310480] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 105.310482] [ T1842] ? lock_release+0xfa/0x120
[ 105.310486] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 105.310490] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 105.310494] [ T1842] ? lock_acquire+0x126/0x140
[ 105.310497] [ T1842] ? lock_acquire+0x126/0x140
[ 105.310501] [ T1842] ? lock_release+0xfa/0x120
[ 105.310504] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 105.310508] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 105.310511] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.310514] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 105.310518] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 105.310521] [ T1842] vfs_write+0x524/0x1010
[ 105.310524] [ T1842] ? folio_xchg_last_cpupid+0xc6/0x130
[ 105.310529] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 105.310531] [ T1842] ? __pfx_folio_xchg_last_cpupid+0x10/0x10
[ 105.310536] [ T1842] ? do_raw_spin_unlock+0x59/0x230
[ 105.310539] [ T1842] ? do_wp_page+0x57e/0xf40
[ 105.310544] [ T1842] ksys_write+0xff/0x200
[ 105.310547] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 105.310550] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 105.310555] [ T1842] do_syscall_64+0xf4/0x660
[ 105.310560] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 105.310564] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 105.310572] [ T1842] ? count_memcg_events+0x37f/0x480
[ 105.310578] [ T1842] ? lock_release+0xfa/0x120
[ 105.310582] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 105.310585] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 105.310589] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 105.310595] [ T1842] ? lock_release+0xfa/0x120
[ 105.310599] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 105.310602] [ T1842] ? irqentry_exit+0xb0/0x810
[ 105.310605] [ T1842] ? do_syscall_64+0x34/0x660
[ 105.310608] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 105.310611] [ T1842] ? irqentry_exit+0xb5/0x810
[ 105.310613] [ T1842] ? do_syscall_64+0xab/0x660
[ 105.310617] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 105.310619] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 105.310623] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 105.310626] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 105.310629] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 105.310632] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 105.310633] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 105.310635] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 105.310636] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec53956a0
[ 105.310641] [ T1842] </TASK>
[ 105.310646] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[ 105.851457] [ T1842] sysfs: cannot create duplicate filename '/devices/virtual/block/nullb1/queue/iosched'
[ 105.861445] [ T1842] CPU: 4 UID: 0 PID: 1842 Comm: check Tainted: G B D W 7.1.0-kts+ #57 PREEMPT(lazy)
[ 105.861456] [ T1842] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN
[ 105.861458] [ T1842] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 105.861461] [ T1842] Call Trace:
[ 105.861464] [ T1842] <TASK>
[ 105.861467] [ T1842] dump_stack_lvl+0x6e/0xa0
[ 105.861479] [ T1842] sysfs_warn_dup.cold+0x17/0x24
[ 105.861484] [ T1842] sysfs_create_dir_ns+0x1fc/0x270
[ 105.861490] [ T1842] ? __pfx_sysfs_create_dir_ns+0x10/0x10
[ 105.861495] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 105.861499] [ T1842] ? kasan_save_track+0x14/0x30
[ 105.861502] [ T1842] ? kfree+0x1d6/0x620
[ 105.861506] [ T1842] kobject_add_internal+0x26f/0x800
[ 105.861511] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861514] [ T1842] kobject_add+0x139/0x1a0
[ 105.861517] [ T1842] ? __blk_mq_unfreeze_queue+0x24/0x1a0
[ 105.861521] [ T1842] ? __pfx_kobject_add+0x10/0x10
[ 105.861526] [ T1842] ? __mutex_unlock_slowpath+0x15d/0x860
[ 105.861528] [ T1842] ? do_raw_spin_lock+0x128/0x270
[ 105.861532] [ T1842] ? __mutex_lock+0x2bc/0x25a0
[ 105.861535] [ T1842] elevator_change_done+0x26f/0x690
[ 105.861540] [ T1842] ? __pfx_elevator_change_done+0x10/0x10
[ 105.861543] [ T1842] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 105.861549] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861552] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861555] [ T1842] elevator_change+0x283/0x4f0
[ 105.861559] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861562] [ T1842] elv_iosched_store+0x30c/0x3a0
[ 105.861566] [ T1842] ? __pfx_elv_iosched_store+0x10/0x10
[ 105.861569] [ T1842] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 105.861575] [ T1842] ? lock_acquire+0x126/0x140
[ 105.861579] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861582] [ T1842] queue_attr_store+0x23f/0x360
[ 105.861586] [ T1842] ? __mutex_lock+0x1536/0x25a0
[ 105.861589] [ T1842] ? __pfx_queue_attr_store+0x10/0x10
[ 105.861592] [ T1842] ? lock_release+0xfa/0x120
[ 105.861595] [ T1842] ? __pfx___mutex_lock+0x10/0x10
[ 105.861599] [ T1842] ? __pfx__copy_from_iter+0x10/0x10
[ 105.861603] [ T1842] ? lock_acquire+0x126/0x140
[ 105.861606] [ T1842] ? lock_acquire+0x126/0x140
[ 105.861610] [ T1842] ? lock_release+0xfa/0x120
[ 105.861613] [ T1842] ? sysfs_file_kobj+0xb9/0x1b0
[ 105.861617] [ T1842] ? sysfs_kf_write+0x65/0x170
[ 105.861621] [ T1842] ? __pfx_sysfs_kf_write+0x10/0x10
[ 105.861623] [ T1842] kernfs_fop_write_iter+0x3da/0x5e0
[ 105.861627] [ T1842] ? __pfx_kernfs_fop_write_iter+0x10/0x10
[ 105.861630] [ T1842] vfs_write+0x524/0x1010
[ 105.861634] [ T1842] ? lock_release+0xfa/0x120
[ 105.861637] [ T1842] ? __pfx_vfs_write+0x10/0x10
[ 105.861639] [ T1842] ? wp_page_reuse+0x160/0x1e0
[ 105.861644] [ T1842] ? do_wp_page+0x57e/0xf40
[ 105.861649] [ T1842] ? __pfx_handle_pte_fault+0x10/0x10
[ 105.861653] [ T1842] ksys_write+0xff/0x200
[ 105.861656] [ T1842] ? __pfx_ksys_write+0x10/0x10
[ 105.861659] [ T1842] ? __handle_mm_fault+0xa02/0xef0
[ 105.861663] [ T1842] do_syscall_64+0xf4/0x660
[ 105.861667] [ T1842] ? __pfx___css_rstat_updated+0x10/0x10
[ 105.861674] [ T1842] ? count_memcg_events+0x37f/0x480
[ 105.861679] [ T1842] ? lock_release+0xfa/0x120
[ 105.861683] [ T1842] ? rcu_read_unlock+0x1c/0x60
[ 105.861685] [ T1842] ? handle_mm_fault+0x4d1/0x7d0
[ 105.861689] [ T1842] ? do_user_addr_fault+0x15d/0xed0
[ 105.861694] [ T1842] ? lock_release+0xfa/0x120
[ 105.861698] [ T1842] ? do_user_addr_fault+0x811/0xed0
[ 105.861701] [ T1842] ? irqentry_exit+0xb0/0x810
[ 105.861704] [ T1842] ? do_syscall_64+0x34/0x660
[ 105.861707] [ T1842] ? trace_hardirqs_on+0x19/0x1a0
[ 105.861710] [ T1842] ? irqentry_exit+0xb5/0x810
[ 105.861712] [ T1842] ? do_syscall_64+0xab/0x660
[ 105.861716] [ T1842] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 105.861719] [ T1842] RIP: 0033:0x7f96f4878bbe
[ 105.861722] [ T1842] Code: 4d 89 d8 e8 34 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 13 ff ff ff 0f 1f 00 f3 0f 1e fa
[ 105.861725] [ T1842] RSP: 002b:00007ffcb76ebbb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 105.861729] [ T1842] RAX: ffffffffffffffda RBX: 00007f96f49f45c0 RCX: 00007f96f4878bbe
[ 105.861732] [ T1842] RDX: 0000000000000006 RSI: 0000562ec532aa50 RDI: 0000000000000001
[ 105.861734] [ T1842] RBP: 00007ffcb76ebbc0 R08: 0000000000000000 R09: 0000000000000000
[ 105.861735] [ T1842] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000006
[ 105.861737] [ T1842] R13: 0000000000000006 R14: 0000562ec532aa50 R15: 0000562ec53972c0
[ 105.861742] [ T1842] </TASK>
[ 105.861748] [ T1842] kobject: kobject_add_internal failed for iosched with -EEXIST, don't try to register things with the same name in the same directory.
[4] dmesg during the sysytem boot
...
[ 14.387131] [ T117] ata7.00: Features: HIPM DIPM NCQ-sndrcv NCQ-prio
[ 14.387200] [ T129] sd 4:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 14.387319] [ T129] sd 4:0:0:0: [sda] Write Protect is off
[ 14.387370] [ T129] sd 4:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 14.387492] [ T129] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 14.387696] [ T129] sd 4:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[ 14.391829] [ T1] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 14.391835] [ T1] usb usb4: Product: xHCI Host Controller
[ 14.391837] [ T1] usb usb4: Manufacturer: Linux 7.1.0-kts+ xhci-hcd
[ 14.411827] [ T117] ata7.00: configured for UDMA/133
[ 14.417307] [ T1] usb usb4: SerialNumber: 0000:00:14.0
[ 14.417647] [ T129] ------------[ cut here ]------------
[ 14.417668] [ T129] WARNING: block/blk-mq-debugfs.c:621 at debugfs_create_files+0x162/0x210, CPU#7: kworker/u32:11/129
[ 14.417681] [ T129] Modules linked in:
[ 14.417694] [ T129] CPU: 7 UID: 0 PID: 129 Comm: kworker/u32:11 Not tainted 7.1.0-kts+ #57 PREEMPT(lazy)
[ 14.417698] [ T129] Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
[ 14.417701] [ T129] Workqueue: async async_run_entry_fn
[ 14.417708] [ T129] RIP: 0010:debugfs_create_files+0x162/0x210
[ 14.417713] [ T129] Code: 0f 85 aa 00 00 00 8b 15 e0 bc e1 03 85 d2 0f 84 0c ff ff ff 49 8d be 88 05 00 00 be ff ff ff ff e8 f3 ac a9 01 83 f8 01 75 02 <0f> 0b 48 b8 00 00 00 00 00 fc ff df 48 89 ea 83 e5 07 48 c1 ea 03
[ 14.417716] [ T129] RSP: 0000:ffff88811750f648 EFLAGS: 00010246
[ 14.417720] [ T129] RAX: 0000000000000001 RBX: ffffffffaaffa7e0 RCX: 0000000000000000
[ 14.417723] [ T129] RDX: 0000000000000001 RSI: ffff888119603418 RDI: ffff888116521060
[ 14.417726] [ T129] RBP: ffffffffacf3cc24 R08: 0000000000000001 R09: ffffed10200b2365
[ 14.417729] [ T129] R10: ffffed10200b2366 R11: 0000000000000001 R12: ffff888100591a70
[ 14.417731] [ T129] R13: ffff888119602e90 R14: ffff888119602e90 R15: ffff888101ff5818
[ 14.417734] [ T129] FS: 0000000000000000(0000) GS:ffff8887b01c8000(0000) knlGS:0000000000000000
[ 14.417737] [ T129] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 14.417740] [ T129] CR2: 0000000000000000 CR3: 00000004f909c001 CR4: 00000000001706f0
[ 14.417743] [ T129] Call Trace:
[ 14.417745] [ T129] <TASK>
[ 14.417751] [ T129] blk_mq_sched_reg_debugfs+0x8d/0x1a0
[ 14.417761] [ T129] elevator_change_done+0x329/0x690
[ 14.417771] [ T129] ? __pfx_elevator_change_done+0x10/0x10
[ 14.417776] [ T129] ? __lock_release.isra.0+0x59/0x170
[ 14.417789] [ T129] elevator_change+0x283/0x4f0
[ 14.417798] [ T129] elevator_set_default+0x236/0x2e0
[ 14.417804] [ T129] ? __pfx_elevator_set_default+0x10/0x10
[ 14.417815] [ T129] ? disk_register_independent_access_ranges+0x24f/0x310
[ 14.417825] [ T129] blk_register_queue+0x412/0x5b0
[ 14.417837] [ T129] __add_disk+0x5fd/0xd50
[ 14.417843] [ T129] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 14.417847] [ T129] ? find_held_lock+0x2b/0x80
[ 14.417853] [ T129] add_disk_fwnode+0x113/0x590
[ 14.417863] [ T129] sd_probe+0x8b5/0xf90
[ 14.417873] [ T129] call_driver_probe+0x64/0x1e0
[ 14.417880] [ T129] really_probe+0x194/0x740
[ 14.417889] [ T129] ? __pfx___device_attach_driver+0x10/0x10
[ 14.417893] [ T129] __driver_probe_device+0x1cb/0x400
[ 14.417900] [ T129] driver_probe_device+0x4a/0x120
[ 14.417906] [ T129] __device_attach_driver+0x156/0x2a0
[ 14.417913] [ T129] bus_for_each_drv+0x114/0x1a0
[ 14.417917] [ T129] ? mark_held_locks+0x40/0x70
[ 14.417922] [ T129] ? __pfx_bus_for_each_drv+0x10/0x10
[ 14.417927] [ T129] ? trace_hardirqs_on+0x19/0x1a0
[ 14.417933] [ T129] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 14.417942] [ T129] __device_attach_async_helper+0x19f/0x250
[ 14.417948] [ T129] ? __pfx___device_attach_async_helper+0x10/0x10
[ 14.417953] [ T129] ? seqcount_lockdep_reader_access+0x94/0xb0
[ 14.417961] [ T129] ? ktime_get+0x35/0x1b0
[ 14.417965] [ T129] ? ktime_get+0x35/0x1b0
[ 14.417972] [ T129] async_run_entry_fn+0x97/0x550
[ 14.417979] [ T129] process_one_work+0x8b7/0x1650
[ 14.417995] [ T129] ? __pfx_process_one_work+0x10/0x10
[ 14.418073] [ T129] ? lock_acquire.part.0+0xb8/0x230
[ 14.418083] [ T129] ? lock_is_held_type+0x9a/0x110
[ 14.418096] [ T129] worker_thread+0x60a/0xff0
[ 14.418110] [ T129] ? __pfx_worker_thread+0x10/0x10
[ 14.418114] [ T129] kthread+0x35d/0x460
[ 14.418119] [ T129] ? _raw_spin_unlock_irq+0x28/0x50
[ 14.418124] [ T129] ? __pfx_kthread+0x10/0x10
[ 14.418130] [ T129] ret_from_fork+0x55b/0x850
[ 14.418137] [ T129] ? __pfx_ret_from_fork+0x10/0x10
[ 14.418144] [ T129] ? __switch_to+0x474/0xd80
[ 14.418148] [ T129] ? __switch_to_asm+0x39/0x70
[ 14.418153] [ T129] ? __switch_to_asm+0x33/0x70
[ 14.418157] [ T129] ? __pfx_kthread+0x10/0x10
[ 14.418163] [ T129] ret_from_fork_asm+0x1a/0x30
[ 14.418179] [ T129] </TASK>
[ 14.418181] [ T129] irq event stamp: 4509
[ 14.418183] [ T129] hardirqs last enabled at (4515): [<ffffffffa7dd11d5>] console_trylock_spinning+0x1c5/0x1f0
[ 14.418188] [ T129] hardirqs last disabled at (4520): [<ffffffffa7dd1188>] console_trylock_spinning+0x178/0x1f0
[ 14.418193] [ T129] softirqs last enabled at (4028): [<ffffffffa7bc5b91>] handle_softirqs+0x5c1/0x8b0
[ 14.418198] [ T129] softirqs last disabled at (4023): [<ffffffffa7bc5fe2>] __irq_exit_rcu+0x152/0x280
[ 14.418203] [ T129] ---[ end trace 0000000000000000 ]---
[ 14.445938] [ T84] usb 1-1: New USB device found, idVendor=8087, idProduct=8002, bcdDevice= 0.05
[ 14.456687] [ T1] hub 4-0:1.0: USB hub found
[ 14.460399] [ T84] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 14.468534] [ T1] hub 4-0:1.0: 6 ports detected
[ 14.477755] [ T129] sda: sda1 sda2 sda3
[ 14.478903] [ T84] hub 1-1:1.0: USB hub found
[ 14.479235] [ T84] hub 1-1:1.0: 8 ports detected
[ 14.500815] [ T14] Freeing initrd memory: 58856K
[ 14.511419] [ T129] sd 4:0:0:0: [sda] Attached SCSI disk
[ 14.591054] [ T1] usbcore: registered new interface driver usbserial_generic
[ 14.624054] [ T133] usb 3-1: new high-speed USB device number 2 using ehci-pci
[ 14.630659] [ T1] usbserial: USB Serial support registered for generic
[ 14.642060] [ T82] usb 2-12: new high-speed USB device number 2 using xhci_hcd
[ 14.647384] [ T1] i8042: PNP: No PS/2 controller found.
[ 14.783710] [ T82] usb 2-12: New USB device found, idVendor=0557, idProduct=7000, bcdDevice= 0.00
[ 14.788031] [ T1] mousedev: PS/2 mouse device common for all mice
[ 14.791695] [ T82] usb 2-12: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 14.798401] [ T1] rtc_cmos PNP0B00:00: RTC can wake from S4
[ 14.806361] [ T82] hub 2-12:1.0: USB hub found
[ 14.809380] [ T1] rtc_cmos PNP0B00:00: registered as rtc0
[ 14.811778] [ T82] hub 2-12:1.0: 4 ports detected
[ 14.816589] [ T1] rtc_cmos PNP0B00:00: setting system clock to 2026-06-24T11:36:20 UTC (1782300980)
[ 14.875529] [ T133] usb 3-1: New USB device found, idVendor=8087, idProduct=800a, bcdDevice=
...
^ permalink raw reply
* Re: [PATCH 10/16] fs/buffer: Remove fs-layer decryption code
From: Jan Kara @ 2026-06-24 11:40 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-fscrypt, linux-fsdevel, linux-ext4, linux-f2fs-devel,
linux-block, Christoph Hellwig, Theodore Ts'o, Andreas Dilger,
Baokun Li, Jan Kara, Ojaswin Mujoo, Ritesh Harjani, Zhang Yi,
Jaegeuk Kim, Chao Yu
In-Reply-To: <20260624050334.124606-11-ebiggers@kernel.org>
On Tue 23-06-26 22:03:28, Eric Biggers wrote:
> Now that fscrypt's file contents en/decryption is always implemented
> using blk-crypto when the filesystem is block-based, the fs-layer
> decryption code in fs/buffer.c is unused code. Remove it.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Fine by me. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/buffer.c | 45 ++++++++-------------------------------------
> 1 file changed, 8 insertions(+), 37 deletions(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 9af5f061a1f8..21dd9596a941 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -334,82 +334,53 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
>
> still_busy:
> spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
> }
>
> -struct postprocess_bh_ctx {
> +struct verify_bh_ctx {
> struct work_struct work;
> struct buffer_head *bh;
> struct fsverity_info *vi;
> };
>
> static void verify_bh(struct work_struct *work)
> {
> - struct postprocess_bh_ctx *ctx =
> - container_of(work, struct postprocess_bh_ctx, work);
> + struct verify_bh_ctx *ctx =
> + container_of(work, struct verify_bh_ctx, work);
> struct buffer_head *bh = ctx->bh;
> bool valid;
>
> valid = fsverity_verify_blocks(ctx->vi, bh->b_folio, bh->b_size,
> bh_offset(bh));
> end_buffer_async_read(bh, valid);
> kfree(ctx);
> }
>
> -static void decrypt_bh(struct work_struct *work)
> -{
> - struct postprocess_bh_ctx *ctx =
> - container_of(work, struct postprocess_bh_ctx, work);
> - struct buffer_head *bh = ctx->bh;
> - int err;
> -
> - err = fscrypt_decrypt_pagecache_blocks(bh->b_folio, bh->b_size,
> - bh_offset(bh));
> - if (err == 0 && ctx->vi) {
> - /*
> - * We use different work queues for decryption and for verity
> - * because verity may require reading metadata pages that need
> - * decryption, and we shouldn't recurse to the same workqueue.
> - */
> - INIT_WORK(&ctx->work, verify_bh);
> - fsverity_enqueue_verify_work(&ctx->work);
> - return;
> - }
> - end_buffer_async_read(bh, err == 0);
> - kfree(ctx);
> -}
> -
> /*
> * I/O completion handler for block_read_full_folio() - folios
> * which come unlocked at the end of I/O.
> */
> static void bh_end_async_read(struct bio *bio)
> {
> struct buffer_head *bh;
> bool uptodate = bio_endio_bh(bio, &bh);
> struct inode *inode = bh->b_folio->mapping->host;
> - bool decrypt = fscrypt_inode_uses_fs_layer_crypto(inode);
> struct fsverity_info *vi = NULL;
>
> /* needed by ext4 */
> if (bh->b_folio->index < DIV_ROUND_UP(inode->i_size, PAGE_SIZE))
> vi = fsverity_get_info(inode);
>
> - /* Decrypt (with fscrypt) and/or verify (with fsverity) if needed. */
> - if (uptodate && (decrypt || vi)) {
> - struct postprocess_bh_ctx *ctx = kmalloc_obj(*ctx, GFP_ATOMIC);
> + /* Verify (with fsverity) if needed. */
> + if (vi && uptodate) {
> + struct verify_bh_ctx *ctx = kmalloc_obj(*ctx, GFP_ATOMIC);
>
> if (ctx) {
> ctx->bh = bh;
> ctx->vi = vi;
> - if (decrypt) {
> - INIT_WORK(&ctx->work, decrypt_bh);
> - fscrypt_enqueue_decrypt_work(&ctx->work);
> - } else {
> - INIT_WORK(&ctx->work, verify_bh);
> - fsverity_enqueue_verify_work(&ctx->work);
> - }
> + INIT_WORK(&ctx->work, verify_bh);
> + fsverity_enqueue_verify_work(&ctx->work);
> return;
> }
> uptodate = false;
> }
> end_buffer_async_read(bh, uptodate);
> --
> 2.54.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply
* Re: [PATCH 2/2] dm-raid1: don't fail the mirror for invalid I/O errors
From: Mikulas Patocka @ 2026-06-24 11:14 UTC (permalink / raw)
To: Keith Busch, Benjamin Marzinski
Cc: Keith Busch, dm-devel, linux-block, Dr. David Alan Gilbert,
Vjaceslavs Klimovs
In-Reply-To: <ajFyuoMqnvQm738z@kbusch-mbp>
Hi
This approach is OK, I will stage the patches when 7.2-rc1 comes out and
when I'll fork the dm git branches.
I suggest one change - it is kind of hacky when multiple I/O completion
callbacks write into io->orig_bio->bi_status concurrently - so it would be
better to not do it and maintain and return separate bit mask for
non-retryable errors.
For example:
static void complete_io(struct io *io)
{
unsigned long error_bits = io->error_bits;
unsigned long nonretryable_error_bits = io->nonretryable_error_bits;
io_notify_fn fn = io->callback;
void *context = io->context;
if (io->vma_invalidate_size)
invalidate_kernel_vmap_range(io->vma_invalidate_address,
io->vma_invalidate_size);
mempool_free(io, &io->client->pool);
fn(error_bits, nonretryable_error_bits, context);
}
static void dec_count(struct io *io, unsigned int region, blk_status_t error)
{
if (unlikely(error == BLK_STS_NOTSUPP) || unlikely(error == BLK_STS_INVAL))
set_bit(region, &io->nonretryable_error_bits);
else if (unlikely(error != BLK_STS_OK))
set_bit(region, &io->error_bits);
if (atomic_dec_and_test(&io->count))
complete_io(io);
}
Please send the updated patch that uses this approach.
BTW. I think that blk_path_error should also test for BLK_STS_INVAL and
return false, otherwise, dm-multipath would be suffering from this bug
too. Ben, could you test it?
Mikulas
On Tue, 16 Jun 2026, Keith Busch wrote:
> BLK_STS_INVAL indicates the I/O request itself was invalid (for example a
> misaligned direct I/O), not that the device has failed. dm-raid1 treated
> any read or write completion error as a device failure: it failed the
> mirror leg, retried on the alternatives - which fail identically - and
> eventually returned EIO while spuriously degrading the array.
>
> Since commit 5ff3f74e145a ("block: simplify direct io validity check") the
> direct I/O path no longer rejects misaligned buffers up front, so an
> invalid bio now reaches the lower block layers, which fail it with
> BLK_STS_INVAL. dm-io collapses the block status into a per-region error
> bit before invoking the completion callback, so record BLK_STS_INVAL on
> the originating bio and have the dm-raid1 read, write and end_io paths
> propagate it instead of failing the device.
>
> This mirrors the raid1/raid10 fix in commit f7b24c7b41f23
> ("md/raid1,raid10: don't fail devices for invalid IO errors") for the
> device-mapper mirror target.
>
> Fixes: 7eac33186957 ("iomap: simplify direct io validity check")
> Fixes: 5ff3f74e145a ("block: simplify direct io validity check")
> Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
> Reported-by: Vjaceslavs Klimovs <vklimovs@gmail.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> Resending patch 2/2 from a different machine. For some reason, only 1/2
> is getting through with git-send-email, so manually replying to the
> thread with the missing second patch.
>
> drivers/md/dm-io.c | 14 +++++++++++++-
> drivers/md/dm-raid1.c | 28 +++++++++++++++++++++++++++-
> 2 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
> index 28adfeb58f240..f382e9f9be059 100644
> --- a/drivers/md/dm-io.c
> +++ b/drivers/md/dm-io.c
> @@ -37,6 +37,7 @@ struct io {
> struct dm_io_client *client;
> io_notify_fn callback;
> void *context;
> + struct bio *orig_bio;
> void *vma_invalidate_address;
> unsigned long vma_invalidate_size;
> } __aligned(DM_IO_MAX_REGIONS);
> @@ -132,8 +133,18 @@ static void complete_io(struct io *io)
>
> static void dec_count(struct io *io, unsigned int region, blk_status_t error)
> {
> - if (error)
> + if (error) {
> set_bit(region, &io->error_bits);
> + /*
> + * BLK_STS_INVAL means the bio was not valid for the underlying
> + * device (e.g. a misaligned direct I/O), which is a caller error
> + * rather than a device failure. Record it on the original bio so
> + * bio-based targets can propagate it instead of treating it as a
> + * media error and failing the device.
> + */
> + if (error == BLK_STS_INVAL && io->orig_bio)
> + io->orig_bio->bi_status = error;
> + }
>
> if (atomic_dec_and_test(&io->count))
> complete_io(io);
> @@ -398,6 +409,7 @@ static void async_io(struct dm_io_client *client, unsigned int num_regions,
> io->client = client;
> io->callback = fn;
> io->context = context;
> + io->orig_bio = dp->orig_bio;
>
> io->vma_invalidate_address = dp->vma_invalidate_address;
> io->vma_invalidate_size = dp->vma_invalidate_size;
> diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
> index de5c00704e69c..022ad791c2957 100644
> --- a/drivers/md/dm-raid1.c
> +++ b/drivers/md/dm-raid1.c
> @@ -524,6 +524,17 @@ static void read_callback(unsigned long error, void *context)
> return;
> }
>
> + /*
> + * BLK_STS_INVAL means the bio was not valid for the underlying device,
> + * e.g. a misaligned direct I/O. That is a caller error, not a device
> + * failure, so propagate it rather than failing the mirror and retrying
> + * on the other legs, which would fail the same way.
> + */
> + if (bio->bi_status == BLK_STS_INVAL) {
> + bio_endio(bio);
> + return;
> + }
> +
> fail_mirror(m, DM_RAID1_READ_ERROR);
>
> if (likely(default_ok(m)) || mirror_available(m->ms, bio)) {
> @@ -622,6 +633,16 @@ static void write_callback(unsigned long error, void *context)
> return;
> }
>
> + /*
> + * BLK_STS_INVAL means the bio was not valid for the underlying device,
> + * e.g. a misaligned direct I/O. Propagate the error without degrading
> + * the array.
> + */
> + if (bio->bi_status == BLK_STS_INVAL) {
> + bio_endio(bio);
> + return;
> + }
> +
> /*
> * If the bio is discard, return an error, but do not
> * degrade the array.
> @@ -1262,7 +1283,12 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
> return DM_ENDIO_DONE;
> }
>
> - if (*error == BLK_STS_NOTSUPP)
> + /*
> + * BLK_STS_INVAL means the bio was not valid for the underlying device,
> + * e.g. a misaligned direct I/O. Propagate it rather than failing the
> + * mirror and retrying, which would fail the same way on every leg.
> + */
> + if (*error == BLK_STS_NOTSUPP || *error == BLK_STS_INVAL)
> goto out;
>
> if (bio->bi_opf & REQ_RAHEAD)
> --
> 2.52.0
>
>
^ permalink raw reply
* Re: [PATCH v2] block: serialize elevator changes for the same queue using a writer lock
From: Ming Lei @ 2026-06-24 9:44 UTC (permalink / raw)
To: Shin'ichiro Kawasaki; +Cc: linux-block, Jens Axboe, Nilay Shroff
In-Reply-To: <20260623013238.642052-1-shinichiro.kawasaki@wdc.com>
On Tue, Jun 23, 2026 at 10:32:38AM +0900, Shin'ichiro Kawasaki wrote:
> When elevator_change() is called concurrently for the same queue, the
> elevator_change_done() function runs concurrently as well. This function
> adds or deletes kobjects for the debugfs entry of the queue. Then the
> concurrent calls cause memory corruption of the kobjects and result in a
> process hang. The core part of the elevator switch is protected by queue
> freeze and q->elevator_lock. However, since the commit 559dc11143eb
> ("block: move elv_register[unregister]_queue out of elevator_lock"), the
> elevator_change_done() is not serialized. Hence the memory corruption
> and the hang.
>
> The failures are observed when udev-worker writes to a sysfs
> queue/scheduler attribute file while the blktests test case block/005
> writes to the same attribute file. The failure also can be recreated by
> running two processes that write to the same queue/scheduler file
> concurrently. The failure is observed since another commit 370ac285f23a
> ("block: avoid cpu_hotplug_lock depedency on freeze_lock"). This commit
> changed the behavior of queue freeze and it unveiled the failure.
>
> Fix the failure by changing elv_iosched_store() to acquire
> update_nr_hwq_lock as the writer lock instead of the reader lock. This
> serializes the whole elevator switch steps, including the
> elevator_change_done() call.
>
> Fixes: 559dc11143eb ("block: move elv_register[unregister]_queue out of elevator_lock")
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> ---
> I observed that the blktests test case block/005 hung on a specific
> server hardware using a specific HDD as a block device. During the test
> case run, the kernel reported KASAN null-ptr-deref and slab-use-after-
> free errors. The failure happened when a sysfs queue/scheduler attribute
> file is written concurrently. I reported the failure and shared a
> candidate fix patch as RFC [1]. Based on the comments and discussion on
> the RFC patch, I propose this v2 patch that avoids introducing a new
> lock. My thanks go to Ming and Nilay for the discussion.
>
> Please refer to [1] for details of the failure. Also, I created a
> blktests test case that recreates the hang [2], which I used to test the
> fix.
>
> * Changes from RFC v1
> - Instead of adding a new mutex to struct request_queue, replace the
> reader lock on update_nr_hwq_lock with the writer lock in
> elv_iosched_store().
>
> [1] https://lore.kernel.org/linux-block/20260611074200.474676-1-shinichiro.kawasaki@wdc.com/
> [2] https://github.com/kawasaki/blktests/commit/8e80b3ccc0bbbe3f209d00eacd138d020de97fc6
>
> block/elevator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/elevator.c b/block/elevator.c
> index 3bcd37c2aa34..b03185a217ff 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -813,7 +813,7 @@ ssize_t elv_iosched_store(struct gendisk *disk, const char *buf,
> * update_nr_hwq_lock -> kn->active (via del_gendisk -> kobject_del)
> * kn->active -> update_nr_hwq_lock (via this sysfs write path)
> */
> - if (!down_read_trylock(&set->update_nr_hwq_lock)) {
> + if (!down_write_trylock(&set->update_nr_hwq_lock)) {
> ret = -EBUSY;
> goto out;
> }
> @@ -824,7 +824,7 @@ ssize_t elv_iosched_store(struct gendisk *disk, const char *buf,
> } else {
> ret = -ENOENT;
> }
> - up_read(&set->update_nr_hwq_lock);
> + up_write(&set->update_nr_hwq_lock);
I feel this is still abuse of the above lock, which serves writer vs
reader wrt. updating hw queue.
How about the following fix?
diff --git a/block/elevator.c b/block/elevator.c
index 3bcd37c2aa34..0375eb77646e 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -627,8 +627,10 @@ static void elv_exit_and_release(struct elv_change_ctx *ctx,
static int elevator_change_done(struct request_queue *q,
struct elv_change_ctx *ctx)
{
+ bool exit_and_release = false;
int ret = 0;
+ mutex_lock(&q->elevator_lock);
if (ctx->old) {
struct elevator_resources res = {
.et = ctx->old->et,
@@ -640,10 +642,24 @@ static int elevator_change_done(struct request_queue *q,
kobject_put(&ctx->old->kobj);
}
if (ctx->new) {
+ if (ctx->new != q->elevator) {
+ ret = -EBUSY;
+ goto unlock;
+ }
ret = elv_register_queue(q, ctx->new, !ctx->no_uevent);
+ /*
+ * Tear down the failed elevator after dropping elevator_lock:
+ * elv_exit_and_release() freezes the queue and re-acquires
+ * elevator_lock itself, so it must not be called nested here.
+ */
if (ret)
- elv_exit_and_release(ctx, q);
+ exit_and_release = true;
}
+unlock:
+ mutex_unlock(&q->elevator_lock);
+
+ if (exit_and_release)
+ elv_exit_and_release(ctx, q);
return ret;
}
Thanks,
Ming
^ permalink raw reply related
* [PATCH 2/2] block: handle REQ_OP_ZONE_APPEND in __bio_integrity_action
From: Christoph Hellwig @ 2026-06-24 8:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Caleb Sander Mateos, Martin K. Petersen, linux-block
In-Reply-To: <20260624080014.1998650-1-hch@lst.de>
Otherwise zone append commands will miss their integrity data. While
this works "fine" for auto-PI, it break file system PI and non-PI
metadata.
With this XFS on ZNS namespace with non-PI metadata and 512 byte sectors
with PI work, while PI 4k sector formats with PI work only when Caleb's
"block: fix integrity offset/length conversions" is applied as well.
Note that unlike regular writes, zone append does need remapping as
partitions are not supported on zoned block devices.
Fixes: df3c485e0e60 ("block: switch on bio operation in bio_integrity_prep")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/bio-integrity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index a53b38cf8a1a..b23e2434d80c 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -38,6 +38,7 @@ unsigned int __bio_integrity_action(struct bio *bio)
}
return BI_ACT_BUFFER | BI_ACT_CHECK;
case REQ_OP_WRITE:
+ case REQ_OP_ZONE_APPEND:
/*
* Flush masquerading as write?
*/
--
2.53.0
^ permalink raw reply related
* [PATCH 1/2] block: fix GFP_ flags confusion in bio_integrity_alloc_buf
From: Christoph Hellwig @ 2026-06-24 8:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Caleb Sander Mateos, Martin K. Petersen, linux-block
In-Reply-To: <20260624080014.1998650-1-hch@lst.de>
bio_integrity_alloc_buf usage of GFP_ flags is messed up. For one it
mixes GFP_NOFS and GFP_NOIO for neighbouring allocations, but it also
makes the allocations fail more often than needed. That code was copied
from bio_alloc_bioset which needs to do that so that it can punt to the
rescuer workqueue, but none of that is needed for the integrity
allocations that either sits in the file system or at the very bottom
of the I/O stack. Failing early means we'll do a fully waiting
allocation from the mempool ->alloc callback which is usually much
larger than required.
Fix this by passing a gfp_t so that the file system path can pass
GFP_NOFS and the auto-integrity code can pass GFP_NOIO, and don't
modify the allocation type except for disabling warnings.
Fixes: ec7f31b2a2d3 ("block: make bio auto-integrity deadlock safe")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/bio-integrity-auto.c | 2 +-
block/bio-integrity-fs.c | 4 ++--
block/bio-integrity.c | 8 +++-----
include/linux/bio-integrity.h | 2 +-
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c
index 353eed632fcc..b1c733ecfd2e 100644
--- a/block/bio-integrity-auto.c
+++ b/block/bio-integrity-auto.c
@@ -94,7 +94,7 @@ void bio_integrity_prep(struct bio *bio, unsigned int action)
bio_integrity_init(bio, &bid->bip, &bid->bvec, 1);
bid->bio = bio;
bid->bip.bip_flags |= BIP_BLOCK_INTEGRITY;
- bio_integrity_alloc_buf(bio, action & BI_ACT_ZERO);
+ bio_integrity_alloc_buf(bio, GFP_NOIO, action & BI_ACT_ZERO);
if (action & BI_ACT_CHECK)
bio_integrity_setup_default(bio);
diff --git a/block/bio-integrity-fs.c b/block/bio-integrity-fs.c
index 0daa42d9ead7..9c5fe5fa8f0d 100644
--- a/block/bio-integrity-fs.c
+++ b/block/bio-integrity-fs.c
@@ -23,10 +23,10 @@ unsigned int fs_bio_integrity_alloc(struct bio *bio)
if (!action)
return 0;
- iib = mempool_alloc(&fs_bio_integrity_pool, GFP_NOIO);
+ iib = mempool_alloc(&fs_bio_integrity_pool, GFP_NOFS);
bio_integrity_init(bio, &iib->bip, &iib->bvec, 1);
- bio_integrity_alloc_buf(bio, action & BI_ACT_ZERO);
+ bio_integrity_alloc_buf(bio, GFP_NOFS, action & BI_ACT_ZERO);
if (action & BI_ACT_CHECK)
bio_integrity_setup_default(bio);
return action;
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index e796de1a749e..a53b38cf8a1a 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -64,20 +64,18 @@ unsigned int __bio_integrity_action(struct bio *bio)
}
EXPORT_SYMBOL_GPL(__bio_integrity_action);
-void bio_integrity_alloc_buf(struct bio *bio, bool zero_buffer)
+void bio_integrity_alloc_buf(struct bio *bio, gfp_t gfp, bool zero_buffer)
{
struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
struct bio_integrity_payload *bip = bio_integrity(bio);
unsigned int len = bio_integrity_bytes(bi, bio_sectors(bio));
- gfp_t gfp = GFP_NOIO | (zero_buffer ? __GFP_ZERO : 0);
void *buf;
- buf = kmalloc(len, (gfp & ~__GFP_DIRECT_RECLAIM) |
- __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN);
+ buf = kmalloc(len, gfp | __GFP_NOWARN | (zero_buffer ? __GFP_ZERO : 0));
if (unlikely(!buf)) {
struct page *page;
- page = mempool_alloc(&integrity_buf_pool, GFP_NOFS);
+ page = mempool_alloc(&integrity_buf_pool, gfp);
if (zero_buffer)
memset(page_address(page), 0, len);
bvec_set_page(&bip->bip_vec[0], page, len, 0);
diff --git a/include/linux/bio-integrity.h b/include/linux/bio-integrity.h
index af5178434ec6..c3dda32fd803 100644
--- a/include/linux/bio-integrity.h
+++ b/include/linux/bio-integrity.h
@@ -141,7 +141,7 @@ static inline int bio_integrity_add_page(struct bio *bio, struct page *page,
}
#endif /* CONFIG_BLK_DEV_INTEGRITY */
-void bio_integrity_alloc_buf(struct bio *bio, bool zero_buffer);
+void bio_integrity_alloc_buf(struct bio *bio, gfp_t gfp, bool zero_buffer);
void bio_integrity_free_buf(struct bio_integrity_payload *bip);
void bio_integrity_setup_default(struct bio *bio);
--
2.53.0
^ permalink raw reply related
* PI fixes v2
From: Christoph Hellwig @ 2026-06-24 8:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Caleb Sander Mateos, Martin K. Petersen, linux-block
Hi all,
this series has two unrelated PI/metadata fixes that came up
during a little testing surge.
Changes since v1:
- take operator precedence into account so that zeroing doesn't disable
other GFP_ flags.
- add a commit log blurb on why Zone Append does not require remapping
Diffstat:
block/bio-integrity-auto.c | 2 +-
block/bio-integrity-fs.c | 4 ++--
block/bio-integrity.c | 9 ++++-----
include/linux/bio-integrity.h | 2 +-
4 files changed, 8 insertions(+), 9 deletions(-)
^ permalink raw reply
* Re: [PATCHv2 6/6] block: validate user space vectors during extraction
From: Christoph Hellwig @ 2026-06-24 7:39 UTC (permalink / raw)
To: Keith Busch
Cc: Christoph Hellwig, Keith Busch, linux-block, linux-fsdevel,
dm-devel, axboe, brauner, djwong, viro, stable
In-Reply-To: <ajqxoeZ0R_RwqEKe@kbusch-mbp>
On Tue, Jun 23, 2026 at 10:17:37AM -0600, Keith Busch wrote:
> Exactly, the in-kernel users of ITER_BVEC that allocate their own
> buffers are, as far as I know, aligned already. Fabric storage targets
> like nvme allocate their own SGLs on page boundaries so the bio is
> aligned at the point it was constructed.
>
> The ones that forward user buffers like loop and zloop are addressed in
> the previous two patches. They generally should have been fine for most
> hardware without those updates, but they're included in case a backing
> device has more restrictive constraints than 512b "sector_t" aligned.
>
> The only other user space provided alignment that I think may trip this
> up is the io_uring registered buffer, so that's what I'm trying to call
> out here.
Sounds reasonable, but it would be really helpful to have this in
the API documentation somewhere..
Talking about documented APIs and related bits: do you still plan
to get back to exposing our pre-vector alignment requirements and
add tests to blktests/xfstests based on that?
^ permalink raw reply
* [PATCH] loop: serialize backing file swaps with sysfs readers
From: Cen Zhang @ 2026-06-24 7:18 UTC (permalink / raw)
To: Jens Axboe, Kay Sievers
Cc: linux-block, linux-kernel, baijiaju1990, zzzccc427
The backing_file sysfs attribute formats lo->lo_backing_file while holding
lo_lock, but LOOP_CHANGE_FD replaced lo_backing_file without that lock.
The old file can then be fput() after the swap, and that fput may be the
last reference. This leaves a sysfs reader that observed the old pointer
able to run file_path() on a file whose final put is underway.
Validation reproduced this kernel report:
BUG: KCSAN: data-race in lo_ioctl / loop_attr_do_show_backing_file
The buggy scenario involves two paths, with each column showing the order
within that path:
sysfs backing_file show: LOOP_CHANGE_FD:
1. Take lo_lock. 1. Save old_file from lo_backing_file.
2. Read lo_backing_file. 2. Store the replacement file pointer.
3. Pass it to file_path(). 3. Drop the loop-owned old_file ref.
Serialize loop_assign_backing_file()'s pointer store with lo_lock, the
same lock used by the sysfs show path and by __loop_clr_fd(). This keeps a
sysfs reader that entered before the swap ordered before the old file can
be detached and fput(), and makes readers entering after the swap see the
new file.
Validation reproduced this kernel report:
[ 56.673265] BUG: KCSAN: data-race in lo_ioctl / loop_attr_do_show_backing_file
[ 56.674430] write to 0xffff888101d21060 of 8 bytes by task 498 on cpu 1:
[ 56.675365] lo_ioctl+0x99d/0xca0
[ 56.675819] blkdev_ioctl+0x2bc/0x380
[ 56.676331] __x64_sys_ioctl+0xc7/0x110
[ 56.676846] x64_sys_call+0x1092/0x1fb0
[ 56.677372] do_syscall_64+0x100/0x570
[ 56.677878] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 56.678777] read to 0xffff888101d21060 of 8 bytes by task 489 on cpu 2:
[ 56.679617] loop_attr_do_show_backing_file+0x51/0xe0
[ 56.680280] dev_attr_show+0x3b/0x90
[ 56.680769] sysfs_kf_seq_show+0x139/0x1e0
[ 56.681321] kernfs_seq_show+0x9c/0xb0
[ 56.681823] seq_read_iter+0x2b3/0x830
[ 56.682336] kernfs_fop_read_iter+0x26b/0x2d0
[ 56.682917] vfs_read+0x414/0x5c0
[ 56.683393] ksys_read+0xa3/0x130
[ 56.683844] __x64_sys_read+0x41/0x50
[ 56.684344] x64_sys_call+0x1efb/0x1fb0
[ 56.684856] do_syscall_64+0x100/0x570
[ 56.685364] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 56.686252] value changed: 0xffff888104d62900 -> 0xffff888104d53680
[ 56.687275] Reported by Kernel Concurrency Sanitizer on:
[ 56.687963] CPU: 2 UID: 0 PID: 489 Comm: loop_changefd_r Not tainted 7.1.0-02794-g5c7804e3279c #1 PREEMPT(lazy)
[ 56.689251] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 56.690673] ==================================================================
[ 62.334003] ==================================================================
[ 62.334986] BUG: KCSAN: data-race in lo_ioctl / loop_attr_do_show_backing_file
[ 62.336145] write to 0xffff888101d21060 of 8 bytes by task 498 on cpu 3:
[ 62.337000] lo_ioctl+0x99d/0xca0
[ 62.337452] blkdev_ioctl+0x2bc/0x380
[ 62.337955] __x64_sys_ioctl+0xc7/0x110
[ 62.338468] x64_sys_call+0x1092/0x1fb0
[ 62.338993] do_syscall_64+0x100/0x570
[ 62.339493] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 62.340381] read to 0xffff888101d21060 of 8 bytes by task 495 on cpu 0:
[ 62.341235] loop_attr_do_show_backing_file+0x51/0xe0
[ 62.341900] dev_attr_show+0x3b/0x90
[ 62.342385] sysfs_kf_seq_show+0x139/0x1e0
[ 62.342943] kernfs_seq_show+0x9c/0xb0
[ 62.343447] seq_read_iter+0x2b3/0x830
[ 62.343955] kernfs_fop_read_iter+0x26b/0x2d0
[ 62.344537] vfs_read+0x414/0x5c0
[ 62.344988] ksys_read+0xa3/0x130
[ 62.345438] __x64_sys_read+0x41/0x50
[ 62.345937] x64_sys_call+0x1efb/0x1fb0
[ 62.346446] do_syscall_64+0x100/0x570
[ 62.346956] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 62.347832] value changed: 0xffff888104d50f00 -> 0xffff888104cf4f00
[ 62.348871] Reported by Kernel Concurrency Sanitizer on:
[ 62.349548] CPU: 0 UID: 0 PID: 495 Comm: loop_changefd_r Not tainted 7.1.0-02794-g5c7804e3279c #1 PREEMPT(lazy)
[ 62.350823] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 62.352260] ==================================================================
[ 65.676721] ==================================================================
[ 65.677703] BUG: KCSAN: data-race in lo_ioctl / loop_attr_do_show_backing_file
[ 65.678870] write to 0xffff888101d21060 of 8 bytes by task 498 on cpu 0:
[ 65.679712] lo_ioctl+0x99d/0xca0
[ 65.680166] blkdev_ioctl+0x2bc/0x380
[ 65.680673] __x64_sys_ioctl+0xc7/0x110
[ 65.681187] x64_sys_call+0x1092/0x1fb0
[ 65.681707] do_syscall_64+0x100/0x570
[ 65.682214] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 65.683113] read to 0xffff888101d21060 of 8 bytes by task 497 on cpu 2:
[ 65.683955] loop_attr_do_show_backing_file+0x51/0xe0
[ 65.684617] dev_attr_show+0x3b/0x90
[ 65.685109] sysfs_kf_seq_show+0x139/0x1e0
[ 65.685663] kernfs_seq_show+0x9c/0xb0
[ 65.686165] seq_read_iter+0x2b3/0x830
[ 65.686679] kernfs_fop_read_iter+0x26b/0x2d0
[ 65.687265] vfs_read+0x414/0x5c0
[ 65.687720] ksys_read+0xa3/0x130
[ 65.688171] __x64_sys_read+0x41/0x50
[ 65.688665] x64_sys_call+0x1efb/0x1fb0
[ 65.689177] do_syscall_64+0x100/0x570
[ 65.689688] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 65.690582] value changed: 0xffff888100c52600 -> 0xffff888104d54180
[ 65.691615] Reported by Kernel Concurrency Sanitizer on:
[ 65.692309] CPU: 2 UID: 0 PID: 497 Comm: loop_changefd_r Not tainted 7.1.0-02794-g5c7804e3279c #1 PREEMPT(lazy)
[ 65.693596] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 65.695035] ==================================================================
[ 68.697953] ==================================================================
[ 68.698927] BUG: KCSAN: data-race in lo_ioctl / loop_attr_do_show_backing_file
[ 68.700101] write to 0xffff888101d21060 of 8 bytes by task 498 on cpu 1:
Fixes: 05eb0f252b04 ("loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
---
drivers/block/loop.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 310de0463beb..45937741fcb6 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -503,11 +503,18 @@ static int loop_validate_file(struct file *file, struct block_device *bdev)
static void loop_assign_backing_file(struct loop_device *lo, struct file *file)
{
+ /*
+ * Serialize the pointer update with sysfs backing_file show, which
+ * formats the file path under lo_lock without taking a file reference.
+ */
+ spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = file;
+ spin_unlock_irq(&lo->lo_lock);
+
lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
mapping_set_gfp_mask(file->f_mapping,
lo->old_gfp_mask & ~(__GFP_IO | __GFP_FS));
- if (lo->lo_backing_file->f_flags & O_DIRECT)
+ if (file->f_flags & O_DIRECT)
lo->lo_flags |= LO_FLAGS_DIRECT_IO;
lo->lo_min_dio_size = loop_query_min_dio_size(lo);
}
--
2.43.0
^ permalink raw reply related
* [PATCH blktests] README.md, check: require getconf
From: Shin'ichiro Kawasaki @ 2026-06-24 7:18 UTC (permalink / raw)
To: linux-block
Cc: Omar Sandoval, Chaitanya Kulkarni, Bart Van Assche, Jeff Moyer,
Shin'ichiro Kawasaki
Some test cases use the getconf command to query the page size that the
kernel supports (e.g. scsi/011, throtl/{002,003,007}, zbd/{010,014}).
Add getconf to the list of required commands so its absence is reported
clearly, and document it as a dependency in README.md.
Link: https://lore.kernel.org/linux-block/ajm1x0koQ4BftBOc@shinmob/
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
README.md | 1 +
check | 1 +
2 files changed, 2 insertions(+)
diff --git a/README.md b/README.md
index b137a43..b62540a 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,7 @@ The dependencies are minimal, but make sure you have them installed:
- fio
- gcc
- make
+- getconf
- systemd-udev (udevadm)
Some tests require the following:
diff --git a/check b/check
index a68049b..bc2dde9 100755
--- a/check
+++ b/check
@@ -1118,6 +1118,7 @@ _check_dependencies() {
required_commands_and_packages[blockdev]="util-linux"
required_commands_and_packages[fio]="fio"
required_commands_and_packages[udevadm]="systemd-udev"
+ required_commands_and_packages[getconf]="glibc-common or libc-bin"
for cmd in "${!required_commands_and_packages[@]}"; do
command -v "$cmd" &> /dev/null && continue
--
2.54.0
^ permalink raw reply related
* [PATCH] null_blk: cancel bw_timer on add-device error unwind
From: Cen Zhang @ 2026-06-24 7:18 UTC (permalink / raw)
To: Jens Axboe, Keith Busch, Johannes Thumshirn, Chaitanya Kulkarni,
Damien Le Moal, Genjian Zhang, Hans Holmberg, Nilay Shroff,
Kees Cook, Matthew Wilcox, Christophe JAILLET, Kyungchan Koh,
Shaohua Li
Cc: linux-block, linux-kernel, baijiaju1990, zzzccc427
null_blk starts the bandwidth hrtimer before the later add_disk/device_add
failure points. If setup fails after the timer is queued, the shared error
unwind frees struct nullb without draining bw_timer, so the callback can
run on freed owner state.
The buggy scenario involves two paths, with each column showing the order
within that path:
null_add_dev() error unwind: nullb_bwtimer_fn() callback path:
1. Start bw_timer for a throttled 1. The hrtimer expires after the free.
device. 2. nullb_bwtimer_fn() recovers the
2. Hit a later add_disk/device_add embedded owner.
failure. 3. The callback reads nullb->dev and
3. Free struct nullb. nullb->q.
4. Release the remaining queue and 4. The stale owner storage is used
disk resources. after free.
Cancel bw_timer in the shared error unwind before put_disk() and the
remaining frees. The normal delete path already uses the same
hrtimer_cancel() drain.
Validation reproduced this kernel report:
BUG: KASAN: slab-use-after-free in nullb_bwtimer_fn+0x13f/0x170 [null_blk]
Call Trace:
<IRQ>
dump_stack_lvl+0x66/0xa0
print_report+0xce/0x630
? nullb_bwtimer_fn+0x13f/0x170 [null_blk]
? srso_alias_return_thunk+0x5/0xfbef5
? __virt_addr_valid+0x20d/0x410
? nullb_bwtimer_fn+0x13f/0x170 [null_blk]
kasan_report+0xe0/0x110
? nullb_bwtimer_fn+0x13f/0x170 [null_blk]
? __pfx_nullb_bwtimer_fn+0x10/0x10 [null_blk]
nullb_bwtimer_fn+0x13f/0x170 [null_blk]
__hrtimer_run_queues+0x172/0x810
hrtimer_interrupt+0x377/0x7f0
__sysvec_apic_timer_interrupt+0xc3/0x390
sysvec_apic_timer_interrupt+0x67/0x80
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20
Allocated by task 529:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
__kasan_kmalloc+0xaa/0xb0
null_add_dev+0x4f9/0x1d10 [null_blk]
nullb_device_power_store+0x25f/0x320 [null_blk]
configfs_write_iter+0x2be/0x4a0
vfs_write+0x604/0x11f0
ksys_write+0xf9/0x1d0
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 529:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
kasan_save_free_info+0x3b/0x60
__kasan_slab_free+0x5f/0x80
kfree+0x307/0x580
null_add_dev+0x1272/0x1d10 [null_blk]
nullb_device_power_store+0x25f/0x320 [null_blk]
configfs_write_iter+0x2be/0x4a0
vfs_write+0x604/0x11f0
ksys_write+0xf9/0x1d0
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Fixes: eff2c4f10873 ("nullb: bandwidth control")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
---
drivers/block/null_blk/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index f8c0fd57e041..8f1ad76710a0 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -2062,6 +2062,8 @@ static int null_add_dev(struct nullb_device *dev)
out_ida_free:
ida_free(&nullb_indexes, nullb->index);
out_cleanup_disk:
+ if (test_bit(NULLB_DEV_FL_THROTTLED, &dev->flags))
+ hrtimer_cancel(&nullb->bw_timer);
put_disk(nullb->disk);
out_cleanup_zone:
null_free_zoned_dev(dev);
--
2.43.0
^ permalink raw reply related
* Re: [PATCH 0/8] blk-cgroup: remove queue_lock nesting from blkcg paths
From: yu kuai @ 2026-06-24 6:57 UTC (permalink / raw)
To: Yu Kuai, nilay, tom.leiming, bvanassche, tj, josef, axboe
Cc: akpm, chrisl, kasong, shikemeng, nphamcs, bhe, baohua,
youngjun.park, cgroups, linux-block, linux-kernel, linux-mm,
yukuai
In-Reply-To: <cover.1780621988.git.yukuai@fygo.io>
Friendly ping ...
This set can still be applied cleanly for block-7.2 branch.
在 2026/6/8 11:42, Yu Kuai 写道:
> From: Yu Kuai <yukuai@fygo.io>
>
> Hi,
>
> This series is the follow-up blk-cgroup locking cleanup on top of the
> earlier blkg-list protection fixes, and prepares blk-cgroup to stop using
> q->queue_lock as the global blkg lifetime/iteration lock.
>
> The current queue_lock based protection is hard to maintain because
> queue_lock is used from hardirq and softirq completion paths, while some
> blkcg cgroup file paths also need to iterate blkgs, print policy data, or
> create blkgs from RCU-protected contexts. This series first tightens the
> blkcg-side lifetime rules:
>
> - blkcg_print_stat() iterates blkgs under blkcg->lock with IRQs disabled.
> - policy data freeing is delayed past an RCU grace period.
> - blkcg_print_blkgs(), blkg lookup/create, bio association, page-IO
> association, blkg destruction, and BFQ initialization stop nesting
> queue_lock under RCU or blkcg->lock.
>
> Using blkcg->lock and RCU for blkcg-owned lists/data keeps the lock order
> local to blk-cgroup and avoids extending queue_lock into cgroup file
> iteration paths. It also makes the subsequent conversion to q->blkcg_mutex
> possible without carrying forward queue_lock's interrupt-context
> constraints.
>
> Yu Kuai (8):
> blk-cgroup: protect iterating blkgs with blkcg->lock in
> blkcg_print_stat()
> blk-cgroup: delay freeing policy data after rcu grace period
> blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs()
> blk-cgroup: don't nest queue_lock under rcu in blkg_lookup_create()
> blk-cgroup: don't nest queue_lock under rcu in bio_associate_blkg()
> blk-cgroup: don't nest queue_lock under blkcg->lock in
> blkcg_destroy_blkgs()
> mm/page_io: don't nest queue_lock under rcu in
> bio_associate_blkg_from_page()
> block, bfq: don't grab queue_lock to initialize bfq
>
> block/bfq-cgroup.c | 17 ++++-
> block/bfq-iosched.c | 5 --
> block/blk-cgroup-rwstat.c | 15 ++--
> block/blk-cgroup.c | 151 ++++++++++++++++++++++----------------
> block/blk-cgroup.h | 8 +-
> block/blk-iocost.c | 22 ++++--
> block/blk-iolatency.c | 10 ++-
> block/blk-throttle.c | 13 +++-
> mm/page_io.c | 7 +-
> 9 files changed, 158 insertions(+), 90 deletions(-)
>
>
> base-commit: b23df513de562739af61fa61ba80ef5e8059a636
--
Thanks,
Kuai
^ permalink raw reply
* Re: [PATCH 1/2] md/linear: add fault-tolerant mode for unraid-like setups
From: yu kuai @ 2026-06-24 6:55 UTC (permalink / raw)
To: Yu Kuai, Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel, yukuai
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
Hi,
Please ignore this patch, this patch is supposed only used downstream.
Ai somehow generate the cmd to send it together with the patchset:
blk-cgroup: fix blkg list and policy data races
Same for the other ext4 patch.
Sorry for the noise. :(
在 2026/6/24 14:46, Yu Kuai 写道:
> From: Yu Kuai<yukuai@fnnas.com>
>
> Add a module parameter 'fault_tolerant' that changes how md-linear
> handles disk failures. When enabled:
>
> - Disk failures are isolated instead of failing the entire array
> - I/O to failed disks returns -EIO while healthy disks continue
> - The array remains operational with reduced capacity
> - Failed disk count is tracked and shown in /proc/mdstat
>
> This enables unraid-like functionality where individual disk failures
> don't bring down the entire array, allowing continued access to data
> on healthy disks.
>
> The fault_tolerant parameter can be set at module load time or
> dynamically via /sys/module/md_linear/parameters/fault_tolerant.
>
> Signed-off-by: Yu Kuai<yukuai@fnnas.com>
> ---
> drivers/md/md-linear.c | 63 ++++++++++++++++++++++++++++++++++++------
> 1 file changed, 55 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
--
Thanks,
Kuai
^ permalink raw reply
* [PATCH v2 4/4] blk-cgroup: factor policy pd teardown loop into helper
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Zheng Qixing <zhengqixing@huawei.com>
Move the teardown sequence which offlines and frees per-policy
blkg_policy_data (pd) into a helper for readability.
No functional change intended.
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>
Signed-off-by: Yu Kuai <yukuai@fygo.io>
---
block/blk-cgroup.c | 57 ++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 30 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 2538d8105e6c..e5e95be4fbc0 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1526,10 +1526,35 @@ struct cgroup_subsys io_cgrp_subsys = {
.depends_on = 1 << memory_cgrp_id,
#endif
};
EXPORT_SYMBOL_GPL(io_cgrp_subsys);
+/*
+ * Tear down per-blkg policy data for @pol on @q.
+ */
+static void blkcg_policy_teardown_pds(struct request_queue *q,
+ const struct blkcg_policy *pol)
+{
+ struct blkcg_gq *blkg;
+
+ list_for_each_entry(blkg, &q->blkg_list, q_node) {
+ struct blkcg *blkcg = blkg->blkcg;
+ struct blkg_policy_data *pd;
+
+ spin_lock(&blkcg->lock);
+ pd = blkg->pd[pol->plid];
+ if (pd) {
+ if (pd->online && pol->pd_offline_fn)
+ pol->pd_offline_fn(pd);
+ pd->online = false;
+ pol->pd_free_fn(pd);
+ blkg->pd[pol->plid] = NULL;
+ }
+ spin_unlock(&blkcg->lock);
+ }
+}
+
/**
* blkcg_activate_policy - activate a blkcg policy on a gendisk
* @disk: gendisk of interest
* @pol: blkcg policy to activate
*
@@ -1641,25 +1666,11 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
return ret;
enomem:
/* alloc failed, take down everything */
spin_lock_irq(&q->queue_lock);
- list_for_each_entry(blkg, &q->blkg_list, q_node) {
- struct blkcg *blkcg = blkg->blkcg;
- struct blkg_policy_data *pd;
-
- spin_lock(&blkcg->lock);
- pd = blkg->pd[pol->plid];
- if (pd) {
- if (pd->online && pol->pd_offline_fn)
- pol->pd_offline_fn(pd);
- pd->online = false;
- pol->pd_free_fn(pd);
- blkg->pd[pol->plid] = NULL;
- }
- spin_unlock(&blkcg->lock);
- }
+ blkcg_policy_teardown_pds(q, pol);
spin_unlock_irq(&q->queue_lock);
ret = -ENOMEM;
goto out;
}
EXPORT_SYMBOL_GPL(blkcg_activate_policy);
@@ -1674,11 +1685,10 @@ EXPORT_SYMBOL_GPL(blkcg_activate_policy);
*/
void blkcg_deactivate_policy(struct gendisk *disk,
const struct blkcg_policy *pol)
{
struct request_queue *q = disk->queue;
- struct blkcg_gq *blkg;
unsigned int memflags;
if (!blkcg_policy_enabled(q, pol))
return;
@@ -1687,24 +1697,11 @@ void blkcg_deactivate_policy(struct gendisk *disk,
mutex_lock(&q->blkcg_mutex);
spin_lock_irq(&q->queue_lock);
__clear_bit(pol->plid, q->blkcg_pols);
-
- list_for_each_entry(blkg, &q->blkg_list, q_node) {
- struct blkcg *blkcg = blkg->blkcg;
-
- spin_lock(&blkcg->lock);
- if (blkg->pd[pol->plid]) {
- if (blkg->pd[pol->plid]->online && pol->pd_offline_fn)
- pol->pd_offline_fn(blkg->pd[pol->plid]);
- pol->pd_free_fn(blkg->pd[pol->plid]);
- blkg->pd[pol->plid] = NULL;
- }
- spin_unlock(&blkcg->lock);
- }
-
+ blkcg_policy_teardown_pds(q, pol);
spin_unlock_irq(&q->queue_lock);
mutex_unlock(&q->blkcg_mutex);
if (queue_is_mq(q))
blk_mq_unfreeze_queue(q, memflags);
--
2.51.0
^ permalink raw reply related
* [PATCH v2 3/4] blk-cgroup: skip dying blkg in blkcg_activate_policy()
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Zheng Qixing <zhengqixing@huawei.com>
When switching IO schedulers on a block device, blkcg_activate_policy()
can race with concurrent blkcg deletion, leading to a use-after-free in
rcu_accelerate_cbs.
T1: T2:
blkg_destroy
kill(&blkg->refcnt) // blkg->refcnt=1->0
blkg_release // call_rcu(__blkg_release)
...
blkg_free_workfn
->pd_free_fn(pd)
elv_iosched_store
elevator_switch
...
iterate blkg list
blkg_get(blkg) // blkg->refcnt=0->1
list_del_init(&blkg->q_node)
blkg_put(pinned_blkg) // blkg->refcnt=1->0
blkg_release // call_rcu again
rcu_accelerate_cbs // uaf
Fix this by checking hlist_unhashed(&blkg->blkcg_node) before getting
a reference to the blkg. This is the same check used in blkg_destroy()
to detect if a blkg has already been destroyed. If the blkg is already
unhashed, skip processing it since it's being destroyed.
Fixes: f1c006f1c685 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()")
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>
Signed-off-by: Yu Kuai <yukuai@fygo.io>
---
block/blk-cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index f7e788a7fe95..2538d8105e6c 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1574,10 +1574,12 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node) {
struct blkg_policy_data *pd;
if (blkg->pd[pol->plid])
continue;
+ if (hlist_unhashed(&blkg->blkcg_node))
+ continue;
/* If prealloc matches, use it; otherwise try GFP_NOWAIT */
if (blkg == pinned_blkg) {
pd = pd_prealloc;
pd_prealloc = NULL;
--
2.51.0
^ permalink raw reply related
* [PATCH v2 2/4] blk-cgroup: fix race between policy activation and blkg destruction
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Zheng Qixing <zhengqixing@huawei.com>
When switching an IO scheduler on a block device, blkcg_activate_policy()
allocates blkg_policy_data (pd) for all blkgs attached to the queue.
However, blkcg_activate_policy() may race with concurrent blkcg deletion,
leading to use-after-free and memory leak issues.
The use-after-free occurs in the following race:
T1 (blkcg_activate_policy):
- Successfully allocates pd for blkg1 (loop0->queue, blkcgA)
- Fails to allocate pd for blkg2 (loop0->queue, blkcgB)
- Enters the enomem rollback path to release blkg1 resources
T2 (blkcg deletion):
- blkcgA is deleted concurrently
- blkg1 is freed via blkg_free_workfn()
- blkg1->pd is freed
T1 (continued):
- Rollback path accesses blkg1->pd->online after pd is freed
- Triggers use-after-free
In addition, blkg_free_workfn() frees pd before removing the blkg from
q->blkg_list. This allows blkcg_activate_policy() to allocate a new pd
for a blkg that is being destroyed, leaving the newly allocated pd
unreachable when the blkg is finally freed.
Fix these races by extending blkcg_mutex coverage to serialize
blkcg_activate_policy() rollback and blkg destruction, ensuring pd
lifecycle is synchronized with blkg list visibility.
Fixes: f1c006f1c685 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()")
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>
Signed-off-by: Yu Kuai <yukuai@fygo.io>
---
block/blk-cgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 7baccfb690fe..f7e788a7fe95 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1563,10 +1563,12 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
if (WARN_ON_ONCE(!pol->pd_alloc_fn || !pol->pd_free_fn))
return -EINVAL;
if (queue_is_mq(q))
memflags = blk_mq_freeze_queue(q);
+
+ mutex_lock(&q->blkcg_mutex);
retry:
spin_lock_irq(&q->queue_lock);
/* blkg_list is pushed at the head, reverse walk to initialize parents first */
list_for_each_entry_reverse(blkg, &q->blkg_list, q_node) {
@@ -1625,10 +1627,11 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
__set_bit(pol->plid, q->blkcg_pols);
ret = 0;
spin_unlock_irq(&q->queue_lock);
out:
+ mutex_unlock(&q->blkcg_mutex);
if (queue_is_mq(q))
blk_mq_unfreeze_queue(q, memflags);
if (pinned_blkg)
blkg_put(pinned_blkg);
if (pd_prealloc)
--
2.51.0
^ permalink raw reply related
* [PATCH v2 1/4] blk-cgroup: protect q->blkg_list iteration in blkg_destroy_all() with blkcg_mutex
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Yu Kuai <yukuai@fygo.io>
blkg_destroy_all() iterates q->blkg_list without holding blkcg_mutex,
which can race with blkg_free_workfn() that removes blkgs from the list
while holding blkcg_mutex.
Add blkcg_mutex protection around the q->blkg_list iteration to prevent
potential list corruption or use-after-free issues.
Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>
Signed-off-by: Yu Kuai <yukuai@fygo.io>
---
block/blk-cgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index ee076ab795d3..7baccfb690fe 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -574,10 +574,11 @@ static void blkg_destroy_all(struct gendisk *disk)
struct blkcg_gq *blkg;
int count = BLKG_DESTROY_BATCH_SIZE;
int i;
restart:
+ mutex_lock(&q->blkcg_mutex);
spin_lock_irq(&q->queue_lock);
list_for_each_entry(blkg, &q->blkg_list, q_node) {
struct blkcg *blkcg = blkg->blkcg;
if (hlist_unhashed(&blkg->blkcg_node))
@@ -592,10 +593,11 @@ static void blkg_destroy_all(struct gendisk *disk)
* it when a batch of blkgs are destroyed.
*/
if (!(--count)) {
count = BLKG_DESTROY_BATCH_SIZE;
spin_unlock_irq(&q->queue_lock);
+ mutex_unlock(&q->blkcg_mutex);
cond_resched();
goto restart;
}
}
@@ -611,10 +613,11 @@ static void blkg_destroy_all(struct gendisk *disk)
__clear_bit(pol->plid, q->blkcg_pols);
}
q->root_blkg = NULL;
spin_unlock_irq(&q->queue_lock);
+ mutex_unlock(&q->blkcg_mutex);
wake_up_var(&q->root_blkg);
}
static void blkg_iostat_set(struct blkg_iostat *dst, struct blkg_iostat *src)
--
2.51.0
^ permalink raw reply related
* [PATCH v2 0/4] blk-cgroup: fix blkg list and policy data races
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Yu Kuai <yukuai@fygo.io>
Hi,
This series fixes races around q->blkg_list and blkg policy data
lifetime.
Patch 1 protects blkg_destroy_all()'s q->blkg_list walk with
blkcg_mutex.
Patches 2-3 fix races between blkcg_activate_policy() and concurrent
blkg destruction.
Patch 4 factors the policy data teardown loop into a helper after the
race fixes.
Changes since v1:
- Drop the BFQ q->blkg_list patch because the current block tree already
has a stronger fix in commit 17b2d950a3c0 ("block, bfq: protect async
queue reset with blkcg locks").
- Add Reviewed-by tags from Tang Yizhou.
Yu Kuai (1):
blk-cgroup: protect q->blkg_list iteration in blkg_destroy_all() with
blkcg_mutex
Zheng Qixing (3):
blk-cgroup: fix race between policy activation and blkg destruction
blk-cgroup: skip dying blkg in blkcg_activate_policy()
blk-cgroup: factor policy pd teardown loop into helper
block/blk-cgroup.c | 65 +++++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 30 deletions(-)
--
2.51.0
^ permalink raw reply
* [PATCH 2/2] ext4: add unraid mount option for single-disk-per-group mode
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
In-Reply-To: <20260624064625.1743650-1-yukuai@kernel.org>
From: Yu Kuai <yukuai@fnnas.com>
Add support for an "unraid" mount option that enables a special mode
designed for use with fault-tolerant md-linear arrays. In this mode:
1. Variable block groups: Each block group can have a different size,
allowing one physical disk per group. Lookup tables are used for
block-to-group mapping instead of fixed-size calculations.
2. Distributed metadata: Every block group has its own superblock and
group descriptor table copy, enabling the filesystem to remain
accessible even if some disks fail.
3. Single-group allocation: Files are allocated entirely within a
single block group. If a group doesn't have enough space, the
allocation fails with -ENOSPC instead of trying other groups.
This ensures each file resides on a single physical disk.
4. Inode locality: Inodes are allocated in the same group as their
parent directory, keeping files and their metadata on the same disk.
This enables unraid-like functionality where:
- Each disk is independent and can be read separately
- Disk failures only affect files on that specific disk
- The filesystem continues operating with reduced capacity
Usage:
mount -t ext4 -o unraid /dev/md0 /mnt
Note: This requires a specially formatted filesystem where each block
group corresponds to one physical disk. A future mkfs.ext4 extension
will support creating such filesystems.
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
---
fs/ext4/balloc.c | 45 ++++++++++++++++++++++++++++++++++++++++-----
fs/ext4/ext4.h | 15 ++++++++++++++-
fs/ext4/ialloc.c | 13 +++++++++++++
fs/ext4/mballoc.c | 8 ++++++++
fs/ext4/super.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 143 insertions(+), 6 deletions(-)
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 8040c731b3e4..bd151dc5480b 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -54,17 +54,43 @@ ext4_group_t ext4_get_group_number(struct super_block *sb,
void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
ext4_group_t *blockgrpp, ext4_grpblk_t *offsetp)
{
- struct ext4_super_block *es = EXT4_SB(sb)->s_es;
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
+ struct ext4_super_block *es = sbi->s_es;
ext4_grpblk_t offset;
blocknr = blocknr - le32_to_cpu(es->s_first_data_block);
+
+ /* Unraid mode: binary search through variable-size groups */
+ if (sbi->s_group_first_block) {
+ ext4_group_t lo = 0, hi = sbi->s_groups_count - 1;
+ ext4_fsblk_t first_data = le32_to_cpu(es->s_first_data_block);
+
+ blocknr += first_data; /* restore original block number */
+
+ while (lo < hi) {
+ ext4_group_t mid = (lo + hi + 1) / 2;
+
+ if (blocknr < sbi->s_group_first_block[mid])
+ hi = mid - 1;
+ else
+ lo = mid;
+ }
+ if (blockgrpp)
+ *blockgrpp = lo;
+ if (offsetp) {
+ offset = (blocknr - sbi->s_group_first_block[lo]) >>
+ sbi->s_cluster_bits;
+ *offsetp = offset;
+ }
+ return;
+ }
+
offset = do_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb)) >>
- EXT4_SB(sb)->s_cluster_bits;
+ sbi->s_cluster_bits;
if (offsetp)
*offsetp = offset;
if (blockgrpp)
*blockgrpp = blocknr;
-
}
/*
@@ -162,8 +188,13 @@ static unsigned ext4_num_overhead_clusters(struct super_block *sb,
static unsigned int num_clusters_in_group(struct super_block *sb,
ext4_group_t block_group)
{
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
unsigned int blocks;
+ /* Unraid mode: use per-group blocks count */
+ if (sbi->s_group_blocks_count)
+ return EXT4_NUM_B2C(sbi, sbi->s_group_blocks_count[block_group]);
+
if (block_group == ext4_get_groups_count(sb) - 1) {
/*
* Even though mke2fs always initializes the first and
@@ -171,11 +202,11 @@ static unsigned int num_clusters_in_group(struct super_block *sb,
* we need to make sure we calculate the right free
* blocks.
*/
- blocks = ext4_blocks_count(EXT4_SB(sb)->s_es) -
+ blocks = ext4_blocks_count(sbi->s_es) -
ext4_group_first_block_no(sb, block_group);
} else
blocks = EXT4_BLOCKS_PER_GROUP(sb);
- return EXT4_NUM_B2C(EXT4_SB(sb), blocks);
+ return EXT4_NUM_B2C(sbi, blocks);
}
/* Initializes an uninitialized block bitmap */
@@ -855,6 +886,13 @@ int ext4_bg_has_super(struct super_block *sb, ext4_group_t group)
{
struct ext4_super_block *es = EXT4_SB(sb)->s_es;
+ /*
+ * Unraid mode: every group has a superblock copy for fault tolerance.
+ * This allows mounting the filesystem even if some disks fail.
+ */
+ if (test_opt2(sb, UNRAID))
+ return 1;
+
if (group == 0)
return 1;
if (ext4_has_feature_sparse_super2(sb)) {
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 56112f201cac..063e37a82654 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1295,6 +1295,9 @@ struct ext4_inode_info {
* scanning in mballoc
*/
#define EXT4_MOUNT2_ABORT 0x00000100 /* Abort filesystem */
+#define EXT4_MOUNT2_UNRAID 0x00000200 /* Unraid mode: one disk per
+ * group, single-group alloc
+ */
#define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \
~EXT4_MOUNT_##opt
@@ -1687,6 +1690,10 @@ struct ext4_sb_info {
struct flex_groups * __rcu *s_flex_groups;
ext4_group_t s_flex_groups_allocated;
+ /* Unraid mode: variable block groups (one disk per group) */
+ ext4_fsblk_t *s_group_first_block; /* First block of each group */
+ ext4_grpblk_t *s_group_blocks_count; /* Blocks count per group */
+
/* workqueue for reserved extent conversions (buffered io) */
struct workqueue_struct *rsv_conversion_wq;
@@ -2627,8 +2634,14 @@ struct dir_private_info {
static inline ext4_fsblk_t
ext4_group_first_block_no(struct super_block *sb, ext4_group_t group_no)
{
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
+
+ /* Unraid mode: variable block groups, use lookup table */
+ if (sbi->s_group_first_block)
+ return sbi->s_group_first_block[group_no];
+
return group_no * (ext4_fsblk_t)EXT4_BLOCKS_PER_GROUP(sb) +
- le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
+ le32_to_cpu(sbi->s_es->s_first_data_block);
}
/*
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index b20a1bf866ab..98fda602073e 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -438,6 +438,19 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
int flex_size = ext4_flex_bg_size(sbi);
struct dx_hash_info hinfo;
+ /*
+ * Unraid mode: always allocate inode in parent's group.
+ * This ensures files and their inodes stay on the same disk.
+ */
+ if (test_opt2(sb, UNRAID)) {
+ desc = ext4_get_group_desc(sb, parent_group, NULL);
+ if (desc && ext4_free_inodes_count(sb, desc) > 0) {
+ *group = parent_group;
+ return 0;
+ }
+ return -1; /* No free inodes in parent's group */
+ }
+
ngroups = real_ngroups;
if (flex_size > 1) {
ngroups = (real_ngroups + flex_size - 1) >>
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 56d50fd3310b..9de674ec2f77 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2997,6 +2997,14 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
if (err || ac->ac_status == AC_STATUS_FOUND)
goto out;
+ /*
+ * Unraid mode: files must be allocated entirely within a single group.
+ * If the goal group doesn't have enough space, fail with -ENOSPC
+ * instead of trying other groups.
+ */
+ if (test_opt2(sb, UNRAID))
+ goto out;
+
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
goto out;
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 87205660c5d0..9534a4ffbee7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1255,6 +1255,12 @@ static void ext4_group_desc_free(struct ext4_sb_info *sbi)
brelse(group_desc[i]);
kvfree(group_desc);
rcu_read_unlock();
+
+ /* Free unraid mode arrays */
+ kvfree(sbi->s_group_first_block);
+ kvfree(sbi->s_group_blocks_count);
+ sbi->s_group_first_block = NULL;
+ sbi->s_group_blocks_count = NULL;
}
static void ext4_flex_groups_free(struct ext4_sb_info *sbi)
@@ -1677,6 +1683,7 @@ enum {
Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache,
Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan,
Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type,
+ Opt_unraid,
#ifdef CONFIG_EXT4_DEBUG
Opt_fc_debug_max_replay, Opt_fc_debug_force
#endif
@@ -1819,6 +1826,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = {
fsparam_flag ("reservation", Opt_removed), /* mount option from ext2/3 */
fsparam_flag ("noreservation", Opt_removed), /* mount option from ext2/3 */
fsparam_u32 ("journal", Opt_removed), /* mount option from ext2/3 */
+ fsparam_flag ("unraid", Opt_unraid),
{}
};
@@ -1912,6 +1920,7 @@ static const struct mount_opts {
MOPT_SET | MOPT_2 | MOPT_EXT4_ONLY},
#endif
{Opt_abort, EXT4_MOUNT2_ABORT, MOPT_SET | MOPT_2},
+ {Opt_unraid, EXT4_MOUNT2_UNRAID, MOPT_SET | MOPT_2 | MOPT_EXT4_ONLY},
{Opt_err, 0, 0}
};
@@ -4845,6 +4854,65 @@ static int ext4_check_geometry(struct super_block *sb,
return 0;
}
+/*
+ * Initialize unraid mode data structures.
+ * In unraid mode, each block group can have a different size (one disk per group).
+ * This function allocates and populates the lookup tables for variable-size groups.
+ *
+ * For now, this uses the standard fixed-size groups from the superblock.
+ * A future mkfs extension will store per-group sizes in the group descriptors.
+ */
+static int ext4_unraid_init(struct super_block *sb)
+{
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
+ ext4_group_t ngroups = sbi->s_groups_count;
+ ext4_fsblk_t first_data_block;
+ ext4_group_t i;
+
+ if (!test_opt2(sb, UNRAID))
+ return 0;
+
+ sbi->s_group_first_block = kvmalloc_array(ngroups,
+ sizeof(ext4_fsblk_t),
+ GFP_KERNEL);
+ if (!sbi->s_group_first_block)
+ return -ENOMEM;
+
+ sbi->s_group_blocks_count = kvmalloc_array(ngroups,
+ sizeof(ext4_grpblk_t),
+ GFP_KERNEL);
+ if (!sbi->s_group_blocks_count) {
+ kvfree(sbi->s_group_first_block);
+ sbi->s_group_first_block = NULL;
+ return -ENOMEM;
+ }
+
+ /*
+ * Initialize with standard fixed-size groups for now.
+ * TODO: Read per-group sizes from extended group descriptors
+ * when mkfs supports creating variable-size groups.
+ */
+ first_data_block = le32_to_cpu(sbi->s_es->s_first_data_block);
+ for (i = 0; i < ngroups; i++) {
+ sbi->s_group_first_block[i] = first_data_block +
+ (ext4_fsblk_t)i * EXT4_BLOCKS_PER_GROUP(sb);
+
+ if (i == ngroups - 1) {
+ /* Last group may be smaller */
+ sbi->s_group_blocks_count[i] =
+ ext4_blocks_count(sbi->s_es) -
+ sbi->s_group_first_block[i];
+ } else {
+ sbi->s_group_blocks_count[i] = EXT4_BLOCKS_PER_GROUP(sb);
+ }
+ }
+
+ ext4_msg(sb, KERN_INFO, "unraid mode enabled: %u groups",
+ ngroups);
+
+ return 0;
+}
+
static int ext4_group_desc_init(struct super_block *sb,
struct ext4_super_block *es,
ext4_fsblk_t logical_sb_block,
@@ -4904,7 +4972,8 @@ static int ext4_group_desc_init(struct super_block *sb,
return -EFSCORRUPTED;
}
- return 0;
+ /* Initialize unraid mode data structures if enabled */
+ return ext4_unraid_init(sb);
}
static int ext4_load_and_init_journal(struct super_block *sb,
--
2.43.0
^ permalink raw reply related
* [PATCH 1/2] md/linear: add fault-tolerant mode for unraid-like setups
From: Yu Kuai @ 2026-06-24 6:46 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe
Cc: Zheng Qixing, Christoph Hellwig, Tang Yizhou, Nilay Shroff,
Ming Lei, cgroups, linux-block, linux-kernel
From: Yu Kuai <yukuai@fnnas.com>
Add a module parameter 'fault_tolerant' that changes how md-linear
handles disk failures. When enabled:
- Disk failures are isolated instead of failing the entire array
- I/O to failed disks returns -EIO while healthy disks continue
- The array remains operational with reduced capacity
- Failed disk count is tracked and shown in /proc/mdstat
This enables unraid-like functionality where individual disk failures
don't bring down the entire array, allowing continued access to data
on healthy disks.
The fault_tolerant parameter can be set at module load time or
dynamically via /sys/module/md_linear/parameters/fault_tolerant.
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
---
drivers/md/md-linear.c | 63 ++++++++++++++++++++++++++++++++++++------
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
index 8d7b82c4a723..8afc6665cfde 100644
--- a/drivers/md/md-linear.c
+++ b/drivers/md/md-linear.c
@@ -2,6 +2,10 @@
/*
* linear.c : Multiple Devices driver for Linux Copyright (C) 1994-96 Marc
* ZYNGIER <zyngier@ufr-info-p7.ibp.fr> or <maz@gloups.fdn.fr>
+ *
+ * Fault-tolerant mode added for unraid-like setups.
+ * When fault_tolerant=1, disk failures are isolated - I/O to failed disks
+ * returns -EIO while healthy disks continue operating normally.
*/
#include <linux/blkdev.h>
@@ -21,9 +25,15 @@ struct linear_conf {
sector_t array_sectors;
/* a copy of mddev->raid_disks */
int raid_disks;
+ atomic_t failed_disks; /* count of failed disks */
struct dev_info disks[] __counted_by(raid_disks);
};
+static bool fault_tolerant;
+module_param(fault_tolerant, bool, 0644);
+MODULE_PARM_DESC(fault_tolerant,
+ "Enable fault-tolerant mode: isolate disk failures instead of failing array (default: false)");
+
/*
* find which device holds a particular offset
*/
@@ -96,6 +106,8 @@ static struct linear_conf *linear_conf(struct mddev *mddev, int raid_disks)
if (!conf)
return ERR_PTR(-ENOMEM);
+ atomic_set(&conf->failed_disks, 0);
+
/*
* conf->raid_disks is copy of mddev->raid_disks. The reason to
* keep a copy of mddev->raid_disks in struct linear_conf is,
@@ -251,7 +263,8 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
bio_sector < start_sector))
goto out_of_bounds;
- if (unlikely(is_rdev_broken(tmp_dev->rdev))) {
+ if (unlikely(is_rdev_broken(tmp_dev->rdev) ||
+ test_bit(Faulty, &tmp_dev->rdev->flags))) {
md_error(mddev, tmp_dev->rdev);
bio_io_error(bio);
return true;
@@ -296,16 +309,47 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
static void linear_status(struct seq_file *seq, struct mddev *mddev)
{
+ struct linear_conf *conf = mddev->private;
+
seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2);
+ if (fault_tolerant) {
+ int failed = atomic_read(&conf->failed_disks);
+
+ seq_puts(seq, " fault-tolerant");
+ if (failed)
+ seq_printf(seq, " [%d failed]", failed);
+ }
}
static void linear_error(struct mddev *mddev, struct md_rdev *rdev)
{
- if (!test_and_set_bit(MD_BROKEN, &mddev->flags)) {
- char *md_name = mdname(mddev);
-
- pr_crit("md/linear%s: Disk failure on %pg detected, failing array.\n",
- md_name, rdev->bdev);
+ char *md_name = mdname(mddev);
+
+ if (fault_tolerant) {
+ /*
+ * Fault-tolerant mode: isolate the failed disk instead of
+ * failing the entire array. I/O to this disk will return -EIO
+ * but other disks continue operating normally.
+ */
+ if (!test_and_set_bit(Faulty, &rdev->flags)) {
+ struct linear_conf *conf = mddev->private;
+
+ atomic_inc(&conf->failed_disks);
+ pr_warn("md/linear%s: Disk failure on %pg detected, isolating device (fault-tolerant mode).\n",
+ md_name, rdev->bdev);
+ pr_warn("md/linear%s: %d disk(s) now failed, array continues with reduced capacity.\n",
+ md_name, atomic_read(&conf->failed_disks));
+ /* Notify userspace about the state change */
+ sysfs_notify_dirent_safe(rdev->sysfs_state);
+ }
+ } else {
+ /*
+ * Standard mode: fail the entire array on any disk failure.
+ */
+ if (!test_and_set_bit(MD_BROKEN, &mddev->flags)) {
+ pr_crit("md/linear%s: Disk failure on %pg detected, failing array.\n",
+ md_name, rdev->bdev);
+ }
}
}
@@ -344,7 +388,7 @@ static void linear_exit(void)
module_init(linear_init);
module_exit(linear_exit);
MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Linear device concatenation personality for MD (deprecated)");
+MODULE_DESCRIPTION("Linear device concatenation personality for MD with optional fault-tolerant mode");
MODULE_ALIAS("md-personality-1"); /* LINEAR - deprecated*/
MODULE_ALIAS("md-linear");
MODULE_ALIAS("md-level--1");
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] block, bfq: protect async queue reset with blkcg locks
From: yu kuai @ 2026-06-24 6:28 UTC (permalink / raw)
To: Cen Zhang, Tejun Heo, Josef Bacik, Jens Axboe, Arianna Avanzini,
Paolo Valente
Cc: linux-block, cgroups, linux-kernel, baijiaju1990, yukuai
In-Reply-To: <20260621135930.2657810-1-zzzccc427@gmail.com>
Hi,
在 2026/6/21 21:59, Cen Zhang 写道:
> Writing 0 to BFQ's low_latency attribute ends weight raising for active,
> idle and async queues. The async cgroup path walks q->blkg_list, converts
> each blkg to BFQ policy data and then reads bfqg->async_bfqq and
> bfqg->async_idle_bfqq.
>
> That walk was protected only by bfqd->lock. blkcg release work is
> serialized by q->blkcg_mutex and q->queue_lock instead, and
> blkg_free_workfn() can call BFQ's pd_free_fn before it removes
> blkg->q_node from q->blkg_list. A low_latency reset can therefore still
> find the blkg on the queue list after the BFQ policy data has been freed.
>
> The buggy scenario involves two paths, with each column showing the order
> within that path:
>
> BFQ low_latency reset: blkcg blkg release work:
> 1. bfq_low_latency_store() 1. blkg_free_workfn() takes
> calls bfq_end_wr(). q->blkcg_mutex.
> 2. bfq_end_wr_async() walks 2. BFQ pd_free_fn drops the
> q->blkg_list. final bfq_group reference.
> 3. blkg_to_bfqg() returns 3. blkg->q_node remains on
> the stale policy data. q->blkg_list until list_del_init().
> 4. bfq_end_wr_async_queues()
> reads async queue fields.
>
> Fix this by taking q->blkcg_mutex and q->queue_lock around the
> q->blkg_list walk, then taking bfqd->lock before touching BFQ async
> queues. The mutex serializes against policy-data free and queue_lock
> stabilizes the list. Move the async reset out of bfq_end_wr()'s existing
> bfqd->lock critical section so the lock order matches blkcg policy
> callbacks.
>
> Validation reproduced this kernel report:
> BUG: KASAN: slab-use-after-free in bfq_end_wr_async_queues+0x246/0x340
>
> Call Trace:
> <TASK>
> dump_stack_lvl+0x66/0xa0
> print_report+0xce/0x630
> ? bfq_end_wr_async_queues+0x246/0x340
> ? srso_alias_return_thunk+0x5/0xfbef5
> ? __virt_addr_valid+0x20d/0x410
> ? bfq_end_wr_async_queues+0x246/0x340
> kasan_report+0xe0/0x110
> ? bfq_end_wr_async_queues+0x246/0x340
> bfq_end_wr_async_queues+0x246/0x340
> bfq_end_wr_async+0xba/0x180
> bfq_low_latency_store+0x4e5/0x690
> ? 0xffffffffc02150da
> ? __pfx_bfq_low_latency_store+0x10/0x10
> ? __pfx_bfq_low_latency_store+0x10/0x10
> elv_attr_store+0xc4/0x110
> kernfs_fop_write_iter+0x2f5/0x4a0
> vfs_write+0x604/0x11f0
> ? __pfx_locks_remove_posix+0x10/0x10
> ? __pfx_vfs_write+0x10/0x10
> ksys_write+0xf9/0x1d0
> ? __pfx_ksys_write+0x10/0x10
> do_syscall_64+0x115/0x6a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Allocated by task 544:
> kasan_save_stack+0x33/0x60
> kasan_save_track+0x14/0x30
> __kasan_kmalloc+0xaa/0xb0
> bfq_pd_alloc+0xc0/0x1b0
> blkg_alloc+0x346/0x960
> blkg_create+0x8c2/0x10d0
> bio_associate_blkg_from_css+0x9f3/0xfa0
> bio_associate_blkg+0xd9/0x200
> bio_init+0x303/0x640
> __blkdev_direct_IO_simple+0x56b/0x8a0
> blkdev_direct_IO+0x8e7/0x2580
> blkdev_read_iter+0x205/0x400
> vfs_read+0x7b0/0xda0
> ksys_read+0xf9/0x1d0
> do_syscall_64+0x115/0x6a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Freed by task 465:
> kasan_save_stack+0x33/0x60
> kasan_save_track+0x14/0x30
> kasan_save_free_info+0x3b/0x60
> __kasan_slab_free+0x5f/0x80
> kfree+0x307/0x580
> blkg_free_workfn+0xef/0x460
> process_one_work+0x8d0/0x1870
> worker_thread+0x575/0xf80
> kthread+0x2e7/0x3c0
> ret_from_fork+0x576/0x810
> ret_from_fork_asm+0x1a/0x30
>
> Fixes: 44e44a1b329e ("block, bfq: improve responsiveness")
> Assisted-by: Codex:gpt-5.5
> Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
> ---
> block/bfq-cgroup.c | 13 ++++++++++++-
> block/bfq-iosched.c | 3 ++-
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
> index 0bd0332b3d78..d8fdace464b4 100644
> --- a/block/bfq-cgroup.c
> +++ b/block/bfq-cgroup.c
> @@ -936,14 +936,23 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)
>
> void bfq_end_wr_async(struct bfq_data *bfqd)
> {
> + struct request_queue *q = bfqd->queue;
> struct blkcg_gq *blkg;
>
> - list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) {
> + mutex_lock(&q->blkcg_mutex);
> + spin_lock_irq(&q->queue_lock);
> + spin_lock(&bfqd->lock);
Just notice this patch, the same problem is already fixed by another patchset
that I posted. Since this patch is already applied by Jens, I'll rebase my patchset.
BTW, I'm also trying to get rid of queue_lock for blkg protection.
> +
> + list_for_each_entry(blkg, &q->blkg_list, q_node) {
> struct bfq_group *bfqg = blkg_to_bfqg(blkg);
>
> bfq_end_wr_async_queues(bfqd, bfqg);
> }
> bfq_end_wr_async_queues(bfqd, bfqd->root_group);
> +
> + spin_unlock(&bfqd->lock);
> + spin_unlock_irq(&q->queue_lock);
> + mutex_unlock(&q->blkcg_mutex);
> }
>
> static int bfq_io_show_weight_legacy(struct seq_file *sf, void *v)
> @@ -1416,7 +1425,9 @@ void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio) {}
>
> void bfq_end_wr_async(struct bfq_data *bfqd)
> {
> + spin_lock_irq(&bfqd->lock);
> bfq_end_wr_async_queues(bfqd, bfqd->root_group);
> + spin_unlock_irq(&bfqd->lock);
> }
>
> struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 141c602d5e85..eec9be62061b 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -2653,9 +2653,10 @@ static void bfq_end_wr(struct bfq_data *bfqd)
> }
> list_for_each_entry(bfqq, &bfqd->idle_list, bfqq_list)
> bfq_bfqq_end_wr(bfqq);
> - bfq_end_wr_async(bfqd);
>
> spin_unlock_irq(&bfqd->lock);
> +
> + bfq_end_wr_async(bfqd);
> }
>
> static sector_t bfq_io_struct_pos(void *io_struct, bool request)
--
Thanks,
Kuai
^ permalink raw reply
* [PATCH 16/16] fscrypt: Add safety checks to non-block-based en/decryption
From: Eric Biggers @ 2026-06-24 5:03 UTC (permalink / raw)
To: linux-fscrypt
Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, linux-block,
Christoph Hellwig, Theodore Ts'o, Andreas Dilger, Baokun Li,
Jan Kara, Ojaswin Mujoo, Ritesh Harjani, Zhang Yi, Jaegeuk Kim,
Chao Yu, Eric Biggers
In-Reply-To: <20260624050334.124606-1-ebiggers@kernel.org>
fscrypt_encrypt_pagecache_blocks(), fscrypt_encrypt_block_inplace(),
fscrypt_decrypt_block_inplace() would dereference a NULL
fscrypt_inode_info pointer if they were to be called on a file that
hasn't been opened yet or on a block-based filesystem. Since they have
the ability to report errors anyway, add WARN_ON_ONCE checks for this.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/crypto/crypto.c | 61 +++++++++++++++++++++++++++++-----------------
1 file changed, 39 insertions(+), 22 deletions(-)
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index 27663f4d8705..c91eda62f9a4 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -103,35 +103,44 @@ static int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
fscrypt_direction_t rw, u64 index,
struct page *src_page,
struct page *dest_page, unsigned int len,
unsigned int offs)
{
- struct crypto_sync_skcipher *tfm = ci->ci_enc_key.tfm;
- SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
+ struct crypto_sync_skcipher *tfm;
union fscrypt_iv iv;
struct scatterlist dst, src;
int err;
+ if (WARN_ON_ONCE(ci == NULL)) /* File hasn't been opened yet? */
+ return -ENOKEY;
+ tfm = ci->ci_enc_key.tfm;
+ if (WARN_ON_ONCE(tfm == NULL)) /* Called on block-based filesystem? */
+ return -ENOKEY;
+
if (WARN_ON_ONCE(len <= 0))
return -EINVAL;
if (WARN_ON_ONCE(len % FSCRYPT_CONTENTS_ALIGNMENT != 0))
return -EINVAL;
fscrypt_generate_iv(&iv, index, ci);
- skcipher_request_set_callback(
- req, CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
- NULL, NULL);
- sg_init_table(&dst, 1);
- sg_set_page(&dst, dest_page, len, offs);
- sg_init_table(&src, 1);
- sg_set_page(&src, src_page, len, offs);
- skcipher_request_set_crypt(req, &src, &dst, len, &iv);
- if (rw == FS_DECRYPT)
- err = crypto_skcipher_decrypt(req);
- else
- err = crypto_skcipher_encrypt(req);
+ {
+ SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
+ skcipher_request_set_callback(req,
+ CRYPTO_TFM_REQ_MAY_BACKLOG |
+ CRYPTO_TFM_REQ_MAY_SLEEP,
+ NULL, NULL);
+ sg_init_table(&dst, 1);
+ sg_set_page(&dst, dest_page, len, offs);
+ sg_init_table(&src, 1);
+ sg_set_page(&src, src_page, len, offs);
+ skcipher_request_set_crypt(req, &src, &dst, len, &iv);
+ if (rw == FS_DECRYPT)
+ err = crypto_skcipher_decrypt(req);
+ else
+ err = crypto_skcipher_encrypt(req);
+ }
if (err)
fscrypt_err(ci->ci_inode,
"%scryption failed for data unit %llu: %d",
(rw == FS_DECRYPT ? "De" : "En"), index, err);
return err;
@@ -151,11 +160,11 @@ static int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
*
* In the bounce page, the ciphertext data will be located at the same offset at
* which the plaintext data was located in the source page. Any other parts of
* the bounce page will be left uninitialized.
*
- * This is for use by the filesystem's ->writepages() method.
+ * This is for use by the ->writepages() method of non-block-based filesystems.
*
* The bounce page allocation is mempool-backed, so it will always succeed when
* @gfp_flags includes __GFP_DIRECT_RECLAIM, e.g. when it's GFP_NOFS. However,
* only the first page of each bio can be allocated this way. To prevent
* deadlocks, for any additional pages a mask like GFP_NOWAIT must be used.
@@ -165,18 +174,24 @@ static int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio,
size_t len, size_t offs, gfp_t gfp_flags)
{
const struct inode *inode = folio->mapping->host;
const struct fscrypt_inode_info *ci = fscrypt_get_inode_info_raw(inode);
- const unsigned int du_bits = ci->ci_data_unit_bits;
- const unsigned int du_size = 1U << du_bits;
+ unsigned int du_bits;
+ unsigned int du_size;
struct page *ciphertext_page;
- u64 index = ((u64)folio->index << (PAGE_SHIFT - du_bits)) +
- (offs >> du_bits);
+ u64 index;
unsigned int i;
int err;
+ if (WARN_ON_ONCE(ci == NULL)) /* File hasn't been opened yet? */
+ return ERR_PTR(-ENOKEY);
+
+ du_bits = ci->ci_data_unit_bits;
+ du_size = 1U << du_bits;
+ index = (folio_pos(folio) + offs) >> du_bits;
+
VM_BUG_ON_FOLIO(folio_test_large(folio), folio);
if (WARN_ON_ONCE(!folio_test_locked(folio)))
return ERR_PTR(-EINVAL);
if (WARN_ON_ONCE(len <= 0 || !IS_ALIGNED(len | offs, du_size)))
@@ -213,11 +228,12 @@ EXPORT_SYMBOL(fscrypt_encrypt_pagecache_blocks);
*
* Encrypt a possibly-compressed filesystem block that is located in an
* arbitrary page, not necessarily in the original pagecache page. The @inode
* and @lblk_num must be specified, as they can't be determined from @page.
*
- * This is not compatible with fscrypt_operations::supports_subblock_data_units.
+ * This function only supports non-block-based filesystems that don't support
+ * sub-block data units (as indicated by the fscrypt_operations fields).
*
* Return: 0 on success; -errno on failure
*/
int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
unsigned int len, unsigned int offs,
@@ -243,11 +259,12 @@ EXPORT_SYMBOL(fscrypt_encrypt_block_inplace);
*
* Decrypt a possibly-compressed filesystem block that is located in an
* arbitrary page, not necessarily in the original pagecache page. The @inode
* and @lblk_num must be specified, as they can't be determined from @page.
*
- * This is not compatible with fscrypt_operations::supports_subblock_data_units.
+ * This function only supports non-block-based filesystems that don't support
+ * sub-block data units (as indicated by the fscrypt_operations fields).
*
* Return: 0 on success; -errno on failure
*/
int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
unsigned int len, unsigned int offs,
@@ -273,11 +290,11 @@ EXPORT_SYMBOL(fscrypt_decrypt_block_inplace);
int fscrypt_initialize(struct super_block *sb)
{
mempool_t *pool;
/* pairs with smp_store_release() below */
- if (likely(smp_load_acquire(&fscrypt_bounce_page_pool)))
+ if (smp_load_acquire(&fscrypt_bounce_page_pool))
return 0;
/* No need to allocate a bounce page pool if this FS won't use it. */
if (!sb->s_cop->needs_bounce_pages)
return 0;
--
2.54.0
^ permalink raw reply related
* [PATCH 15/16] fscrypt: Merge bio.c and inline_crypt.c into block.c
From: Eric Biggers @ 2026-06-24 5:03 UTC (permalink / raw)
To: linux-fscrypt
Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, linux-block,
Christoph Hellwig, Theodore Ts'o, Andreas Dilger, Baokun Li,
Jan Kara, Ojaswin Mujoo, Ritesh Harjani, Zhang Yi, Jaegeuk Kim,
Chao Yu, Eric Biggers
In-Reply-To: <20260624050334.124606-1-ebiggers@kernel.org>
Now that fscrypt always uses blk-crypto on block-based filesystems,
there's no meaningful difference between bio.c and inline_crypt.c.
Therefore merge the two files into one named block.c.
Note: I didn't carry over bio.c's "Copyright (C) 2015, Motorola
Mobility", as none of the code that applied to remained.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/crypto/Makefile | 3 +-
fs/crypto/bio.c | 100 --------------------------
fs/crypto/{inline_crypt.c => block.c} | 96 +++++++++++++++++++++++--
fs/crypto/fscrypt_private.h | 2 +-
include/linux/fscrypt.h | 22 +++---
5 files changed, 101 insertions(+), 122 deletions(-)
delete mode 100644 fs/crypto/bio.c
rename fs/crypto/{inline_crypt.c => block.c} (79%)
diff --git a/fs/crypto/Makefile b/fs/crypto/Makefile
index 652c7180ec6d..b03e02f0f09d 100644
--- a/fs/crypto/Makefile
+++ b/fs/crypto/Makefile
@@ -8,7 +8,6 @@ fscrypto-y := crypto.o \
keyring.o \
keysetup.o \
keysetup_v1.o \
policy.o
-fscrypto-$(CONFIG_BLOCK) += bio.o
-fscrypto-$(CONFIG_FS_ENCRYPTION_INLINE_CRYPT) += inline_crypt.o
+fscrypto-$(CONFIG_BLOCK) += block.o
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
deleted file mode 100644
index db095258cfca..000000000000
--- a/fs/crypto/bio.c
+++ /dev/null
@@ -1,100 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Utility functions for file contents encryption/decryption on
- * block device-based filesystems.
- *
- * Copyright (C) 2015, Google, Inc.
- * Copyright (C) 2015, Motorola Mobility
- */
-
-#include <linux/bio.h>
-#include <linux/export.h>
-#include <linux/module.h>
-#include <linux/namei.h>
-#include <linux/pagemap.h>
-
-#include "fscrypt_private.h"
-
-struct fscrypt_zero_done {
- atomic_t pending;
- blk_status_t status;
- struct completion done;
-};
-
-static void fscrypt_zeroout_range_done(struct fscrypt_zero_done *done)
-{
- if (atomic_dec_and_test(&done->pending))
- complete(&done->done);
-}
-
-static void fscrypt_zeroout_range_end_io(struct bio *bio)
-{
- struct fscrypt_zero_done *done = bio->bi_private;
-
- if (bio->bi_status)
- cmpxchg(&done->status, 0, bio->bi_status);
- fscrypt_zeroout_range_done(done);
- bio_put(bio);
-}
-
-/**
- * fscrypt_zeroout_range() - zero out a range of blocks in an encrypted file
- * @inode: the file's inode
- * @pos: the first file position (in bytes) to zero out
- * @sector: the first sector to zero out
- * @len: bytes to zero out
- *
- * Zero out filesystem blocks in an encrypted regular file on-disk, i.e. write
- * ciphertext blocks which decrypt to the all-zeroes block. The blocks must be
- * both logically and physically contiguous. It's also assumed that the
- * filesystem only uses a single block device, ->s_bdev. @len must be a
- * multiple of the file system logical block size.
- *
- * Note that since each block uses a different IV, this involves writing a
- * different ciphertext to each block; we can't simply reuse the same one.
- *
- * Return: 0 on success; -errno on failure.
- */
-int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
- sector_t sector, u64 len)
-{
- struct fscrypt_zero_done done = {
- .pending = ATOMIC_INIT(1),
- .done = COMPLETION_INITIALIZER_ONSTACK(done.done),
- };
-
- if (len == 0)
- return 0;
-
- do {
- struct bio *bio;
- unsigned int n;
-
- bio = bio_alloc(inode->i_sb->s_bdev, BIO_MAX_VECS, REQ_OP_WRITE,
- GFP_NOFS);
- bio->bi_iter.bi_sector = sector;
- bio->bi_private = &done;
- bio->bi_end_io = fscrypt_zeroout_range_end_io;
- fscrypt_set_bio_crypt_ctx(bio, inode, pos, GFP_NOFS);
-
- for (n = 0; n < BIO_MAX_VECS; n++) {
- unsigned int bytes_this_page = min(len, PAGE_SIZE);
-
- __bio_add_page(bio, ZERO_PAGE(0), bytes_this_page, 0);
- len -= bytes_this_page;
- pos += bytes_this_page;
- sector += (bytes_this_page >> SECTOR_SHIFT);
- if (!len || !fscrypt_mergeable_bio(bio, inode, pos))
- break;
- }
-
- atomic_inc(&done.pending);
- blk_crypto_submit_bio(bio);
- } while (len);
-
- fscrypt_zeroout_range_done(&done);
-
- wait_for_completion(&done.done);
- return blk_status_to_errno(done.status);
-}
-EXPORT_SYMBOL(fscrypt_zeroout_range);
diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/block.c
similarity index 79%
rename from fs/crypto/inline_crypt.c
rename to fs/crypto/block.c
index 3c3a46c5af42..60e687da7760 100644
--- a/fs/crypto/inline_crypt.c
+++ b/fs/crypto/block.c
@@ -1,22 +1,22 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Inline encryption support for fscrypt
+ * File contents en/decryption on block-based filesystems
*
* Copyright 2019 Google LLC
*/
/*
- * With "inline encryption", the block layer handles the decryption/encryption
- * as part of the bio, instead of the filesystem doing the crypto itself via
- * crypto API. See Documentation/block/inline-encryption.rst. fscrypt still
- * provides the key and IV to use.
+ * This file implements fscrypt's file contents en/decryption using blk-crypto
+ * (Documentation/block/inline-encryption.rst). fscrypt assigns a bio_crypt_ctx
+ * with a key and IV to each bio, and the block layer does the en/decryption.
+ *
+ * This file's exported functions are called only by block-based filesystems.
*/
#include <linux/blk-crypto.h>
#include <linux/blkdev.h>
-#include <linux/buffer_head.h>
#include <linux/export.h>
#include <linux/sched/mm.h>
#include <linux/slab.h>
#include <linux/uio.h>
@@ -338,5 +338,89 @@ u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, u64 nr_blocks)
dun = ci->ci_hashed_ino + lblk;
return min_t(u64, nr_blocks, (u64)U32_MAX + 1 - dun);
}
EXPORT_SYMBOL_GPL(fscrypt_limit_io_blocks);
+
+struct fscrypt_zero_done {
+ atomic_t pending;
+ blk_status_t status;
+ struct completion done;
+};
+
+static void fscrypt_zeroout_range_done(struct fscrypt_zero_done *done)
+{
+ if (atomic_dec_and_test(&done->pending))
+ complete(&done->done);
+}
+
+static void fscrypt_zeroout_range_end_io(struct bio *bio)
+{
+ struct fscrypt_zero_done *done = bio->bi_private;
+
+ if (bio->bi_status)
+ cmpxchg(&done->status, 0, bio->bi_status);
+ fscrypt_zeroout_range_done(done);
+ bio_put(bio);
+}
+
+/**
+ * fscrypt_zeroout_range() - zero out a range of blocks in an encrypted file
+ * @inode: the file's inode
+ * @pos: the first file position (in bytes) to zero out
+ * @sector: the first sector to zero out
+ * @len: bytes to zero out
+ *
+ * Zero out filesystem blocks in an encrypted regular file on-disk, i.e. write
+ * ciphertext blocks which decrypt to the all-zeroes block. The blocks must be
+ * both logically and physically contiguous. It's also assumed that the
+ * filesystem only uses a single block device, ->s_bdev. @len must be a
+ * multiple of the file system logical block size.
+ *
+ * Note that since each block uses a different IV, this involves writing a
+ * different ciphertext to each block; we can't simply reuse the same one.
+ *
+ * Return: 0 on success; -errno on failure.
+ */
+int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
+ sector_t sector, u64 len)
+{
+ struct fscrypt_zero_done done = {
+ .pending = ATOMIC_INIT(1),
+ .done = COMPLETION_INITIALIZER_ONSTACK(done.done),
+ };
+
+ if (len == 0)
+ return 0;
+
+ do {
+ struct bio *bio;
+ unsigned int n;
+
+ bio = bio_alloc(inode->i_sb->s_bdev, BIO_MAX_VECS, REQ_OP_WRITE,
+ GFP_NOFS);
+ bio->bi_iter.bi_sector = sector;
+ bio->bi_private = &done;
+ bio->bi_end_io = fscrypt_zeroout_range_end_io;
+ fscrypt_set_bio_crypt_ctx(bio, inode, pos, GFP_NOFS);
+
+ for (n = 0; n < BIO_MAX_VECS; n++) {
+ unsigned int bytes_this_page = min(len, PAGE_SIZE);
+
+ __bio_add_page(bio, ZERO_PAGE(0), bytes_this_page, 0);
+ len -= bytes_this_page;
+ pos += bytes_this_page;
+ sector += (bytes_this_page >> SECTOR_SHIFT);
+ if (!len || !fscrypt_mergeable_bio(bio, inode, pos))
+ break;
+ }
+
+ atomic_inc(&done.pending);
+ blk_crypto_submit_bio(bio);
+ } while (len);
+
+ fscrypt_zeroout_range_done(&done);
+
+ wait_for_completion(&done.done);
+ return blk_status_to_errno(done.status);
+}
+EXPORT_SYMBOL(fscrypt_zeroout_range);
diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h
index da9040407d4a..74329e0953d1 100644
--- a/fs/crypto/fscrypt_private.h
+++ b/fs/crypto/fscrypt_private.h
@@ -393,11 +393,11 @@ void fscrypt_init_hkdf(struct hmac_sha512_key *hkdf, const u8 *master_key,
void fscrypt_hkdf_expand(const struct hmac_sha512_key *hkdf, u8 context,
const u8 *info, unsigned int infolen,
u8 *okm, unsigned int okmlen);
-/* inline_crypt.c */
+/* block.c */
#ifdef CONFIG_FS_ENCRYPTION_INLINE_CRYPT
static inline bool
fscrypt_using_inline_encryption(const struct fscrypt_inode_info *ci)
{
const struct inode *inode = ci->ci_inode;
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index acf5b28eb9d7..52ff014aeae6 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -444,14 +444,10 @@ int fscrypt_fname_disk_to_usr(const struct inode *inode,
struct fscrypt_str *oname);
bool fscrypt_match_name(const struct fscrypt_name *fname,
const u8 *de_name, u32 de_name_len);
u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name);
-/* bio.c */
-int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
- sector_t sector, u64 len);
-
/* hooks.c */
int fscrypt_file_open(struct inode *inode, struct file *filp);
int __fscrypt_prepare_link(struct inode *inode, struct inode *dir,
struct dentry *dentry);
int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry,
@@ -735,18 +731,10 @@ static inline int fscrypt_d_revalidate(struct inode *dir, const struct qstr *nam
struct dentry *dentry, unsigned int flags)
{
return 1;
}
-/* bio.c */
-
-static inline int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
- sector_t sector, u64 len)
-{
- return -EOPNOTSUPP;
-}
-
/* hooks.c */
static inline int fscrypt_file_open(struct inode *inode, struct file *filp)
{
if (IS_ENCRYPTED(inode))
@@ -842,20 +830,22 @@ static inline void fscrypt_set_ops(struct super_block *sb,
{
}
#endif /* !CONFIG_FS_ENCRYPTION */
-/* inline_crypt.c */
+/* block.c */
#ifdef CONFIG_FS_ENCRYPTION_INLINE_CRYPT
void fscrypt_set_bio_crypt_ctx(struct bio *bio, const struct inode *inode,
loff_t pos, gfp_t gfp_mask);
bool fscrypt_mergeable_bio(struct bio *bio, const struct inode *inode,
loff_t pos);
u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, u64 nr_blocks);
+int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
+ sector_t sector, u64 len);
#else /* CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
static inline void fscrypt_set_bio_crypt_ctx(struct bio *bio,
const struct inode *inode,
@@ -871,10 +861,16 @@ static inline bool fscrypt_mergeable_bio(struct bio *bio,
static inline u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk,
u64 nr_blocks)
{
return nr_blocks;
}
+
+static inline int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
+ sector_t sector, u64 len)
+{
+ return -EOPNOTSUPP;
+}
#endif /* !CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
/**
* fscrypt_has_encryption_key() - check whether an inode has had its key set up
* @inode: the inode to check
--
2.54.0
^ permalink raw reply related
* [PATCH 14/16] fscrypt: Remove unused functions and workqueue
From: Eric Biggers @ 2026-06-24 5:03 UTC (permalink / raw)
To: linux-fscrypt
Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, linux-block,
Christoph Hellwig, Theodore Ts'o, Andreas Dilger, Baokun Li,
Jan Kara, Ojaswin Mujoo, Ritesh Harjani, Zhang Yi, Jaegeuk Kim,
Chao Yu, Eric Biggers
In-Reply-To: <20260624050334.124606-1-ebiggers@kernel.org>
Remove functions that are no longer used:
- fscrypt_decrypt_bio()
- fscrypt_decrypt_pagecache_blocks()
- fscrypt_inode_uses_fs_layer_crypto()
- fscrypt_inode_uses_inline_crypto()
- fscrypt_enqueue_decrypt_work()
This makes the decryption workqueue unused, so remove it too.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/crypto/bio.c | 32 --------------------
fs/crypto/crypto.c | 65 -----------------------------------------
include/linux/fscrypt.h | 47 -----------------------------
3 files changed, 144 deletions(-)
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
index 58b6b13eeedd..db095258cfca 100644
--- a/fs/crypto/bio.c
+++ b/fs/crypto/bio.c
@@ -13,42 +13,10 @@
#include <linux/namei.h>
#include <linux/pagemap.h>
#include "fscrypt_private.h"
-/**
- * fscrypt_decrypt_bio() - decrypt the contents of a bio
- * @bio: the bio to decrypt
- *
- * Decrypt the contents of a "read" bio following successful completion of the
- * underlying disk read. The bio must be reading a whole number of blocks of an
- * encrypted file directly into the page cache. If the bio is reading the
- * ciphertext into bounce pages instead of the page cache (for example, because
- * the file is also compressed, so decompression is required after decryption),
- * then this function isn't applicable. This function may sleep, so it must be
- * called from a workqueue rather than from the bio's bi_end_io callback.
- *
- * Return: %true on success; %false on failure. On failure, bio->bi_status is
- * also set to an error status.
- */
-bool fscrypt_decrypt_bio(struct bio *bio)
-{
- struct folio_iter fi;
-
- bio_for_each_folio_all(fi, bio) {
- int err = fscrypt_decrypt_pagecache_blocks(fi.folio, fi.length,
- fi.offset);
-
- if (err) {
- bio->bi_status = errno_to_blk_status(err);
- return false;
- }
- }
- return true;
-}
-EXPORT_SYMBOL(fscrypt_decrypt_bio);
-
struct fscrypt_zero_done {
atomic_t pending;
blk_status_t status;
struct completion done;
};
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index 8c4660429418..27663f4d8705 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -36,21 +36,14 @@ module_param(num_prealloc_crypto_pages, uint, 0444);
MODULE_PARM_DESC(num_prealloc_crypto_pages,
"Number of crypto pages to preallocate");
static mempool_t *fscrypt_bounce_page_pool = NULL;
-static struct workqueue_struct *fscrypt_read_workqueue;
static DEFINE_MUTEX(fscrypt_init_mutex);
struct kmem_cache *fscrypt_inode_info_cachep;
-void fscrypt_enqueue_decrypt_work(struct work_struct *work)
-{
- queue_work(fscrypt_read_workqueue, work);
-}
-EXPORT_SYMBOL(fscrypt_enqueue_decrypt_work);
-
static struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags)
{
if (WARN_ON_ONCE(!fscrypt_bounce_page_pool)) {
/*
* Oops, the filesystem called a function that uses the bounce
@@ -236,54 +229,10 @@ int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
FS_ENCRYPT, lblk_num, page, page, len,
offs);
}
EXPORT_SYMBOL(fscrypt_encrypt_block_inplace);
-/**
- * fscrypt_decrypt_pagecache_blocks() - Decrypt data from a pagecache folio
- * @folio: the pagecache folio containing the data to decrypt
- * @len: size of the data to decrypt, in bytes
- * @offs: offset within @folio of the data to decrypt, in bytes
- *
- * Decrypt data that has just been read from an encrypted file. The data must
- * be located in a pagecache folio that is still locked and not yet uptodate.
- * The length and offset of the data must be aligned to the file's crypto data
- * unit size. Alignment to the filesystem block size fulfills this requirement,
- * as the filesystem block size is always a multiple of the data unit size.
- *
- * Return: 0 on success; -errno on failure
- */
-int fscrypt_decrypt_pagecache_blocks(struct folio *folio, size_t len,
- size_t offs)
-{
- const struct inode *inode = folio->mapping->host;
- const struct fscrypt_inode_info *ci = fscrypt_get_inode_info_raw(inode);
- const unsigned int du_bits = ci->ci_data_unit_bits;
- const unsigned int du_size = 1U << du_bits;
- u64 index = ((u64)folio->index << (PAGE_SHIFT - du_bits)) +
- (offs >> du_bits);
- size_t i;
- int err;
-
- if (WARN_ON_ONCE(!folio_test_locked(folio)))
- return -EINVAL;
-
- if (WARN_ON_ONCE(len <= 0 || !IS_ALIGNED(len | offs, du_size)))
- return -EINVAL;
-
- for (i = offs; i < offs + len; i += du_size, index++) {
- struct page *page = folio_page(folio, i >> PAGE_SHIFT);
-
- err = fscrypt_crypt_data_unit(ci, FS_DECRYPT, index, page,
- page, du_size, i & ~PAGE_MASK);
- if (err)
- return err;
- }
- return 0;
-}
-EXPORT_SYMBOL(fscrypt_decrypt_pagecache_blocks);
-
/**
* fscrypt_decrypt_block_inplace() - Decrypt a filesystem block in-place
* @inode: The inode to which this block belongs
* @page: The page containing the block to decrypt
* @len: Size of block to decrypt. This must be a multiple of
@@ -369,24 +318,10 @@ void fscrypt_msg(const struct inode *inode, const char *level,
va_end(args);
}
static int __init fscrypt_init(void)
{
- /*
- * Use an unbound workqueue to allow bios to be decrypted in parallel
- * even when they happen to complete on the same CPU. This sacrifices
- * locality, but it's worthwhile since decryption is CPU-intensive.
- *
- * Also use a high-priority workqueue to prioritize decryption work,
- * which blocks reads from completing, over regular application tasks.
- */
- fscrypt_read_workqueue = alloc_workqueue("fscrypt_read_queue",
- WQ_UNBOUND | WQ_HIGHPRI,
- num_online_cpus());
- if (!fscrypt_read_workqueue)
- panic("failed to allocate fscrypt_read_queue");
-
fscrypt_inode_info_cachep = KMEM_CACHE(fscrypt_inode_info,
SLAB_RECLAIM_ACCOUNT |
SLAB_PANIC);
fscrypt_init_keyring();
return 0;
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index 43bafdd67dd7..acf5b28eb9d7 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -341,20 +341,17 @@ static inline void fscrypt_prepare_dentry(struct dentry *dentry,
spin_unlock(&dentry->d_lock);
}
}
/* crypto.c */
-void fscrypt_enqueue_decrypt_work(struct work_struct *);
struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio,
size_t len, size_t offs, gfp_t gfp_flags);
int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
unsigned int len, unsigned int offs,
u64 lblk_num);
-int fscrypt_decrypt_pagecache_blocks(struct folio *folio, size_t len,
- size_t offs);
int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
unsigned int len, unsigned int offs,
u64 lblk_num);
static inline bool fscrypt_is_bounce_page(struct page *page)
@@ -448,11 +445,10 @@ int fscrypt_fname_disk_to_usr(const struct inode *inode,
bool fscrypt_match_name(const struct fscrypt_name *fname,
const u8 *de_name, u32 de_name_len);
u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name);
/* bio.c */
-bool fscrypt_decrypt_bio(struct bio *bio);
int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
sector_t sector, u64 len);
/* hooks.c */
int fscrypt_file_open(struct inode *inode, struct file *filp);
@@ -508,13 +504,10 @@ static inline void fscrypt_prepare_dentry(struct dentry *dentry,
bool is_nokey_name)
{
}
/* crypto.c */
-static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work)
-{
-}
static inline struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio,
size_t len, size_t offs, gfp_t gfp_flags)
{
return ERR_PTR(-EOPNOTSUPP);
@@ -526,16 +519,10 @@ static inline int fscrypt_encrypt_block_inplace(const struct inode *inode,
unsigned int offs, u64 lblk_num)
{
return -EOPNOTSUPP;
}
-static inline int fscrypt_decrypt_pagecache_blocks(struct folio *folio,
- size_t len, size_t offs)
-{
- return -EOPNOTSUPP;
-}
-
static inline int fscrypt_decrypt_block_inplace(const struct inode *inode,
struct page *page,
unsigned int len,
unsigned int offs, u64 lblk_num)
{
@@ -749,14 +736,10 @@ static inline int fscrypt_d_revalidate(struct inode *dir, const struct qstr *nam
{
return 1;
}
/* bio.c */
-static inline bool fscrypt_decrypt_bio(struct bio *bio)
-{
- return true;
-}
static inline int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
sector_t sector, u64 len)
{
return -EOPNOTSUPP;
@@ -890,40 +873,10 @@ static inline u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk,
{
return nr_blocks;
}
#endif /* !CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
-/**
- * fscrypt_inode_uses_inline_crypto() - test whether an inode uses inline
- * encryption
- * @inode: an inode. If encrypted, its key must be set up.
- *
- * Return: true if the inode requires file contents encryption and if the
- * encryption should be done in the block layer via blk-crypto rather
- * than in the filesystem layer.
- */
-static inline bool fscrypt_inode_uses_inline_crypto(const struct inode *inode)
-{
- return fscrypt_needs_contents_encryption(inode) &&
- inode->i_sb->s_cop->is_block_based;
-}
-
-/**
- * fscrypt_inode_uses_fs_layer_crypto() - test whether an inode uses fs-layer
- * encryption
- * @inode: an inode. If encrypted, its key must be set up.
- *
- * Return: true if the inode requires file contents encryption and if the
- * encryption should be done in the filesystem layer rather than in the
- * block layer via blk-crypto.
- */
-static inline bool fscrypt_inode_uses_fs_layer_crypto(const struct inode *inode)
-{
- return fscrypt_needs_contents_encryption(inode) &&
- !inode->i_sb->s_cop->is_block_based;
-}
-
/**
* fscrypt_has_encryption_key() - check whether an inode has had its key set up
* @inode: the inode to check
*
* Return: %true if the inode has had its encryption key set up, else %false.
--
2.54.0
^ permalink raw reply related
* [PATCH 13/16] fscrypt: Remove fs-layer zeroout code
From: Eric Biggers @ 2026-06-24 5:03 UTC (permalink / raw)
To: linux-fscrypt
Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, linux-block,
Christoph Hellwig, Theodore Ts'o, Andreas Dilger, Baokun Li,
Jan Kara, Ojaswin Mujoo, Ritesh Harjani, Zhang Yi, Jaegeuk Kim,
Chao Yu, Eric Biggers
In-Reply-To: <20260624050334.124606-1-ebiggers@kernel.org>
Now that fscrypt's file contents en/decryption is always implemented
using blk-crypto when the filesystem is block-based, the fs-layer
zeroout code in fs/crypto/bio.c is unused code. Remove it, then fold
fscrypt_zeroout_range_inline_crypt() into fscrypt_zeroout_range().
Then make fscrypt_alloc_bounce_page() and fscrypt_crypt_data_unit()
static, since they're no longer called from any other file.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/crypto/bio.c | 134 +++++++-----------------------------
fs/crypto/crypto.c | 14 ++--
fs/crypto/fscrypt_private.h | 5 --
3 files changed, 32 insertions(+), 121 deletions(-)
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
index d07740680602..58b6b13eeedd 100644
--- a/fs/crypto/bio.c
+++ b/fs/crypto/bio.c
@@ -67,20 +67,40 @@ static void fscrypt_zeroout_range_end_io(struct bio *bio)
cmpxchg(&done->status, 0, bio->bi_status);
fscrypt_zeroout_range_done(done);
bio_put(bio);
}
-static int fscrypt_zeroout_range_inline_crypt(const struct inode *inode,
- loff_t pos, sector_t sector,
- u64 len)
+/**
+ * fscrypt_zeroout_range() - zero out a range of blocks in an encrypted file
+ * @inode: the file's inode
+ * @pos: the first file position (in bytes) to zero out
+ * @sector: the first sector to zero out
+ * @len: bytes to zero out
+ *
+ * Zero out filesystem blocks in an encrypted regular file on-disk, i.e. write
+ * ciphertext blocks which decrypt to the all-zeroes block. The blocks must be
+ * both logically and physically contiguous. It's also assumed that the
+ * filesystem only uses a single block device, ->s_bdev. @len must be a
+ * multiple of the file system logical block size.
+ *
+ * Note that since each block uses a different IV, this involves writing a
+ * different ciphertext to each block; we can't simply reuse the same one.
+ *
+ * Return: 0 on success; -errno on failure.
+ */
+int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
+ sector_t sector, u64 len)
{
struct fscrypt_zero_done done = {
.pending = ATOMIC_INIT(1),
.done = COMPLETION_INITIALIZER_ONSTACK(done.done),
};
- while (len) {
+ if (len == 0)
+ return 0;
+
+ do {
struct bio *bio;
unsigned int n;
bio = bio_alloc(inode->i_sb->s_bdev, BIO_MAX_VECS, REQ_OP_WRITE,
GFP_NOFS);
@@ -100,117 +120,13 @@ static int fscrypt_zeroout_range_inline_crypt(const struct inode *inode,
break;
}
atomic_inc(&done.pending);
blk_crypto_submit_bio(bio);
- }
+ } while (len);
fscrypt_zeroout_range_done(&done);
wait_for_completion(&done.done);
return blk_status_to_errno(done.status);
}
-
-/**
- * fscrypt_zeroout_range() - zero out a range of blocks in an encrypted file
- * @inode: the file's inode
- * @pos: the first file position (in bytes) to zero out
- * @sector: the first sector to zero out
- * @len: bytes to zero out
- *
- * Zero out filesystem blocks in an encrypted regular file on-disk, i.e. write
- * ciphertext blocks which decrypt to the all-zeroes block. The blocks must be
- * both logically and physically contiguous. It's also assumed that the
- * filesystem only uses a single block device, ->s_bdev. @len must be a
- * multiple of the file system logical block size.
- *
- * Note that since each block uses a different IV, this involves writing a
- * different ciphertext to each block; we can't simply reuse the same one.
- *
- * Return: 0 on success; -errno on failure.
- */
-int fscrypt_zeroout_range(const struct inode *inode, loff_t pos,
- sector_t sector, u64 len)
-{
- const struct fscrypt_inode_info *ci = fscrypt_get_inode_info_raw(inode);
- const unsigned int du_bits = ci->ci_data_unit_bits;
- const unsigned int du_size = 1U << du_bits;
- const unsigned int du_per_page_bits = PAGE_SHIFT - du_bits;
- const unsigned int du_per_page = 1U << du_per_page_bits;
- u64 du_index = pos >> du_bits;
- u64 du_remaining = len >> du_bits;
- struct page *pages[16]; /* write up to 16 pages at a time */
- unsigned int nr_pages;
- unsigned int i;
- unsigned int offset;
- struct bio *bio;
- int ret, err;
-
- if (len == 0)
- return 0;
-
- if (fscrypt_inode_uses_inline_crypto(inode))
- return fscrypt_zeroout_range_inline_crypt(inode, pos, sector,
- len);
-
- BUILD_BUG_ON(ARRAY_SIZE(pages) > BIO_MAX_VECS);
- nr_pages = min_t(u64, ARRAY_SIZE(pages),
- (du_remaining + du_per_page - 1) >> du_per_page_bits);
-
- /*
- * We need at least one page for ciphertext. Allocate the first one
- * from a mempool, with __GFP_DIRECT_RECLAIM set so that it can't fail.
- *
- * Any additional page allocations are allowed to fail, as they only
- * help performance, and waiting on the mempool for them could deadlock.
- */
- for (i = 0; i < nr_pages; i++) {
- pages[i] = fscrypt_alloc_bounce_page(i == 0 ? GFP_NOFS :
- GFP_NOWAIT);
- if (!pages[i])
- break;
- }
- nr_pages = i;
- if (WARN_ON_ONCE(nr_pages <= 0))
- return -EINVAL;
-
- /* This always succeeds since __GFP_DIRECT_RECLAIM is set. */
- bio = bio_alloc(inode->i_sb->s_bdev, nr_pages, REQ_OP_WRITE, GFP_NOFS);
-
- do {
- bio->bi_iter.bi_sector = sector;
-
- i = 0;
- offset = 0;
- do {
- err = fscrypt_crypt_data_unit(ci, FS_ENCRYPT, du_index,
- ZERO_PAGE(0), pages[i],
- du_size, offset);
- if (err)
- goto out;
- du_index++;
- sector += 1U << (du_bits - SECTOR_SHIFT);
- du_remaining--;
- offset += du_size;
- if (offset == PAGE_SIZE || du_remaining == 0) {
- ret = bio_add_page(bio, pages[i++], offset, 0);
- if (WARN_ON_ONCE(ret != offset)) {
- err = -EIO;
- goto out;
- }
- offset = 0;
- }
- } while (i != nr_pages && du_remaining != 0);
-
- err = submit_bio_wait(bio);
- if (err)
- goto out;
- bio_reset(bio, inode->i_sb->s_bdev, REQ_OP_WRITE);
- } while (du_remaining != 0);
- err = 0;
-out:
- bio_put(bio);
- for (i = 0; i < nr_pages; i++)
- fscrypt_free_bounce_page(pages[i]);
- return err;
-}
EXPORT_SYMBOL(fscrypt_zeroout_range);
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index 94dd6c89ddcd..8c4660429418 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -47,11 +47,11 @@ void fscrypt_enqueue_decrypt_work(struct work_struct *work)
{
queue_work(fscrypt_read_workqueue, work);
}
EXPORT_SYMBOL(fscrypt_enqueue_decrypt_work);
-struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags)
+static struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags)
{
if (WARN_ON_ONCE(!fscrypt_bounce_page_pool)) {
/*
* Oops, the filesystem called a function that uses the bounce
* page pool, but it didn't set needs_bounce_pages.
@@ -63,12 +63,11 @@ struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags)
/**
* fscrypt_free_bounce_page() - free a ciphertext bounce page
* @bounce_page: the bounce page to free, or NULL
*
- * Free a bounce page that was allocated by fscrypt_encrypt_pagecache_blocks(),
- * or by fscrypt_alloc_bounce_page() directly.
+ * Free a bounce page that was allocated by fscrypt_encrypt_pagecache_blocks().
*/
void fscrypt_free_bounce_page(struct page *bounce_page)
{
if (!bounce_page)
return;
@@ -105,14 +104,15 @@ void fscrypt_generate_iv(union fscrypt_iv *iv, u64 index,
}
iv->index = cpu_to_le64(index);
}
/* Encrypt or decrypt a single "data unit" of file contents. */
-int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
- fscrypt_direction_t rw, u64 index,
- struct page *src_page, struct page *dest_page,
- unsigned int len, unsigned int offs)
+static int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
+ fscrypt_direction_t rw, u64 index,
+ struct page *src_page,
+ struct page *dest_page, unsigned int len,
+ unsigned int offs)
{
struct crypto_sync_skcipher *tfm = ci->ci_enc_key.tfm;
SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
union fscrypt_iv iv;
struct scatterlist dst, src;
diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h
index 57b7ae2cfafc..da9040407d4a 100644
--- a/fs/crypto/fscrypt_private.h
+++ b/fs/crypto/fscrypt_private.h
@@ -327,15 +327,10 @@ typedef enum {
} fscrypt_direction_t;
/* crypto.c */
extern struct kmem_cache *fscrypt_inode_info_cachep;
int fscrypt_initialize(struct super_block *sb);
-int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
- fscrypt_direction_t rw, u64 index,
- struct page *src_page, struct page *dest_page,
- unsigned int len, unsigned int offs);
-struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags);
void __printf(3, 4) __cold
fscrypt_msg(const struct inode *inode, const char *level, const char *fmt, ...);
#define fscrypt_warn(inode, fmt, ...) \
--
2.54.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox