Hi Jens, On Tue, Nov 23, 2021 at 12:15:18PM -0700, Jens Axboe wrote: > +bool blk_stats_alloc_enable(struct request_queue *q) > +{ > + struct blk_rq_stat *poll_stat; > + > + poll_stat = kcalloc(BLK_MQ_POLL_STATS_BKTS, sizeof(*poll_stat), > + GFP_ATOMIC); > + if (!poll_stat) > + return false; > + > + if (cmpxchg(&q->poll_stat, poll_stat, NULL) != poll_stat) { Isn't the logic inverted here? As we already check for non-NULL q->poll_stat at the caller side, shouldn't it be: if (cmpxchg(&q->poll_stat, NULL, poll_stat) != NULL) { > + kfree(poll_stat); > + return true; > + } > + > -- > 2.34.0 > Regards, Pankaj