PROBLEM: [kernel BUG at fs/fat/inode.c:162] when writing to a broken VFAT

From: Anatoly Trosinenko
Date: Fri Jun 01 2018 - 05:45:30 EST


Description:

Writing to some file on a broken VFAT partition causes kernel bug

Kernel version: v4.17-rc7

How to reproduce:

1. Compile kernel v4.17-rc7 with config attached
2. Unpack the vfat.img and mount it as vfat (suppose /mnt is the mount point)
3. Run `echo > /mnt/xyz`

What happens:

[ 1.538155] ------------[ cut here ]------------
[ 1.538274] kernel BUG at fs/fat/inode.c:162!
[ 1.538693] invalid opcode: 0000 [#1] SMP NOPTI
[ 1.538796] Modules linked in:
[ 1.538996] CPU: 0 PID: 991 Comm: sh Not tainted 4.17.0-rc7 #2
[ 1.539094] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.10.2-1ubuntu1 04/01/2014
[ 1.539266] RIP: 0010:fat_get_block+0x200/0x230
[ 1.539334] RSP: 0018:ffff906900a2fb78 EFLAGS: 00000246
[ 1.539419] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff906900a2fb88
[ 1.539509] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000000
[ 1.539600] RBP: ffff8a379db508f8 R08: ffff906900a2fb90 R09: 0000000000000200
[ 1.539690] R10: 0000000000000000 R11: ffff8a379db10958 R12: ffff8a379db10958
[ 1.539781] R13: ffff8a379d590000 R14: 0000000000000001 R15: 0000000000000000
[ 1.539904] FS: 0000000000fd38c0(0000) GS:ffff8a379f800000(0000)
knlGS:0000000000000000
[ 1.540006] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.540082] CR2: 000000000056789c CR3: 000000001d598000 CR4: 00000000000006f0
[ 1.540221] Call Trace:
[ 1.540710] __block_write_begin_int+0x134/0x550
[ 1.540806] ? fat_add_cluster+0x80/0x80
[ 1.540869] ? notify_change+0x383/0x400
[ 1.540927] ? fat_add_cluster+0x80/0x80
[ 1.540982] block_write_begin+0x3f/0xa0
[ 1.541036] ? do_truncate+0x84/0xc0
[ 1.541088] cont_write_begin+0x232/0x330
[ 1.541146] ? fat_add_cluster+0x80/0x80
[ 1.541200] ? path_openat+0x5f7/0x1620
[ 1.541255] fat_write_begin+0x2d/0x60
[ 1.541310] ? fat_add_cluster+0x80/0x80
[ 1.541367] generic_perform_write+0xb1/0x1b0
[ 1.541431] __generic_file_write_iter+0xfd/0x190
[ 1.541497] generic_file_write_iter+0xe1/0x1e0
[ 1.541560] __vfs_write+0xfc/0x160
[ 1.541616] vfs_write+0xa8/0x190
[ 1.541667] ksys_write+0x4d/0xb0
[ 1.541718] do_syscall_64+0x43/0xf0
[ 1.541772] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1.541936] RIP: 0033:0x486804
[ 1.541981] RSP: 002b:00007ffd17e241f8 EFLAGS: 00000246 ORIG_RAX:
0000000000000001
[ 1.542081] RAX: ffffffffffffffda RBX: 0000000000fd38a0 RCX: 0000000000486804
[ 1.542199] RDX: 0000000000000001 RSI: 0000000000fd6fc0 RDI: 0000000000000001
[ 1.542283] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000fd6fc0
[ 1.542367] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000fd6fc0
[ 1.542450] R13: 0000000000000001 R14: 0000000000000001 R15: 00007ffd17e24260
[ 1.542573] Code: d0 00 00 00 49 89 44 24 18 49 89 54 24 30 49 8b
45 18 49 89 44 24 20 41 0f b6 45 14 e9 b9 fe ff ff 41 89 c2 e9 bb fe
ff ff 0f 0b <0f> 0b e8 79 87 dc ff 48 8b 4d b0 48 c7 c2 c8 bc 9f 91 be
01 00
[ 1.542995] RIP: fat_get_block+0x200/0x230 RSP: ffff906900a2fb78
[ 1.543289] ---[ end trace 0266ed39a6ec740a ]---

(full kernel log is attached)

