On Wed, Oct 02, 2024 at 04:44:37PM -0600, Uday Shankar wrote: > @@ -1036,9 +1028,13 @@ static inline void __ublk_complete_rq(struct request *req) > else > __blk_mq_end_request(req, BLK_STS_OK); > > - return; > + goto put_task; > exit: > blk_mq_end_request(req, res); > +put_task: > + WARN_ON_ONCE(!data->task); > + put_task_struct(data->task); > + data->task = NULL; > } I suppose this is a bug, since the request could be reused once we call blk_mq_end_request, so we need to drop the task reference before that happens. Will fix this in v2, along with any other comments I receive on this.