In the Linux kernel, the following vulnerability has been resolved: soc: fsl: qbman: fix race condition in qmandestroyfq When QMANFQFLAGDYNAMICFQID is set, there's a race condition between fqtable[fq->idx] state and freeing/allocating from the pool and WARNON(fqtable[fq->idx]) in qmancreatefq() gets triggered. Indeed, we can have: Thread A Thread B qmandestroyfq() qmancreatefq() qmanreleasefqid() qmanshutdownfq() genpoolfree() -- At this point, the fqid is available again -- qmanallocfqid() -- so, we can get the just-freed fqid in thread B -- fq->fqid = fqid; fq->idx = fqid * 2; WARNON(fqtable[fq->idx]); fqtable[fq->idx] = fq; fqtable[fq->idx] = NULL; And adding some logs between qmanreleasefqid() and fqtable[fq->idx] = NULL makes the WARNON() trigger a lot more. To prevent that, ensure that fqtable[fq->idx] is set to NULL before genpoolfree() is called by using smp_wmb().