--
Anatoly
W[ 0.000000] Linux version 4.17.0-rc7 (trosinenko@trosinenko-pc) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #2 SMP Tue May 29 21:22:35 MSK 2018
[ 0.000000] Command line: console=ttyS0
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001ffdffff] usable
[ 0.000000] BIOS-e820: [mem 0x000000001ffe0000-0x000000001fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 0.000000] e820: last_pfn = 0x1ffe0 max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] found SMP MP-table at [mem 0x000f6aa0-0x000f6aaf] mapped at [ (ptrval)]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] RAMDISK: [mem 0x1fbfc000-0x1ffdffff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F68C0 000014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 0x000000001FFE15FC 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 0x000000001FFE1458 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x000000001FFE0040 001418 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x000000001FFE0000 000040
[ 0.000000] ACPI: APIC 0x000000001FFE154C 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 0x000000001FFE15C4 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000001ffdffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x1fbf8000-0x1fbfbfff]
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x000000001ffdffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000001ffdffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000001ffdffff]
[ 0.000000] Reserved but unavailable: 98 pages
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] e820: [mem 0x20000000-0xfffbffff] available for PCI devices
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.000000] random: get_random_bytes called from start_kernel+0x8b/0x49f with crng_init=0
[ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] percpu: Embedded 43 pages/cpu @ (ptrval) s137304 r8192 d30632 u2097152
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 128873
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0
[ 0.000000] Memory: 483320K/523768K available (14348K kernel code, 1363K rwdata, 3092K rodata, 1260K init, 592K bss, 40448K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 4352, nr_irqs: 256, preallocated irqs: 16
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [ttyS0] enabled
[ 0.000000] ACPI: Core revision 20180313
[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[ 0.000000] APIC: Switch to symmetric I/O mode setup
[ 0.004000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.009000] tsc: Fast TSC calibration using PIT
[ 0.010000] tsc: Detected 2807.969 MHz processor
[ 0.011000] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2879a8bddcb, max_idle_ns: 440795258882 ns
[ 0.012229] Calibrating delay loop (skipped), value calculated using timer frequency.. 5615.93 BogoMIPS (lpj=2807969)
[ 0.012439] pid_max: default: 32768 minimum: 301
[ 0.012927] Security Framework initialized
[ 0.013100] SELinux: Initializing.
[ 0.014130] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.014378] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.014575] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.014682] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.023965] mce: CPU supports 10 MCE banks
[ 0.024672] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.024751] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.024874] Spectre V2 : Spectre mitigation: LFENCE not serializing, switching to generic retpoline
[ 0.025027] Spectre V2 : Mitigation: Full generic retpoline
[ 0.025114] Spectre V2 : Spectre v2 mitigation: Filling RSB on context switch
[ 0.025224] Speculative Store Bypass: Vulnerable
[ 0.256169] random: fast init done
[ 0.303119] Freeing SMP alternatives memory: 40K
[ 0.311000] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
[ 0.313906] Performance Events: PMU not available due to virtualization, using software events only.
[ 0.315403] Hierarchical SRCU implementation.
[ 0.318199] Huh? What family is it: 0x6?!
[ 0.318522] smp: Bringing up secondary CPUs ...
[ 0.318652] smp: Brought up 1 node, 1 CPU
[ 0.318742] smpboot: Max logical packages: 1
[ 0.318844] smpboot: Total of 1 processors activated (5615.93 BogoMIPS)
[ 0.325909] devtmpfs: initialized
[ 0.330642] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.331042] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.333300] RTC time: 9:19:02, date: 06/01/18
[ 0.336310] NET: Registered protocol family 16
[ 0.337937] audit: initializing netlink subsys (disabled)
[ 0.342618] kworker/u2:0 (16) used greatest stack depth: 14640 bytes left
[ 0.347410] audit: type=2000 audit(1527844742.343:1): state=initialized audit_enabled=0 res=1
[ 0.349496] cpuidle: using governor menu
[ 0.350233] ACPI: bus type PCI registered
[ 0.351127] kworker/u2:1 (24) used greatest stack depth: 14144 bytes left
[ 0.354246] PCI: Using configuration type 1 for base access
[ 0.429898] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.433071] ACPI: Added _OSI(Module Device)
[ 0.433157] ACPI: Added _OSI(Processor Device)
[ 0.433216] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.433274] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.433667] ACPI: Added _OSI(Linux-Dell-Video)
[ 0.444257] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 0.454754] ACPI: Interpreter enabled
[ 0.455407] ACPI: (supports S0 S3 S4 S5)
[ 0.455499] ACPI: Using IOAPIC for interrupt routing
[ 0.456080] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.457000] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.498979] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.499657] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.499911] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.500389] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.502396] PCI host bridge to bus 0000:00
[ 0.502553] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.502650] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.502741] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.502832] pci_bus 0000:00: root bus resource [mem 0x20000000-0xfebfffff window]
[ 0.502921] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 0.503143] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.510032] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.510157] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.510260] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.510358] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.511935] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 0.512159] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.526584] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.528398] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.528913] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.529477] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.529768] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.534734] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 0.534903] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 0.535053] pci 0000:00:02.0: vgaarb: bridge control possible
[ 0.535188] vgaarb: loaded
[ 0.537139] SCSI subsystem initialized
[ 0.539223] ACPI: bus type USB registered
[ 0.539819] usbcore: registered new interface driver usbfs
[ 0.540253] usbcore: registered new interface driver hub
[ 0.540499] usbcore: registered new device driver usb
[ 0.541459] pps_core: LinuxPPS API ver. 1 registered
[ 0.541534] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@xxxxxxxx>
[ 0.541809] PTP clock support registered
[ 0.544976] EDAC MC: Ver: 3.0.0
[ 0.547564] Advanced Linux Sound Architecture Driver Initialized.
[ 0.548129] PCI: Using ACPI for IRQ routing
[ 0.554844] NetLabel: Initializing
[ 0.554913] NetLabel: domain hash size = 128
[ 0.554973] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.556296] NetLabel: unlabeled traffic allowed by default
[ 0.557357] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.557608] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 0.557730] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[ 0.561845] clocksource: Switched to clocksource tsc-early
[ 0.674873] VFS: Disk quotas dquot_6.6.0
[ 0.675078] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.677158] pnp: PnP ACPI init
[ 0.683139] pnp: PnP ACPI: found 6 devices
[ 0.723092] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.724597] NET: Registered protocol family 2
[ 0.728491] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[ 0.728679] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.728887] TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
[ 0.729058] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.729900] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.730101] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.731137] NET: Registered protocol family 1
[ 0.732462] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.732589] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.732739] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.732972] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 0.735598] Unpacking initramfs...
[ 0.772598] Freeing initrd memory: 3984K
[ 0.775511] Scanning for low memory corruption every 60 seconds
[ 0.783720] Initialise system trusted keyrings
[ 0.785663] workingset: timestamp_bits=56 max_order=17 bucket_order=0
[ 0.820106] SGI XFS with ACLs, security attributes, no debug enabled
[ 0.840222] Key type asymmetric registered
[ 0.840395] Asymmetric key parser 'x509' registered
[ 0.840665] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.840893] io scheduler noop registered
[ 0.840972] io scheduler deadline registered
[ 0.841435] io scheduler cfq registered (default)
[ 0.841528] io scheduler mq-deadline registered
[ 0.841592] io scheduler kyber registered
[ 0.845108] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 0.846787] ACPI: Power Button [PWRF]
[ 0.852923] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.874695] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 0.882935] Non-volatile memory driver v1.3
[ 0.883599] Linux agpgart interface v0.103
[ 0.904713] loop: module loaded
[ 0.915542] scsi host0: ata_piix
[ 0.917694] scsi host1: ata_piix
[ 0.918095] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc040 irq 14
[ 0.918269] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc048 irq 15
[ 0.919046] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[ 0.919133] e100: Copyright(c) 1999-2006 Intel Corporation
[ 0.922041] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 0.922146] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 1.045719] PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 1.060051] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
[ 1.060193] ata1.00: 131072 sectors, multi 16: LBA48
[ 1.061241] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[ 1.062013] ata1.00: configured for MWDMA2
[ 1.067855] ata2.00: configured for MWDMA2
[ 1.069508] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.073623] sd 0:0:0:0: [sda] 131072 512-byte logical blocks: (67.1 MB/64.0 MiB)
[ 1.074204] sd 0:0:0:0: [sda] Write Protect is off
[ 1.074679] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.080155] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.082305] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
[ 1.095595] sda:
[ 1.102995] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 1.103370] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1.106305] sr 1:0:0:0: Attached scsi generic sg1 type 5
[ 1.108224] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.355257] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
[ 1.355482] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 1.356027] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.356157] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.356456] sky2: driver version 1.30
[ 1.358705] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.358819] ehci-pci: EHCI PCI platform driver
[ 1.359148] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.359515] ohci-pci: OHCI PCI platform driver
[ 1.359752] uhci_hcd: USB Universal Host Controller Interface driver
[ 1.361964] usbcore: registered new interface driver usblp
[ 1.362556] usbcore: registered new interface driver usb-storage
[ 1.363621] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 1.367181] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.367383] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 1.371160] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 1.374443] rtc_cmos 00:00: RTC can wake from S4
[ 1.379417] rtc_cmos 00:00: registered as rtc0
[ 1.379993] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs
[ 1.382489] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@xxxxxxxxxx
[ 1.383302] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.389044] usbcore: registered new interface driver usbhid
[ 1.389194] usbhid: USB HID core driver
[ 1.401684] Initializing XFRM netlink socket
[ 1.403633] NET: Registered protocol family 10
[ 1.408771] Segment Routing with IPv6
[ 1.411005] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.413511] NET: Registered protocol family 17
[ 1.413727] Key type dns_resolver registered
[ 1.415573] sched_clock: Marking stable (1415057822, 0)->(1525151655, -110093833)
[ 1.418864] registered taskstats version 1
[ 1.418945] Loading compiled-in X.509 certificates
[ 1.422179] Magic number: 6:298:322
[ 1.422394] tty tty47: hash matches
[ 1.422689] console [netcon0] enabled
[ 1.422758] netconsole: network logging started
[ 1.424417] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.433670] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.434608] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.434828] cfg80211: failed to load regulatory.db
[ 1.435549] ALSA device list:
[ 1.435614] No soundcards found.
[ 1.462768] Freeing unused kernel memory: 1260K
[ 1.464300] Write protecting the kernel read-only data: 20480k
[ 1.466357] Freeing unused kernel memory: 2004K
[ 1.473305] Freeing unused kernel memory: 1004K
[ 1.538155] ------------[ cut here ]------------
[ 1.538274] kernel BUG at fs/fat/inode.c:162!
[ 1.538693] invalid opcode: 0000 [#1] SMP NOPTI
[ 1.538796] Modules linked in:
[ 1.538996] CPU: 0 PID: 991 Comm: sh Not tainted 4.17.0-rc7 #2
[ 1.539094] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 1.539266] RIP: 0010:fat_get_block+0x200/0x230
[ 1.539334] RSP: 0018:ffff906900a2fb78 EFLAGS: 00000246
[ 1.539419] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff906900a2fb88
[ 1.539509] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000000
[ 1.539600] RBP: ffff8a379db508f8 R08: ffff906900a2fb90 R09: 0000000000000200
[ 1.539690] R10: 0000000000000000 R11: ffff8a379db10958 R12: ffff8a379db10958
[ 1.539781] R13: ffff8a379d590000 R14: 0000000000000001 R15: 0000000000000000
[ 1.539904] FS: 0000000000fd38c0(0000) GS:ffff8a379f800000(0000) knlGS:0000000000000000
[ 1.540006] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.540082] CR2: 000000000056789c CR3: 000000001d598000 CR4: 00000000000006f0
[ 1.540221] Call Trace:
[ 1.540710] __block_write_begin_int+0x134/0x550
[ 1.540806] ? fat_add_cluster+0x80/0x80
[ 1.540869] ? notify_change+0x383/0x400
[ 1.540927] ? fat_add_cluster+0x80/0x80
[ 1.540982] block_write_begin+0x3f/0xa0
[ 1.541036] ? do_truncate+0x84/0xc0
[ 1.541088] cont_write_begin+0x232/0x330
[ 1.541146] ? fat_add_cluster+0x80/0x80
[ 1.541200] ? path_openat+0x5f7/0x1620
[ 1.541255] fat_write_begin+0x2d/0x60
[ 1.541310] ? fat_add_cluster+0x80/0x80
[ 1.541367] generic_perform_write+0xb1/0x1b0
[ 1.541431] __generic_file_write_iter+0xfd/0x190
[ 1.541497] generic_file_write_iter+0xe1/0x1e0
[ 1.541560] __vfs_write+0xfc/0x160
[ 1.541616] vfs_write+0xa8/0x190
[ 1.541667] ksys_write+0x4d/0xb0
[ 1.541718] do_syscall_64+0x43/0xf0
[ 1.541772] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1.541936] RIP: 0033:0x486804
[ 1.541981] RSP: 002b:00007ffd17e241f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 1.542081] RAX: ffffffffffffffda RBX: 0000000000fd38a0 RCX: 0000000000486804
[ 1.542199] RDX: 0000000000000001 RSI: 0000000000fd6fc0 RDI: 0000000000000001
[ 1.542283] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000fd6fc0
[ 1.542367] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000fd6fc0
[ 1.542450] R13: 0000000000000001 R14: 0000000000000001 R15: 00007ffd17e24260
[ 1.542573] Code: d0 00 00 00 49 89 44 24 18 49 89 54 24 30 49 8b 45 18 49 89 44 24 20 41 0f b6 45 14 e9 b9 fe ff ff 41 89 c2 e9 bb fe ff ff 0f 0b <0f> 0b e8 79 87 dc ff 48 8b 4d b0 48 c7 c2 c8 bc 9f 91 be 01 00
[ 1.542995] RIP: fat_get_block+0x200/0x230 RSP: ffff906900a2fb78
[ 1.543289] ---[ end trace 0266ed39a6ec740a ]---
[ 1.543863] sh (991) used greatest stack depth: 13288 bytes left
Segmentation fault


BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
/ # [ 1.824292] tsc: Refined TSC clocksource calibration: 2808.026 MHz
[ 1.824460] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2879de566f8, max_idle_ns: 440795212581 ns
[ 1.824651] clocksource: Switched to clocksource tsc
[ 2.001324] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3

Attachment: config_v4.17-rc7
Description: Binary data

Attachment: vfat.img.bz2
Description: Binary data