Extracting prog: 1m13.102648919s Minimizing prog: 10m7.263766313s Simplifying prog options: 0s Extracting C: 21.071543626s Simplifying C: 3m55.404088919s extracting reproducer from 59 programs first checking the prog from the crash report single: executing 1 programs separately with timeout 30s testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT-close_range detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) r0 = creat(&(0x7f0000000000)='./file0\x00', 0x0) r1 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r1, 0xab00, r2) r3 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r3, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r3, 0xab00, r2) ioctl$NBD_DO_IT(r1, 0xab03) close_range(r0, 0xffffffffffffffff, 0x0) program crashed: possible deadlock in pcpu_alloc_noprof single: successfully extracted reproducer found reproducer with 11 syscalls minimizing guilty program testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) ioctl$NBD_SET_FLAGS(0xffffffffffffffff, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(0xffffffffffffffff, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-socketpair$nbd-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-syz_open_dev$ndb-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) ioctl$NBD_SET_SOCK(r0, 0xab00, 0xffffffffffffffff) r1 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r1, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r1, 0xab00, 0xffffffffffffffff) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-creat-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) creat(&(0x7f0000000000)='./file0\x00', 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(0xffffffffffffffff, 0xab00, r0) r1 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r1, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r1, 0xab00, r0) ioctl$NBD_DO_IT(0xffffffffffffffff, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-sched_setscheduler-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f0000000200)=0x4) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): prlimit64-syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: prlimit64(0x0, 0xe, &(0x7f0000000140)={0x8, 0x8b}, 0x0) r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(0x0, 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, 0x0) ioctl$NBD_SET_SOCK(r0, 0xab00, 0xffffffffffffffff) r1 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r1, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r1, 0xab00, 0xffffffffffffffff) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash testing program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(0x0, 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program did not crash extracting C reproducer testing compiled C program (duration=31.648455756s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof simplifying C reproducer testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:true Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing compiled C program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT program crashed: possible deadlock in pcpu_alloc_noprof testing program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof validation run: crashed=true testing program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof validation run: crashed=true testing program (duration=31.648455756s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$ndb-socketpair$nbd-ioctl$NBD_SET_SOCK-syz_open_dev$ndb-ioctl$NBD_SET_FLAGS-ioctl$NBD_SET_SOCK-ioctl$NBD_DO_IT detailed listing: executing program 0: r0 = syz_open_dev$ndb(&(0x7f0000000000), 0x0, 0x0) socketpair$nbd(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff}) ioctl$NBD_SET_SOCK(r0, 0xab00, r1) r2 = syz_open_dev$ndb(&(0x7f00000000c0), 0x0, 0x185402) ioctl$NBD_SET_FLAGS(r2, 0xab0a, 0x1000001000104) ioctl$NBD_SET_SOCK(r2, 0xab00, r1) ioctl$NBD_DO_IT(r0, 0xab03) program crashed: possible deadlock in pcpu_alloc_noprof validation run: crashed=true reproducing took 17m26.172777988s repro crashed as (corrupted=false): ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.17/6084 is trying to acquire lock: ffffffff8e972d48 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 but task is already holding lock: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&q->q_usage_counter(io)#49){++++}-{0:0}: blk_alloc_queue+0x610/0x790 block/blk-core.c:461 blk_mq_alloc_queue+0x174/0x290 block/blk-mq.c:4429 __blk_mq_alloc_disk+0x29/0x120 block/blk-mq.c:4476 nbd_dev_add+0x492/0xb10 drivers/block/nbd.c:1954 nbd_init+0x291/0x2b0 drivers/block/nbd.c:2692 do_one_initcall+0x11d/0x760 init/main.c:1382 do_initcall_level init/main.c:1444 [inline] do_initcalls init/main.c:1460 [inline] do_basic_setup init/main.c:1479 [inline] kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692 kernel_init+0x1f/0x1e0 init/main.c:1582 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4348 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4362 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x166/0x5f0 mm/page_alloc.c:5018 __alloc_frozen_pages_noprof+0x19a/0x2ba0 mm/page_alloc.c:5239 __alloc_pages_noprof+0xb/0x1b0 mm/page_alloc.c:5284 __alloc_pages_node_noprof include/linux/gfp.h:285 [inline] alloc_pages_node_noprof include/linux/gfp.h:312 [inline] pcpu_alloc_pages mm/percpu-vm.c:95 [inline] pcpu_populate_chunk+0x118/0x990 mm/percpu-vm.c:285 pcpu_alloc_noprof+0x833/0x1c50 mm/percpu.c:1876 iommu_dma_init_fq_percpu drivers/iommu/dma-iommu.c:320 [inline] iommu_dma_init_fq+0x1da/0x7e0 drivers/iommu/dma-iommu.c:346 iommu_dma_init_domain drivers/iommu/dma-iommu.c:709 [inline] iommu_setup_dma_ops+0x1250/0x1630 drivers/iommu/dma-iommu.c:2106 bus_iommu_probe+0x264/0x550 drivers/iommu/iommu.c:1958 iommu_device_register+0x1af/0x280 drivers/iommu/iommu.c:285 intel_iommu_init+0x2020/0x2970 drivers/iommu/intel/iommu.c:2659 pci_iommu_init+0x3c/0x80 arch/x86/kernel/pci-dma.c:174 do_one_initcall+0x11d/0x760 init/main.c:1382 do_initcall_level init/main.c:1444 [inline] do_initcalls init/main.c:1460 [inline] do_basic_setup init/main.c:1479 [inline] kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692 kernel_init+0x1f/0x1e0 init/main.c:1582 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (pcpu_alloc_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 init_alloc_hint lib/sbitmap.c:16 [inline] sbitmap_init_node+0x2ff/0x720 lib/sbitmap.c:126 sbitmap_queue_init_node+0x40/0x4a0 lib/sbitmap.c:454 bt_alloc block/blk-mq-tag.c:546 [inline] blk_mq_init_tags+0x184/0x300 block/blk-mq-tag.c:571 blk_mq_alloc_rq_map block/blk-mq.c:3556 [inline] blk_mq_alloc_map_and_rqs+0x218/0xeb0 block/blk-mq.c:4124 __blk_mq_alloc_map_and_rqs block/blk-mq.c:4146 [inline] __blk_mq_alloc_map_and_rqs+0x128/0x1f0 block/blk-mq.c:4137 blk_mq_realloc_tag_set_tags block/blk-mq.c:4817 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5153 [inline] blk_mq_update_nr_hw_queues+0xaba/0x1190 block/blk-mq.c:5205 nbd_start_device+0x1a6/0xbd0 drivers/block/nbd.c:1489 nbd_start_device_ioctl drivers/block/nbd.c:1548 [inline] __nbd_ioctl drivers/block/nbd.c:1623 [inline] nbd_ioctl+0x4a6/0xd30 drivers/block/nbd.c:1663 blkdev_ioctl+0x5ad/0x6f0 block/ioctl.c:804 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: pcpu_alloc_mutex --> fs_reclaim --> &q->q_usage_counter(io)#49 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(io)#49); lock(fs_reclaim); lock(&q->q_usage_counter(io)#49); lock(pcpu_alloc_mutex); *** DEADLOCK *** 4 locks held by syz.0.17/6084: #0: ffff888028ba01d0 (&set->update_nr_hwq_lock){++++}-{4:4}, at: blk_mq_update_nr_hw_queues+0x91/0x1190 block/blk-mq.c:5203 #1: ffff888028ba00d8 (&set->tag_list_lock){+.+.}-{4:4}, at: blk_mq_update_nr_hw_queues+0xa4/0x1190 block/blk-mq.c:5204 #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 stack backtrace: CPU: 3 UID: 0 PID: 6084 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 init_alloc_hint lib/sbitmap.c:16 [inline] sbitmap_init_node+0x2ff/0x720 lib/sbitmap.c:126 sbitmap_queue_init_node+0x40/0x4a0 lib/sbitmap.c:454 bt_alloc block/blk-mq-tag.c:546 [inline] blk_mq_init_tags+0x184/0x300 block/blk-mq-tag.c:571 blk_mq_alloc_rq_map block/blk-mq.c:3556 [inline] blk_mq_alloc_map_and_rqs+0x218/0xeb0 block/blk-mq.c:4124 __blk_mq_alloc_map_and_rqs block/blk-mq.c:4146 [inline] __blk_mq_alloc_map_and_rqs+0x128/0x1f0 block/blk-mq.c:4137 blk_mq_realloc_tag_set_tags block/blk-mq.c:4817 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5153 [inline] blk_mq_update_nr_hw_queues+0xaba/0x1190 block/blk-mq.c:5205 nbd_start_device+0x1a6/0xbd0 drivers/block/nbd.c:1489 nbd_start_device_ioctl drivers/block/nbd.c:1548 [inline] __nbd_ioctl drivers/block/nbd.c:1623 [inline] nbd_ioctl+0x4a6/0xd30 drivers/block/nbd.c:1663 blkdev_ioctl+0x5ad/0x6f0 block/ioctl.c:804 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fddf339c629 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe75944a58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fddf3615fa0 RCX: 00007fddf339c629 RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003 RBP: 00007fddf3432b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fddf3615fac R14: 00007fddf3615fa0 R15: 00007fddf3615fa0 block nbd0: shutting down sockets final repro crashed as (corrupted=false): ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.17/6084 is trying to acquire lock: ffffffff8e972d48 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 but task is already holding lock: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&q->q_usage_counter(io)#49){++++}-{0:0}: blk_alloc_queue+0x610/0x790 block/blk-core.c:461 blk_mq_alloc_queue+0x174/0x290 block/blk-mq.c:4429 __blk_mq_alloc_disk+0x29/0x120 block/blk-mq.c:4476 nbd_dev_add+0x492/0xb10 drivers/block/nbd.c:1954 nbd_init+0x291/0x2b0 drivers/block/nbd.c:2692 do_one_initcall+0x11d/0x760 init/main.c:1382 do_initcall_level init/main.c:1444 [inline] do_initcalls init/main.c:1460 [inline] do_basic_setup init/main.c:1479 [inline] kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692 kernel_init+0x1f/0x1e0 init/main.c:1582 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4348 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4362 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x166/0x5f0 mm/page_alloc.c:5018 __alloc_frozen_pages_noprof+0x19a/0x2ba0 mm/page_alloc.c:5239 __alloc_pages_noprof+0xb/0x1b0 mm/page_alloc.c:5284 __alloc_pages_node_noprof include/linux/gfp.h:285 [inline] alloc_pages_node_noprof include/linux/gfp.h:312 [inline] pcpu_alloc_pages mm/percpu-vm.c:95 [inline] pcpu_populate_chunk+0x118/0x990 mm/percpu-vm.c:285 pcpu_alloc_noprof+0x833/0x1c50 mm/percpu.c:1876 iommu_dma_init_fq_percpu drivers/iommu/dma-iommu.c:320 [inline] iommu_dma_init_fq+0x1da/0x7e0 drivers/iommu/dma-iommu.c:346 iommu_dma_init_domain drivers/iommu/dma-iommu.c:709 [inline] iommu_setup_dma_ops+0x1250/0x1630 drivers/iommu/dma-iommu.c:2106 bus_iommu_probe+0x264/0x550 drivers/iommu/iommu.c:1958 iommu_device_register+0x1af/0x280 drivers/iommu/iommu.c:285 intel_iommu_init+0x2020/0x2970 drivers/iommu/intel/iommu.c:2659 pci_iommu_init+0x3c/0x80 arch/x86/kernel/pci-dma.c:174 do_one_initcall+0x11d/0x760 init/main.c:1382 do_initcall_level init/main.c:1444 [inline] do_initcalls init/main.c:1460 [inline] do_basic_setup init/main.c:1479 [inline] kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692 kernel_init+0x1f/0x1e0 init/main.c:1582 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (pcpu_alloc_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 init_alloc_hint lib/sbitmap.c:16 [inline] sbitmap_init_node+0x2ff/0x720 lib/sbitmap.c:126 sbitmap_queue_init_node+0x40/0x4a0 lib/sbitmap.c:454 bt_alloc block/blk-mq-tag.c:546 [inline] blk_mq_init_tags+0x184/0x300 block/blk-mq-tag.c:571 blk_mq_alloc_rq_map block/blk-mq.c:3556 [inline] blk_mq_alloc_map_and_rqs+0x218/0xeb0 block/blk-mq.c:4124 __blk_mq_alloc_map_and_rqs block/blk-mq.c:4146 [inline] __blk_mq_alloc_map_and_rqs+0x128/0x1f0 block/blk-mq.c:4137 blk_mq_realloc_tag_set_tags block/blk-mq.c:4817 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5153 [inline] blk_mq_update_nr_hw_queues+0xaba/0x1190 block/blk-mq.c:5205 nbd_start_device+0x1a6/0xbd0 drivers/block/nbd.c:1489 nbd_start_device_ioctl drivers/block/nbd.c:1548 [inline] __nbd_ioctl drivers/block/nbd.c:1623 [inline] nbd_ioctl+0x4a6/0xd30 drivers/block/nbd.c:1663 blkdev_ioctl+0x5ad/0x6f0 block/ioctl.c:804 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: pcpu_alloc_mutex --> fs_reclaim --> &q->q_usage_counter(io)#49 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(io)#49); lock(fs_reclaim); lock(&q->q_usage_counter(io)#49); lock(pcpu_alloc_mutex); *** DEADLOCK *** 4 locks held by syz.0.17/6084: #0: ffff888028ba01d0 (&set->update_nr_hwq_lock){++++}-{4:4}, at: blk_mq_update_nr_hw_queues+0x91/0x1190 block/blk-mq.c:5203 #1: ffff888028ba00d8 (&set->tag_list_lock){+.+.}-{4:4}, at: blk_mq_update_nr_hw_queues+0xa4/0x1190 block/blk-mq.c:5204 #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] #2: ffff8880289b0060 (&q->q_usage_counter(io)#49){++++}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave block/blk-mq.c:206 [inline] #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: __blk_mq_update_nr_hw_queues block/blk-mq.c:5151 [inline] #3: ffff8880289b0098 (&q->q_usage_counter(queue)#33){+.+.}-{0:0}, at: blk_mq_update_nr_hw_queues+0x88e/0x1190 block/blk-mq.c:5205 stack backtrace: CPU: 3 UID: 0 PID: 6084 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 init_alloc_hint lib/sbitmap.c:16 [inline] sbitmap_init_node+0x2ff/0x720 lib/sbitmap.c:126 sbitmap_queue_init_node+0x40/0x4a0 lib/sbitmap.c:454 bt_alloc block/blk-mq-tag.c:546 [inline] blk_mq_init_tags+0x184/0x300 block/blk-mq-tag.c:571 blk_mq_alloc_rq_map block/blk-mq.c:3556 [inline] blk_mq_alloc_map_and_rqs+0x218/0xeb0 block/blk-mq.c:4124 __blk_mq_alloc_map_and_rqs block/blk-mq.c:4146 [inline] __blk_mq_alloc_map_and_rqs+0x128/0x1f0 block/blk-mq.c:4137 blk_mq_realloc_tag_set_tags block/blk-mq.c:4817 [inline] __blk_mq_update_nr_hw_queues block/blk-mq.c:5153 [inline] blk_mq_update_nr_hw_queues+0xaba/0x1190 block/blk-mq.c:5205 nbd_start_device+0x1a6/0xbd0 drivers/block/nbd.c:1489 nbd_start_device_ioctl drivers/block/nbd.c:1548 [inline] __nbd_ioctl drivers/block/nbd.c:1623 [inline] nbd_ioctl+0x4a6/0xd30 drivers/block/nbd.c:1663 blkdev_ioctl+0x5ad/0x6f0 block/ioctl.c:804 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fddf339c629 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe75944a58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fddf3615fa0 RCX: 00007fddf339c629 RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003 RBP: 00007fddf3432b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fddf3615fac R14: 00007fddf3615fa0 R15: 00007fddf3615fa0 block nbd0: shutting down sockets