Kernel panic accessing page_private data during writeback

Solution Verified - Updated -

Issue

  • Kernel BUG during writeback in Ext4
kernel BUG at fs/ext4/inode.c:2297!
invalid opcode: 0000 [#1] SMP
Modules linked in: vfat fat uas usb_storage ipheth binfmt_misc tcp_lp ext4 mbcache jbd2 xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun vmnet(OE) fuse vmw_vsock_vmci_transport vsock vmw_vmci vmmon(OE) ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter hp_wmi iTCO_wdt sparse_keymap gpio_ich iTCO_vendor_support ppdev rfkill intel_powerclamp coretemp kvm_intel kvm irqbypass snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel pcspkr snd_hda_codec sg snd_hda_core snd_hwdep lpc_ich snd_seq snd_seq_device snd_pcm parport_pc parport wmi snd_timer snd shpchp i7core_edac soundcore edac_core acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c firewire_sbp2 raid1 sd_mod crc_t10dif crct10dif_generic sr_mod cdrom crct10dif_common amdkfd amd_iommu_v2 radeon i2c_algo_bit drm_kms_helper crc32c_intel syscopyarea ahci sysfillrect serio_raw sysimgblt libahci fb_sys_fops ttm firewire_ohci libata tg3 firewire_core drm crc_itu_t ptp pps_core i2c_core floppy fjes dm_mirror dm_region_hash dm_log dm_mod 
CPU: 0 PID: 19179 Comm: kworker/u32:2 Tainted: G          IOE  ------------   3.10.0-514.2.2.el7.x86_64 #1
Hardware name: Hewlett-Packard HP Z400 Workstation/0B4Ch, BIOS 786G3 v03.12 09/13/2010
Workqueue: writeback bdi_writeback_workfn (flush-8:32)
task: ffff8805e2668000 ti: ffff8800a07b0000 task.ti: ffff8800a07b0000
RIP: 0010:[<ffffffffa0a0d365>]  [<ffffffffa0a0d365>] mpage_prepare_extent_to_map+0x2d5/0x2e0 [ext4]
RSP: 0018:ffff8800a07b39a0  EFLAGS: 00010246
RAX: 002fffff0000003d RBX: ffff8800a07b3a28 RCX: 00000000000f6280
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88062ff88ce8
RBP: ffff8800a07b3a78 R08: 0000000000000000 R09: 0000000000000000
R10: 57ffaf0c11bcff40 R11: 0000000000000008 R12: 0000000000005006
R13: 0000000000270d37 R14: ffffea0007dcdc00 R15: ffff8800a07b3b20
FS:  0000000000000000(0000) GS:ffff880617200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f9c0044dd5d CR3: 00000000019ba000 CR4: 00000000000007f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Stack:
 ffff8800a07b39e0 0000000000000000 ffff8804cb0e1648 ffff8800a07b3a48
 00000000000f63d7 000000000000000e 0000000000000000 ffffea0011b9b000
 ffffea00087bdd40 ffffea000d9ec980 ffffea0014dd0ac0 ffffea00022f4940
Call Trace:
 [<ffffffffa0a1187b>] ext4_writepages+0x45b/0xd60 [ext4]
 [<ffffffff8118d3ae>] do_writepages+0x1e/0x40
 [<ffffffff81228890>] __writeback_single_inode+0x40/0x210
 [<ffffffff8122957e>] writeback_sb_inodes+0x25e/0x420
 [<ffffffff812297df>] __writeback_inodes_wb+0x9f/0xd0
 [<ffffffff8122a023>] wb_writeback+0x263/0x2f0
 [<ffffffff812188ec>] ? get_nr_inodes+0x4c/0x70
 [<ffffffff8122c01b>] bdi_writeback_workfn+0x2cb/0x460
 [<ffffffff810a805b>] process_one_work+0x17b/0x470
 [<ffffffff810a8e96>] worker_thread+0x126/0x410
 [<ffffffff810a8d70>] ? rescuer_thread+0x460/0x460
 [<ffffffff810b064f>] kthread+0xcf/0xe0
 [<ffffffff810b0580>] ? kthread_create_on_node+0x140/0x140
 [<ffffffff81696618>] ret_from_fork+0x58/0x90
 [<ffffffff810b0580>] ? kthread_create_on_node+0x140/0x140
Code: ff ff ff e8 1e 29 78 e0 8b 85 40 ff ff ff eb c2 48 8d bd 50 ff ff ff e8 0a 29 78 e0 eb 8c 4c 89 f7 e8 c0 2c 77 e0 e9 d5 fe ff ff <0f> 0b 0f 0b e8 72 83 67 e0 66 90 66 66 66 66 90 55 48 89 e5 41
RIP  [<ffffffffa0a0d365>] mpage_prepare_extent_to_map+0x2d5/0x2e0 [ext4]
 RSP <ffff8800a07b39a0>
  • Kernel BUG during writeback in XFS
kernel BUG at fs/xfs/xfs_aops.c:809!
invalid opcode: 0000 [#1] SMP  
Modules linked in: uas snd_usb_audio usb_storage snd_usbmidi_lib snd_rawmidi macsec vsock_diag tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag tun drbg ansi_cprng ccm nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache tcp_lp rfcomm cmac vmnet(OE) ppdev parport_pc parport fuse vmw_vsock_vmci_transport vsock vmw_vmci vmmon(OE) bnep sunrpc dell_rbtn hid_alps iTCO_wdt iTCO_vendor_support dell_laptop arc4 mei_wdt dell_wmi dell_smbios intel_wmi_thunderbolt dell_wmi_descriptor dcdbas iwlmvm vfat fat snd_hda_codec_hdmi mac80211 intel_pmc_core intel_powerclamp coretemp intel_rapl kvm_intel snd_soc_skl dell_led kvm snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_soc_acpi snd_soc_core snd_compress irqbypass snd_hda_codec_realtek snd_hda_codec_generic iwlwifi crc32_pclmul snd_hda_intel snd_hda_codec ghash_clmulni_intel snd_hda_core snd_hwdep snd_seq aesni_intel lrw snd_seq_device gf128mul glue_helper ablk_helper cryptd snd_pcm btusb pcspkr btrtl btbcm cfg80211 btintel bluetooth snd_timer uvcvideo videobuf2_vmalloc snd i2c_i801 soundcore videobuf2_memops videobuf2_core videodev sg qcserial rtsx_pci_ms usb_wwan memstick mei_me joydev mei rfkill i2c_designware_platform idma64 i2c_designware_core virt_dma wmi pinctrl_sunrisepoint pinctrl_intel intel_hid acpi_pad sparse_keymap int3400_thermal binfmt_misc ip_tables xfs libc rc32c sd_mod crc_t10dif crct10dif_generic hid_multitouch cdc_mbim cdc_wdm rtsx_pci_sdmmc cdc_ncm mmc_core usbnet mii i915 i2c_algo_bit iosf_mbi drm_kms_helper crct10dif_pclmul crct10dif_common ahci syscopyarea sysfillrect sysimgblt fb_sys_fops e1000e libahci crc32c_intel drm serio_raw libata ptp pps_core rtsx_pci drm_panel_orientatio video dm_mirror dm_region_hash dm_log dm_mod
CPU: 0 PID: 20958 Comm: kworker/u8:2 Kdump: loaded Tainted: G           OE  ------------ T 3.10.0-957.21.2.el7.x86_64 #1
Hardware name: Dell Inc. Latitude 7480/00F6D3, BIOS 1.12.2 10/01/2018
Workqueue: writeback bdi_writeback_workfn (flush-253:3)
task: ffff97891f43c100 ti: ffff978c14600000 task.ti: ffff978c14600000
RIP: 0010:[<ffffffffc0707ba2>]  [<ffffffffc0707ba2>] xfs_do_writepage+0x3d2/0x510 [xfs]
RSP: 0018:ffff978c146039c0  EFLAGS: 00010246
RAX: 0000000000001000 RBX: 0000000200000000 RCX: 000000000000000c
RDX: 001fffff00000029 RSI: fffffd708123e180 RDI: 0000000109354000
RBP: ffff978c14603a30 R08: fffffffffffffff1 R09: 000000000001f6a0
R10: ffff978ebe7d9800 R11: 0000000000000000 R12: ffff978dfeb6f370
R13: ffff978dfeb6f220 R14: 0000000000000000 R15: ffff978c14603b48
FS:  0000000000000000(0000) GS:ffff978ebe400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f280131f000 CR3: 000000059e010000 CR4: 00000000003607f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 [<ffffffff863c25bc>] write_cache_pages+0x21c/0x470
 [<ffffffffc07077d0>] ? xfs_aops_discard_page+0x150/0x150 [xfs]
 [<ffffffffc07075cb>] xfs_vm_writepages+0x6b/0xa0 [xfs]
 [<ffffffff863c36d1>] do_writepages+0x21/0x50
 [<ffffffff864701b0>] __writeback_single_inode+0x40/0x260
 [<ffffffff86470c44>] writeback_sb_inodes+0x1c4/0x490
 [<ffffffff86470faf>] __writeback_inodes_wb+0x9f/0xd0
 [<ffffffff864717e3>] wb_writeback+0x263/0x2f0
 [<ffffffff8645d5fc>] ? get_nr_inodes+0x4c/0x70
 [<ffffffff8647216b>] bdi_writeback_workfn+0x2cb/0x460
 [<ffffffff862b9ebf>] process_one_work+0x17f/0x440
 [<ffffffff862baf56>] worker_thread+0x126/0x3c0
 [<ffffffff862bae30>] ? manage_workers.isra.25+0x2a0/0x2a0
 [<ffffffff862c1da1>] kthread+0xd1/0xe0
 [<ffffffff862c1cd0>] ? insert_kthread_work+0x40/0x40
 [<ffffffff86975c1d>] ret_from_fork_nospec_begin+0x7/0x21
 [<ffffffff862c1cd0>] ? insert_kthread_work+0x40/0x40
Code: df e9 e1 fc ff ff 0f 1f 00 85 c9 0f 84 5a ff ff ff eb a3 66 0f 1f 44 00 00 e8 2b f9 b8 c5 48 89 df e8 83 19 d7 c5 e9 d2 fd ff ff <0f> 0b 80 3d da e1 06 00 00 0f 85 31 ff ff ff be d0 03 00 00 48 
RIP  [<ffffffffc0707ba2>] xfs_do_writepage+0x3d2/0x510 [xfs]
 RSP <ffff978c146039c0>

Environment

  • Red Hat Enterprise Linux (RHEL) 8
    • Kernels before 4.18.0-305.el8 (the RHEL8.4GA kernel) are affected
  • Red Hat Enterprise Linux 7
    • All kernels affected, seen on at least 3.10.0-693.17.1.el7.x86_64, 3.10.0-514.2.2.el7.x86_64 and 3.10.0-327.28.2.el7.x86_64
  • Filesystems including Ext4 and XFS

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