This did not occur with kernel v5.0-rc8 but apparently occurs with linux-next-20190301: ------------[ cut here ]------------ kernel BUG at fs/inode.c:1563! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 PID: 5367 Comm: pktsetup Not tainted 5.0.0-rc8-next-20190301-dbg+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 RIP: 0010:iput+0x3e9/0x400 Call Trace: __blkdev_put+0x317/0x3d0 blkdev_put+0x62/0x200 pkt_remove_dev+0x1d9/0x290 [pktcdvd] pkt_ctl_ioctl+0x27f/0x2b0 [pktcdvd] do_vfs_ioctl+0x144/0xa20 ksys_ioctl+0x41/0x80 __x64_sys_ioctl+0x43/0x50 do_syscall_64+0x77/0x220 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fd075ba13c7 ---[ end trace fe01d1e8554ccd65 ]--- The iput() implementation: void iput(struct inode *inode) { if (!inode) return; BUG_ON(inode->i_state & I_CLEAR); retry: if (atomic_dec_and_lock(&inode->i_count, &inode->i_lock)) { if (inode->i_nlink && (inode->i_state & I_DIRTY_TIME)) { atomic_inc(&inode->i_count); spin_unlock(&inode->i_lock); trace_writeback_lazytime_iput(inode); mark_inode_dirty_sync(inode); goto retry; } iput_final(inode); } } EXPORT_SYMBOL(iput);
See also bug #207317