Re: [PATCH v2] io_uring: fix CQ waiting timeout handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/11/23 06:39, Xiaoguang Wang wrote:
hello,

  	/*
@@ -2564,7 +2564,7 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
  		}
  		prepare_to_wait_exclusive(&ctx->cq_wait, &iowq.wq,
  						TASK_INTERRUPTIBLE);
-		ret = io_cqring_wait_schedule(ctx, &iowq, timeout);
+		ret = io_cqring_wait_schedule(ctx, &iowq, &timeout);
  		if (__io_cqring_events_user(ctx) >= min_events)
  			break;
  		cond_resched();
Does this bug result in any real issues?
io_cqring_wait_schedule() calls schedule_hrtimeout(), but seems that
schedule_hrtimeout() and its child functions don't modify timeout or expires
at all, so I wonder how this patch works. Thanks.

Looked it up, you're right, I guess passing a pointer and one example
using it this way convinced me that it should be the case. Even more
interesting that as there is only HRTIMER_MODE_ABS and no relative
modes as before (IIRC) it wasn't a bug in the first place. Thanks
for taking a look

--
Pavel Begunkov



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux