Crash in part_round_stats() because gendisk->disk_part_tbl->last_lookup retains pointer to a freed address after partition deletion

Solution Verified - Updated -

Issue

The system crashes with system panic and the kernel stack trace that looks like this:

crash64> bt
PID: 115818  TASK: ffff8faf04ffe300  CPU: 129  COMMAND: "vxiod"
 #0 [ffff8f6cb2fef860] machine_kexec at ffffffffbd266294
 #1 [ffff8f6cb2fef8c0] __crash_kexec at ffffffffbd322562
 #2 [ffff8f6cb2fef990] crash_kexec at ffffffffbd322650
 #3 [ffff8f6cb2fef9a8] oops_end at ffffffffbd98b798
 #4 [ffff8f6cb2fef9d0] no_context at ffffffffbd275d14
 #5 [ffff8f6cb2fefa20] __bad_area_nosemaphore at ffffffffbd275fe2
 #6 [ffff8f6cb2fefa70] bad_area_nosemaphore at ffffffffbd276104
 #7 [ffff8f6cb2fefa80] __do_page_fault at ffffffffbd98e750
 #8 [ffff8f6cb2fefaf0] do_page_fault at ffffffffbd98e975
 #9 [ffff8f6cb2fefb20] page_fault at ffffffffbd98a778
    [exception RIP: part_round_stats+92]
    RIP: ffffffffbd552cbc  RSP: ffff8f6cb2fefbd8  RFLAGS: 00010086
    RAX: 0000000000000001  RBX: ffff8fcba07a3400  RCX: 0000100000000000
    RDX: 0000000000000032  RSI: 0000000000000081  RDI: ffff8f6d05399d40
    RBP: ffff8f6cb2fefc10   R8: ffff8f6cc4bc2f00   R9: 0000000000000000
    R10: ffff920fdbe18800  R11: 0000027b2e332000  R12: 000000028407783f
    R13: ffff8fcba07a3401  R14: 0000000000000081  R15: 00000fffffffff90
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
#10 [ffff8f6cb2fefc18] blk_account_io_start at ffffffffbd556107
#11 [ffff8f6cb2fefc48] blk_queue_bio at ffffffffbd5571cd
#12 [ffff8f6cb2fefc98] generic_make_request at ffffffffbd555167
#13 [ffff8f6cb2fefcf0] vxvm_submit_diskio at ffffffffc0ea0eba [vxio]
#14 [ffff8f6cb2fefd88] voldmp_strategy at ffffffffc0e936fb [vxio]
#15 [ffff8f6cb2fefd98] vol_dev_strategy at ffffffffc0e9b631 [vxio]
#16 [ffff8f6cb2fefda8] voldiskiostart at ffffffffc0ea089b [vxio]
#17 [ffff8f6cb2fefe10] vol_subdisksio_start at ffffffffc0f1155a [vxio]
#18 [ffff8f6cb2fefe48] voliod_iohandle at ffffffffc0eca524 [vxio]
#19 [ffff8f6cb2fefe88] voliod_loop at ffffffffc0eca86c [vxio]
#20 [ffff8f6cb2fefec8] kthread at ffffffffbd2c5c21

Environment

  • Red Hat Enterprise Linux 7 (detected in kernel 3.10.0-1160.2.2.el7.x86_64, but every RHEL 7 kernel is exposed to this problem)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content