echo "# autogenerated, do not edit " > skels/Kbuild echo "ccflags-y += -Wno-unused-function -Wno-unused-label -Wno-unused-variable " >> skels/Kbuild for i in ./assignments/2-uart; do echo "obj-m += $i/" >> skels/Kbuild; done make -C /home/so2/vm/linux-infra/ M=/home/so2/vm/linux-infra//tools/labs/skels ARCH=x86 modules make[1]: Entering directory '/home/so2/vm/linux-infra' CC [M] /home/so2/vm/linux-infra//tools/labs/skels/./assignments/2-uart/uart16550.o Building modules, stage 2. MODPOST 1 modules CC /home/so2/vm/linux-infra//tools/labs/skels/./assignments/2-uart/uart16550.mod.o LD [M] /home/so2/vm/linux-infra//tools/labs/skels/./assignments/2-uart/uart16550.ko make[1]: Leaving directory '/home/so2/vm/linux-infra' for i in skels/assignments/2-uart/checker; do make -C $i; done make[1]: Entering directory '/home/so2/vm/linux-infra/tools/labs/skels/assignments/2-uart/checker' cc -Wall -g -static -m32 -c -o _test/test.o _test/test.c cc -Wall -g -static -m32 -o test _test/test.o ln -s _test/solution.ko solution.ko make[1]: Leaving directory '/home/so2/vm/linux-infra/tools/labs/skels/assignments/2-uart/checker' Compilarea temei și a testelor (stderr) make[3]: Warning: File '/home/so2/vm/linux-infra//tools/labs/skels/./assignments/2-uart/uart16550.c' has modification time 778 s in the future make[3]: warning: Clock skew detected. Your build may be incomplete. Execuția testelor (stdout) vmchecker storer: Running tests ... =========== Test 1. Module insertion and removal =========== insmod uart16550, default options.....................passed major.................................................passed ioports COM1..........................................passed ioports COM2..........................................passed interrupts COM1.......................................passed interrupts COM2.......................................passed rmmod.................................................passed insmod uart16550, major=42............................passed major.................................................passed rmmod.................................................passed insmod uart16550, COM2 only...........................passed insmod solution, COM1 only............................passed ioports COM1..........................................passed ioports COM2..........................................passed interrupts COM1.......................................passed interrupts COM2.......................................passed rmmod uart16550.......................................passed rmmod solution........................................passed ================ Test 2. Invalid parameters ================ insmod................................................passed invalid ioctl (0xdeadbeef)............................passed invalid ioctl (0x1337cafe)............................passed invalid ioctl wrong operation.........................passed rmmod.................................................insmod: can't insert 'uart16550.ko': Numerical result out of range passed insmod uart16550, option=0xdeadbabe...................passed ================ Test 3. Read, small speed ================= insmod uart16550......................................passed insmod solution.......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod uart16550.......................................passed rmmod solution........................................passed ================ Test 4. Write, small speed ================ insmod solution.......................................passed insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod solution........................................passed rmmod uart16550.......................................passed ============ Test 5. Back-to-back, small speed ============= insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod uart16550.......................................passed ============= Test 6. Read/Write, medium speed ============= insmod solution.......................................passed insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod solution........................................passed rmmod uart16550.......................................passed ============ Test 7. Back-to-back, medium speed ============ insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod uart16550.......................................passed ============== Test 8. Read/Write, high speed ============== insmod solution.......................................passed insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod solution........................................passed rmmod uart16550.......................................passed ============= Test 9. Back-to-back, high speed ============= insmod uart16550......................................passed ioctl reader..........................................passed ioctl writer..........................................passed passed passed test 01...............................................passed passed passed test 02...............................................passed passed passed test 03...............................................passed passed passed test 04...............................................passed passed passed test 05...............................................passed rmmod uart16550.......................................passed Final score: 9/9 Execuția testelor (stderr) Mesaje kernel (netconsole) Linux version 4.15.0+ (so2@vmx.cs.pub.ro) (gcc version 4.9.2 (Debian 4.9.2-10+deb8u1)) #9 SMP Fri Mar 30 20:21:14 EEST 2018 x86/fpu: x87 FPU will use FXSAVE e820: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x0000000007fddfff] usable BIOS-e820: [mem 0x0000000007fde000-0x0000000007ffffff] reserved BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved Notice: NX (Execute Disable) protection missing in CPU! random: fast init done SMBIOS 2.8 present. DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161116_142049-atsina 04/01/2014 e820: update [mem 0x00000000-0x00000fff] usable ==> reserved e820: remove [mem 0x000a0000-0x000fffff] usable e820: last_pfn = 0x7fde max_arch_pfn = 0x100000 MTRR: Disabled x86/PAT: MTRRs disabled, skipping PAT initialization too. x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC found SMP MP-table at [mem 0x000f6bf0-0x000f6bff] mapped at [(ptrval)] initial memory mapped: [mem 0x00000000-0x01ffffff] Base memory trampoline at [(ptrval)] 9b000 size 16384 BRK [0x01dba000, 0x01dbafff] PGTABLE ACPI: Early table checksum verification disabled ACPI: RSDP 0x00000000000F6A10 000014 (v00 BOCHS ) ACPI: RSDT 0x0000000007FE18DC 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) ACPI: FACP 0x0000000007FE17B8 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001) ACPI: DSDT 0x0000000007FE0040 001778 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001) ACPI: FACS 0x0000000007FE0000 000040 ACPI: APIC 0x0000000007FE182C 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001) ACPI: HPET 0x0000000007FE18A4 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001) ACPI: Local APIC address 0xfee00000 0MB HIGHMEM available. 127MB LOWMEM available. mapped low ram: 0 - 07fde000 low ram: 0 - 07fde000 tsc: Fast TSC calibration using PIT BRK [0x01dbb000, 0x01dbbfff] PGTABLE Zone ranges: DMA [mem 0x0000000000001000-0x0000000000ffffff] Normal [mem 0x0000000001000000-0x0000000007fddfff] HighMem empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000000001000-0x000000000009efff] node 0: [mem 0x0000000000100000-0x0000000007fddfff] Initmem setup node 0 [mem 0x0000000000001000-0x0000000007fddfff] On node 0 totalpages: 32636 DMA zone: 32 pages used for memmap DMA zone: 0 pages reserved DMA zone: 3998 pages, LIFO batch:0 Normal zone: 224 pages used for memmap Normal zone: 28638 pages, LIFO batch:7 Reserved but unavailable: 98 pages Using APIC driver default ACPI: PM-Timer IO Port: 0x608 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level) ACPI: IRQ0 used by override. ACPI: IRQ5 used by override. ACPI: IRQ9 used by override. ACPI: IRQ10 used by override. ACPI: IRQ11 used by override. Using ACPI (MADT) for SMP configuration information smpboot: Allowing 1 CPUs, 0 hotplug CPUs e820: [mem 0x08000000-0xfffbffff] available for PCI devices clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1 percpu: Embedded 26 pages/cpu @(ptrval) s75432 r0 d31064 u106496 pcpu-alloc: s75432 r0 d31064 u106496 alloc=26*4096 pcpu-alloc: [0] 0 Built 1 zonelists, mobility grouping on. Total pages: 32380 Kernel command line: root=/dev/vda console=hvc0 debug verbose Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Initializing CPU#0 Initializing HighMem for node 0 (00000000:00000000) Memory: 115160K/130544K available (4514K kernel code, 255K rwdata, 1388K rodata, 452K init, 7312K bss, 15384K reserved, 0K cma-reserved, 0K highmem) virtual kernel memory layout: fixmap : 0xfff18000 - 0xfffff000 ( 924 kB) cpu_entry : 0xffc00000 - 0xffd39000 (1252 kB) pkmap : 0xff800000 - 0xffc00000 (4096 kB) vmalloc : 0xc87de000 - 0xff7fe000 ( 880 MB) lowmem : 0xc0000000 - 0xc7fde000 ( 127 MB) .init : 0xc1617000 - 0xc1688000 ( 452 kB) .data : 0xc14689c4 - 0xc1607d20 (1660 kB) .text : 0xc1000000 - 0xc14689c4 (4514 kB) Checking if this processor honours the WP bit even in supervisor mode...Ok. Running RCU self tests Hierarchical RCU implementation. RCU event tracing is enabled. RCU lockdep checking is enabled. RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 NR_IRQS: 2304, nr_irqs: 48, preallocated irqs: 16 CPU 0 irqstacks, hard=(ptrval) soft=(ptrval) Console: colour VGA+ 80x25 Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar ... MAX_LOCKDEP_SUBCLASSES: 8 ... MAX_LOCK_DEPTH: 48 ... MAX_LOCKDEP_KEYS: 8191 ... CLASSHASH_SIZE: 4096 ... MAX_LOCKDEP_ENTRIES: 32768 ... MAX_LOCKDEP_CHAINS: 65536 ... CHAINHASH_SIZE: 32768 memory used by lock dependency info: 4399 kB per task-struct memory footprint: 1344 bytes ACPI: Core revision 20170831 ACPI: 1 ACPI AML tables successfully acquired and loaded APIC: Switch to symmetric I/O mode setup Enabling APIC mode: Flat. Using 1 I/O APICs ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 tsc: Fast TSC calibration using PIT tsc: Detected 2660.128 MHz processor Calibrating delay loop (skipped), value calculated using timer frequency.. 5320.25 BogoMIPS (lpj=10640512) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 Spectre V2 mitigation: Vulnerable: Minimal generic ASM retpoline Spectre V2 mitigation: Filling RSB on context switch Freeing SMP alternatives memory: 20K smpboot: CPU0: Intel QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3) Performance Events: PMU not available due to virtualization, using software events only. Hierarchical SRCU implementation. smp: Bringing up secondary CPUs ... smp: Brought up 1 node, 1 CPU smpboot: Max logical packages: 1 smpboot: Total of 1 processors activated (5320.25 BogoMIPS) devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns futex hash table entries: 256 (order: 2, 16384 bytes) NET: Registered protocol family 16 cpuidle: using governor ladder ACPI: bus type PCI registered PCI: PCI BIOS revision 2.10 entry at 0xfd435, last bus=0 PCI: Using configuration type 1 for base access ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: Interpreter enabled ACPI: (supports S0 S5) ACPI: Using IOAPIC for interrupt routing PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug ACPI: Enabled 3 GPEs in block 00 to 0F ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) acpi PNP0A03:00: _OSC: OS supports [Segments] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] pci_bus 0000:00: root bus resource [mem 0x08000000-0xfebfffff window] pci_bus 0000:00: root bus resource [bus 00-ff] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 pci 0000:00:01.1: reg 0x20: [io 0xc0a0-0xc0af] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref] pci 0000:00:02.0: reg 0x18: [mem 0xfebd0000-0xfebd0fff] pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref] pci 0000:00:03.0: [1af4:1000] type 00 class 0x020000 pci 0000:00:03.0: reg 0x10: [io 0xc080-0xc09f] pci 0000:00:03.0: reg 0x14: [mem 0xfebd1000-0xfebd1fff] pci 0000:00:03.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref] pci 0000:00:04.0: [1af4:1003] type 00 class 0x078000 pci 0000:00:04.0: reg 0x10: [io 0xc000-0xc03f] pci 0000:00:04.0: reg 0x14: [mem 0xfebd2000-0xfebd2fff] pci 0000:00:04.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref] pci 0000:00:05.0: [1af4:1001] type 00 class 0x010000 pci 0000:00:05.0: reg 0x10: [io 0xc040-0xc07f] pci 0000:00:05.0: reg 0x14: [mem 0xfebd3000-0xfebd3fff] pci 0000:00:05.0: reg 0x20: [mem 0xfe008000-0xfe00bfff 64bit pref] pci_bus 0000:00: on NUMA node 0 ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) ACPI: PCI Interrupt Link [LNKS] (IRQs *9) pci 0000:00:02.0: vgaarb: setting as boot VGA device pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none pci 0000:00:02.0: vgaarb: bridge control possible vgaarb: loaded PCI: Using ACPI for IRQ routing PCI: pci_cache_line_size set to 32 bytes e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] e820: reserve RAM buffer [mem 0x07fde000-0x07ffffff] clocksource: Switched to clocksource refined-jiffies pnp: PnP ACPI init pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active) pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active) pnp 00:03: [dma 2] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active) pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active) pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active) pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active) pnp: PnP ACPI: found 7 devices clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns clocksource: Switched to clocksource acpi_pm pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] pci_bus 0000:00: resource 7 [mem 0x08000000-0xfebfffff window] NET: Registered protocol family 2 TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 3, 36864 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 256 (order: 2, 20480 bytes) UDP-Lite hash table entries: 256 (order: 2, 20480 bytes) NET: Registered protocol family 1 pci 0000:00:00.0: Limiting direct PCI/PCI transfers pci 0000:00:01.0: PIIX3: Enabling Passive Release pci 0000:00:01.0: Activating ISA DMA hang workarounds pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] PCI: CLS 0 bytes, default 32 Initialise system trusted keyrings workingset: timestamp_bits=30 max_order=15 bucket_order=0 Key type asymmetric registered Asymmetric key parser 'x509' registered Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) io scheduler mq-deadline registered io scheduler kyber registered input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 ACPI: Power Button [PWRF] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 tsc: Refined TSC clocksource calibration: 2659.984 MHz clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x265794ed47f, max_idle_ns: 440795318144 ns clocksource: Switched to clocksource tsc ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10 console [hvc0] enabled i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 serio: i8042 KBD port at 0x60,0x64 irq 1 serio: i8042 AUX port at 0x60,0x64 irq 12 NET: Registered protocol family 10 Segment Routing with IPv6 sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver NET: Registered protocol family 17 Using IPI Shortcut mode sched_clock: Marking stable (11489282028, 0)->(11565949606, -76667578) Loading compiled-in X.509 certificates input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2 input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3 EXT4-fs (vda): couldn't mount as ext3 due to feature incompatibilities EXT4-fs (vda): couldn't mount as ext2 due to feature incompatibilities EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null) VFS: Mounted root (ext4 filesystem) readonly on device 254:0. Freeing unused kernel memory: 452K Write protecting the kernel text: 4516k Write protecting the kernel read-only data: 1404k udevd[76]: starting version 3.2.1 udevd[77]: starting eudev-3.2.1 EXT4-fs (vda): re-mounted. Opts: data=ordered netpoll: netconsole: local port 6666 netpoll: netconsole: local IPv4 address 172.213.0.7 netpoll: netconsole: interface 'eth0' netpoll: netconsole: remote port 6666 netpoll: netconsole: remote IPv4 address 172.213.0.1 netpoll: netconsole: remote ethernet address 46:f6:04:29:d8:72 console [netcon0] enabled netconsole: network logging started uart16550: loading out-of-tree module taints kernel. uart16550 32768 0 - Live 0xc8833000 (O) netconsole 16384 0 - Live 0xc883f000 uart16550: `0xdeadbabe' invalid for parameter `option' random: crng init done ======================================================== WARNING: possible irq lock inversion dependency detected 4.15.0+ #9 Tainted: G O -------------------------------------------------------- test/380 just changed the state of lock: (target_list_lock){-...}, at: [<5ba95585>] write_msg+0x3f/0xd0 [netconsole] but this lock took another, HARDIRQ-unsafe lock in the past: (&syncp->seq#2){+.-.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&syncp->seq#2); local_irq_disable(); lock(target_list_lock); lock(&syncp->seq#2); lock(target_list_lock); *** DEADLOCK *** 1 lock held by test/380: #0: (console_lock){+.+.}, at: [] vprintk_emit+0x1d4/0x2b0 the shortest dependencies between 2nd lock and 1st lock: -> (&syncp->seq#2){+.-.} ops: 292 { HARDIRQ-ON-W at: lock_acquire+0x68/0x80 virtnet_poll+0x133/0x350 net_rx_action+0x1c3/0x2a0 __do_softirq+0x103/0x213 do_softirq_own_stack+0x57/0x70 do_softirq.part.11+0x2c/0x50 __local_bh_enable_ip+0xdc/0xf0 virtnet_napi_enable+0x49/0x60 virtnet_open+0x42/0xf0 __dev_open+0xb7/0x150 __dev_change_flags+0x137/0x170 dev_change_flags+0x28/0x60 devinet_ioctl+0x61e/0x700 inet_ioctl+0x85/0xc0 sock_ioctl+0x132/0x310 do_vfs_ioctl+0x84/0x7b0 SyS_ioctl+0x34/0x60 do_int80_syscall_32+0x5e/0x1b0 restore_all+0x0/0x65 IN-SOFTIRQ-W at: lock_acquire+0x68/0x80 virtnet_poll+0x133/0x350 net_rx_action+0x1c3/0x2a0 __do_softirq+0x103/0x213 do_softirq_own_stack+0x57/0x70 do_softirq.part.11+0x2c/0x50 __local_bh_enable_ip+0xdc/0xf0 virtnet_napi_enable+0x49/0x60 virtnet_open+0x42/0xf0 __dev_open+0xb7/0x150 __dev_change_flags+0x137/0x170 dev_change_flags+0x28/0x60 devinet_ioctl+0x61e/0x700 inet_ioctl+0x85/0xc0 sock_ioctl+0x132/0x310 do_vfs_ioctl+0x84/0x7b0 SyS_ioctl+0x34/0x60 do_int80_syscall_32+0x5e/0x1b0 restore_all+0x0/0x65 INITIAL USE at: lock_acquire+0x68/0x80 virtnet_stats+0x178/0x230 dev_get_stats+0x8a/0x120 rtnl_fill_stats+0x36/0xfd rtnl_fill_ifinfo+0x598/0xfa0 rtmsg_ifinfo_build_skb+0x91/0x100 rtmsg_ifinfo_event.part.27+0x25/0x60 rtmsg_ifinfo+0x30/0x40 register_netdevice+0x427/0x560 register_netdev+0x16/0x30 virtnet_probe+0x95a/0xd90 virtio_dev_probe+0x1fe/0x2a0 really_probe+0x205/0x2a0 __driver_attach+0x8f/0xb0 bus_for_each_dev+0x4f/0x80 driver_attach+0x19/0x20 bus_add_driver+0x197/0x210 driver_register+0x54/0xe0 register_virtio_driver+0x16/0x30 virtio_net_driver_init+0x5d/0x81 do_one_initcall+0x30/0x160 kernel_init_freeable+0xea/0x162 kernel_init+0xb/0x100 ret_from_fork+0x2e/0x38 } ... key at: [] __key.32758+0x0/0x8 ... acquired at: free_old_xmit_skbs.isra.44+0x93/0xd0 start_xmit+0x5c/0x470 netpoll_start_xmit+0x140/0x1a0 netpoll_send_skb_on_dev+0x21c/0x260 netpoll_send_udp+0x2af/0x4e0 write_msg+0x9c/0xd0 [netconsole] console_unlock+0x3f4/0x4d0 register_console+0x18f/0x390 0xc8803157 do_one_initcall+0x30/0x160 do_init_module+0x46/0x1c2 load_module+0x1e8c/0x22f0 SyS_init_module+0xd5/0x100 do_int80_syscall_32+0x5e/0x1b0 restore_all+0x0/0x65 -> (target_list_lock){-...} ops: 280 { IN-HARDIRQ-W at: lock_acquire+0x68/0x80 _raw_spin_lock_irqsave+0x46/0x60 write_msg+0x3f/0xd0 [netconsole] console_unlock+0x3f4/0x4d0 vprintk_emit+0x1dd/0x2b0 vprintk_default+0x2f/0x40 vprintk_func+0x32/0x70 printk+0xe/0x10 crng_reseed.constprop.31+0x1a4/0x1b0 credit_entropy_bits+0x122/0x1e0 add_interrupt_randomness+0x197/0x1e0 handle_irq_event_percpu+0x2a/0x50 handle_irq_event+0x32/0x60 handle_edge_irq+0x95/0x140 handle_irq+0x7b/0xb0 do_IRQ+0x55/0x120 common_interrupt+0x39/0x40 __do_softirq+0x96/0x213 do_softirq_own_stack+0x57/0x70 irq_exit+0x6d/0x80 smp_apic_timer_interrupt+0x4f/0x90 apic_timer_interrupt+0x3a/0x40 __vfs_write+0x25/0x160 vfs_write+0xa7/0x150 SyS_write+0x49/0xb0 do_fast_syscall_32+0x9e/0x310 entry_SYSENTER_32+0x4c/0x7b INITIAL USE at: lock_acquire+0x68/0x80 _raw_spin_lock_irqsave+0x46/0x60 0xc880305c do_one_initcall+0x30/0x160 do_init_module+0x46/0x1c2 load_module+0x1e8c/0x22f0 SyS_init_module+0xd5/0x100 do_int80_syscall_32+0x5e/0x1b0 restore_all+0x0/0x65 } ... key at: [<816cf811>] target_list_lock+0x10/0xffffef60 [netconsole] ... acquired at: mark_lock+0x35e/0x5f0 __lock_acquire+0xad1/0x18c0 lock_acquire+0x68/0x80 _raw_spin_lock_irqsave+0x46/0x60 write_msg+0x3f/0xd0 [netconsole] console_unlock+0x3f4/0x4d0 vprintk_emit+0x1dd/0x2b0 vprintk_default+0x2f/0x40 vprintk_func+0x32/0x70 printk+0xe/0x10 crng_reseed.constprop.31+0x1a4/0x1b0 credit_entropy_bits+0x122/0x1e0 add_interrupt_randomness+0x197/0x1e0 handle_irq_event_percpu+0x2a/0x50 handle_irq_event+0x32/0x60 handle_edge_irq+0x95/0x140 handle_irq+0x7b/0xb0 do_IRQ+0x55/0x120 common_interrupt+0x39/0x40 __do_softirq+0x96/0x213 do_softirq_own_stack+0x57/0x70 irq_exit+0x6d/0x80 smp_apic_timer_interrupt+0x4f/0x90 apic_timer_interrupt+0x3a/0x40 __vfs_write+0x25/0x160 vfs_write+0xa7/0x150 SyS_write+0x49/0xb0 do_fast_syscall_32+0x9e/0x310 entry_SYSENTER_32+0x4c/0x7b stack backtrace: CPU: 0 PID: 380 Comm: test Tainted: G O 4.15.0+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161116_142049-atsina 04/01/2014 Call Trace: dump_stack+0x5f/0x89 print_irq_inversion_bug.part.34+0x18a/0x193 check_usage_forwards+0x120/0x130 ? print_shortest_lock_dependencies+0x1a0/0x1a0 mark_lock+0x35e/0x5f0 __lock_acquire+0xad1/0x18c0 ? Lost 61 message(s)! console [netcon_ext0] disabled console [netcon0] disabled