Unable to handle kernel NULL pointer dereference in uart_write_room() or uart_throttle().

Solution Verified - Updated -

Issue

  • Unable to handle kernel NULL pointer dereference in uart_write_room() or uart_throttle():
PID: 12345  TASK: ffff9bf34da44f10  CPU: 3   COMMAND: "kworker/3:1"
 #0 [ffff9bf78eecb988] machine_kexec at ffffffff90062a0a
 #1 [ffff9bf78eecb9e8] __crash_kexec at ffffffff901166c2
 #2 [ffff9bf78eecbab8] crash_kexec at ffffffff901167b0
 #3 [ffff9bf78eecbad0] oops_end at ffffffff9071d728
 #4 [ffff9bf78eecbaf8] no_context at ffffffff9070c84d
 #5 [ffff9bf78eecbb48] __bad_area_nosemaphore at ffffffff9070c8e4
 #6 [ffff9bf78eecbb98] bad_area_nosemaphore at ffffffff9070ca55
 #7 [ffff9bf78eecbba8] __do_page_fault at ffffffff907206e0
 #8 [ffff9bf78eecbc10] do_page_fault at ffffffff907208d5
 #9 [ffff9bf78eecbc40] page_fault at ffffffff9071c758
    [exception RIP: uart_throttle+0x2d]
    RIP: ffffffff9044807d  RSP: ffff9bf78eecbcf0  RFLAGS: 00010246
    RAX: 0000000000000000  RBX: 0000000000000000  RCX: ffff9bf78eecbfd8
    RDX: 0000000000000cbd  RSI: 000000000000001d  RDI: ffff9bf3b4d21400
    RBP: ffff9bf78eecbd08   R8: 0000000000001000   R9: 9020eacc96cac560
    R10: 00000000000000fe  R11: 0000000000000246  R12: ffff9bf3b4d214a8
    R13: ffff9bf3b4d21400  R14: ffff9bf3b4d20000  R15: ffff9bf3b4d37828
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
#10 [ffff9bf78eecbd10] tty_throttle_safe at ffffffff9042fbc0
#11 [ffff9bf78eecbd38] n_tty_receive_buf at ffffffff9042e178
#12 [ffff9bf78eecbdd8] flush_to_ldisc at ffffffff90430e9f
#13 [ffff9bf78eecbe20] process_one_work at ffffffff900b613f
#14 [ffff9bf78eecbe68] worker_thread at ffffffff900b71d6
#15 [ffff9bf78eecbec8] kthread at ffffffff900bdf21

Or:

[  387.396347] CPU: 0 PID: 1234 Comm: kworker/0:4 Kdump: loaded Tainted: G           O   ------------   3.10.0-957.1.3.el7.x86_64 #1
[  387.535872] Hardware name: Cisco Systems, Inc. ENCS5412/K9/ENCS5412/K9, BIOS ENCS54_2.7.020620190951 02/06/2019
[  387.656676] Workqueue: events flush_to_ldisc
[  387.707878] task: ffff9a179a925140 ti: ffff9a1798688000 task.ti: ffff9a1798688000
[  387.797461] RIP: 0010:[<ffffffffa9e74b73>]  [<ffffffffa9e74b73>] uart_write_room+0x13/0x50
[  387.896523] RSP: 0018:ffff9a179868bc60  EFLAGS: 00010286
[  387.960099] RAX: 0000000000000800 RBX: 0000000000000073 RCX: ffff9a179868bfd8
[  388.045526] RDX: ffffffffa9e74b60 RSI: ffff9a171a605000 RDI: ffff9a171a605c00
[  388.130952] RBP: ffff9a179868bc70 R08: ffff9a171a605400 R09: 97a12ef99ac78000
[  388.216379] R10: 97a12ef99ac78000 R11: 0000000000000001 R12: 0000000000000000
[  388.301804] R13: ffff9a171a605c00 R14: ffff9a171a605000 R15: 0000000000000000
[  388.387230] FS:  0000000000000000(0000) GS:ffff9a179f000000(0000) knlGS:0000000000000000
[  388.484103] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  388.552882] CR2: 0000000000000150 CR3: 000000085a7c4000 CR4: 00000000003607f0
[  388.638309] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  388.723735] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  388.809157] Call Trace:
[  388.838406]  [<ffffffffa9e5c730>] tty_write_room+0x20/0x30
[  388.904067]  [<ffffffffa9e5966e>] process_echoes+0x6e/0x2e0
[  388.970770]  [<ffffffffa9e5b58f>] n_tty_receive_char+0x18f/0xe30
[  389.042676]  [<ffffffffa9e5c3dc>] n_tty_receive_buf+0x1ac/0x470
[  389.113543]  [<ffffffffa9e5f1ff>] flush_to_ldisc+0x10f/0x160
[  389.181283]  [<ffffffffa9ab9d4f>] process_one_work+0x17f/0x440
[  389.251101]  [<ffffffffa9abade6>] worker_thread+0x126/0x3c0
[  389.317804]  [<ffffffffa9abacc0>] ? manage_workers.isra.25+0x2a0/0x2a0
[  389.395948]  [<ffffffffa9ac1c31>] kthread+0xd1/0xe0
[  389.454327]  [<ffffffffa9ac1b60>] ? insert_kthread_work+0x40/0x40
[  389.527271]  [<ffffffffaa174c37>] ret_from_fork_nospec_begin+0x21/0x21
[  389.605417]  [<ffffffffa9ac1b60>] ? insert_kthread_work+0x40/0x40
[  389.678357] Code: 01 00 00 81 e3 ff 0f 00 00 e8 0a 56 2f 00 89 d8 5b 41 5c 5d c3 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 54 53 4c 8b a7 18 02 00 00 <49> 8b bc 24 50 01 00 00 e8 50 59 2f 00 41 8b 9c 24 48 01 00 00 
[  389.911336] RIP  [<ffffffffa9e74b73>] uart_write_room+0x13/0x50
[  389.984036]  RSP <ffff9a179868bc60>
[  390.027469] CR2: 0000000000000150

Environment

  • Red Hat Enterprise Linux (RHEL) 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In