mirror of
https://github.com/opnsense/src.git
synced 2026-04-01 23:45:12 -04:00
do drain (flush_workqueue() in Linux terms) but instead returns true if the work was removed before it is run, or false otherwise. Simulate this by removing the taskqueue_drain() and return the value derived from taskqueue_cancel()'s return value. This would solve a witness warning caused by calling taskqueue_drain() with a non-sleepable lock held, like: taskqueue_drain with the following non-sleepable locks held: exclusive rw lle (lle) r = 0 (0xfffffe001450b410) locked @ /usr/src/sys/netinet/in.c:1484 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffff848d4f7690 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff848d4f7740 witness_warn() at witness_warn+0x4a8/frame 0xffffff848d4f7800 taskqueue_drain() at taskqueue_drain+0x3a/frame 0xffffff848d4f7840 set_timeout() at set_timeout+0x4a/frame 0xffffff848d4f7860 netevent_callback() at netevent_callback+0x16/frame 0xffffff848d4f7870 arpintr() at arpintr+0x9b5/frame 0xffffff848d4f7930 This do not affect kernel without OFED compiled in. Reported by: Garrett Cooper <yaneurabeya gmail com> (who also tested an earlier version of this patch, but bugs are mine) MFC after: 2 weeks |
||
|---|---|---|
| .. | ||
| mlx4 | ||
| bitmap.h | ||
| bitops.h | ||
| cdev.h | ||
| compat.h | ||
| compiler.h | ||
| completion.h | ||
| ctype.h | ||
| delay.h | ||
| device.h | ||
| dma-attrs.h | ||
| dma-mapping.h | ||
| dmapool.h | ||
| err.h | ||
| errno.h | ||
| ethtool.h | ||
| file.h | ||
| fs.h | ||
| gfp.h | ||
| hardirq.h | ||
| idr.h | ||
| if_arp.h | ||
| if_ether.h | ||
| if_vlan.h | ||
| in.h | ||
| in6.h | ||
| inet.h | ||
| inetdevice.h | ||
| init.h | ||
| interrupt.h | ||
| io-mapping.h | ||
| io.h | ||
| ioctl.h | ||
| jhash.h | ||
| jiffies.h | ||
| kdev_t.h | ||
| kernel.h | ||
| kobject.h | ||
| kref.h | ||
| kthread.h | ||
| linux_compat.c | ||
| linux_idr.c | ||
| linux_radix.c | ||
| list.h | ||
| lockdep.h | ||
| log2.h | ||
| miscdevice.h | ||
| mm.h | ||
| module.h | ||
| moduleparam.h | ||
| mount.h | ||
| mutex.h | ||
| net.h | ||
| netdevice.h | ||
| notifier.h | ||
| page.h | ||
| pci.h | ||
| poll.h | ||
| radix-tree.h | ||
| random.h | ||
| rbtree.h | ||
| rtnetlink.h | ||
| rwlock.h | ||
| rwsem.h | ||
| scatterlist.h | ||
| sched.h | ||
| semaphore.h | ||
| slab.h | ||
| socket.h | ||
| spinlock.h | ||
| stddef.h | ||
| string.h | ||
| sysfs.h | ||
| timer.h | ||
| types.h | ||
| uaccess.h | ||
| vmalloc.h | ||
| wait.h | ||
| workqueue.h | ||