BUG: unable to handle kernel NULL pointer dereference at 0000000000000002 PGD 52788067 P4D 52788067 PUD 890cf067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 18772 Comm: syz-executor.3 Not tainted 4.19.89-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:writeb arch/x86/include/asm/io.h:65 [inline] RIP: 0010:mem_serial_out+0x70/0x90 drivers/tty/serial/8250/8250_port.c:407 Code: e1 00 00 00 49 8d 7c 24 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 d3 e3 80 3c 02 00 75 19 48 63 db 49 03 5c 24 40 <44> 88 2b 5b 41 5c 41 5d 5d c3 e8 61 64 f1 fd eb c0 e8 ba 64 f1 fd RSP: 0018:ffff88804c42f830 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000 RDX: 1ffffffff16da402 RSI: ffffffff83b17456 RDI: ffffffff8b6d2010 RBP: ffff88804c42f848 R08: ffff88809e9f0500 R09: ffffed10148161ce R10: ffffed10148161cd R11: ffff8880a40b0e6b R12: ffffffff8b6d1fd0 R13: 0000000000000001 R14: ffffffff8b6d2120 R15: ffff8880a40b0b00 FS: 00007fc183d0c700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000002 CR3: 00000000798df000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: serial_out drivers/tty/serial/8250/8250.h:116 [inline] serial8250_clear_fifos.part.0+0x3a/0xb0 drivers/tty/serial/8250/8250_port.c:556 serial8250_clear_fifos drivers/tty/serial/8250/8250_port.c:555 [inline] serial8250_do_startup+0x440/0x1f90 drivers/tty/serial/8250/8250_port.c:2194 serial8250_startup+0x62/0x80 drivers/tty/serial/8250/8250_port.c:2406 uart_port_startup drivers/tty/serial/serial_core.c:218 [inline] uart_startup.part.0+0x488/0x970 drivers/tty/serial/serial_core.c:257 uart_startup drivers/tty/serial/serial_core.c:254 [inline] uart_set_info drivers/tty/serial/serial_core.c:997 [inline] uart_set_info_user drivers/tty/serial/serial_core.c:1025 [inline] uart_ioctl+0x15ec/0x2a50 drivers/tty/serial/serial_core.c:1348 tty_ioctl+0x7f3/0x1510 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688 ksys_ioctl+0xab/0xd0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a919 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc183d0bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a919 RDX: 0000000020000240 RSI: 000000000000541f RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc183d0c6d4 R13: 00000000004c5e21 R14: 00000000004dc170 R15: 00000000ffffffff Modules linked in: CR2: 0000000000000002 kobject: 'loop5' (000000002b732212): kobject_uevent_env kobject: 'loop5' (000000002b732212): fill_kobj_path: path = '/devices/virtual/block/loop5' ---[ end trace acc601f9c2623b8c ]--- RIP: 0010:writeb arch/x86/include/asm/io.h:65 [inline] RIP: 0010:mem_serial_out+0x70/0x90 drivers/tty/serial/8250/8250_port.c:407 Code: e1 00 00 00 49 8d 7c 24 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 d3 e3 80 3c 02 00 75 19 48 63 db 49 03 5c 24 40 <44> 88 2b 5b 41 5c 41 5d 5d c3 e8 61 64 f1 fd eb c0 e8 ba 64 f1 fd RSP: 0018:ffff88804c42f830 EFLAGS: 00010202 kobject: 'loop0' (000000000fefbe46): kobject_uevent_env kobject: 'loop0' (000000000fefbe46): fill_kobj_path: path = '/devices/virtual/block/loop0' RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000 kobject: 'loop5' (000000002b732212): kobject_uevent_env kobject: 'loop5' (000000002b732212): fill_kobj_path: path = '/devices/virtual/block/loop5' RDX: 1ffffffff16da402 RSI: ffffffff83b17456 RDI: ffffffff8b6d2010 RBP: ffff88804c42f848 R08: ffff88809e9f0500 R09: ffffed10148161ce R10: ffffed10148161cd R11: ffff8880a40b0e6b R12: ffffffff8b6d1fd0 R13: 0000000000000001 R14: ffffffff8b6d2120 R15: ffff8880a40b0b00 FS: 00007fc183d0c700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 kobject: 'loop5' (000000002b732212): kobject_uevent_env kobject: 'loop5' (000000002b732212): fill_kobj_path: path = '/devices/virtual/block/loop5' CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d223000 CR3: 00000000798df000 CR4: 00000000001406f0 kobject: 'loop2' (0000000040351945): kobject_uevent_env kobject: 'loop2' (0000000040351945): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (000000000fefbe46): kobject_uevent_env kobject: 'loop0' (000000000fefbe46): fill_kobj_path: path = '/devices/virtual/block/loop0' DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kobject: 'loop5' (000000002b732212): kobject_uevent_env DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kobject: 'loop5' (000000002b732212): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (000000000fefbe46): kobject_uevent_env