==================================================================
BUG: KASAN: slab-use-after-free in notifier_call_chain+0x9f/0x3d0
Read of size 8 at addr ffff888113b705a0 by task kworker/u8:1/13

CPU: 0 UID: 0 PID: 13 Comm: kworker/u8:1 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 notifier_call_chain+0x9f/0x3d0
 call_netdevice_notifiers_info+0x8c/0x100
 __netdev_upper_dev_unlink+0x19c/0x780
 netdev_upper_dev_unlink+0x99/0xe0
 default_device_exit_batch+0x498/0x760
 ops_undo_list+0x4d7/0x8f0
 cleanup_net+0x572/0x810
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 5616:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kvmalloc_node_noprof+0x50a/0x820
 __devlink_alloc+0x70/0x9f0
 nsim_drv_probe+0xe7/0xbb0
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x270/0x410
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2bd/0x430
 device_initial_probe+0x9c/0x100
 __bus_probe_device+0x126/0x220
 device_add+0x7d7/0xb80
 new_device_store+0x3a4/0x6c0
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 1293:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xd3c/0x1360
 rcu_work_rcufn+0x75/0x90
 rcu_core+0x92e/0x1230
 handle_softirqs+0x265/0x8d0
 run_ksoftirqd+0x36/0x60
 smpboot_thread_fn+0x5f8/0xb30
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0x86/0x300
 queue_rcu_work+0xe7/0x160
 nsim_drv_remove+0x146/0x170
 device_release_driver_internal+0x42b/0x7d0
 bus_remove_device+0x444/0x560
 device_del+0x524/0x8f0
 device_unregister+0x21/0xf0
 del_device_store+0x2b5/0x370
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888113b70000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1440 bytes inside of
 freed 2048-byte region [ffff888113b70000, ffff888113b70800)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113b70
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x17ff00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000040 ffff888100042000 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 017ff00000000040 ffff888100042000 dead000000000100 dead000000000122
head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000
head: 017ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5050, tgid 5050 (klogd), ts 16627547733
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2224/0x2290
 __alloc_frozen_pages_noprof+0x1fe/0x410
 allocate_slab+0x7d/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_cache_noprof+0x396/0x600
 syslog_print+0x103/0x610
 do_syslog+0x583/0x7d0
 __x64_sys_syslog+0x7c/0x90
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888113b70480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888113b70500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888113b70580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff888113b70600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888113b70680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
