io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: Jackie Liu <liuyun01@kylinos.cn>
Cc: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH v2] io_uring: reduced function parameter ctx if possible
Date: Fri, 8 Nov 2019 17:35:11 +0800	[thread overview]
Message-ID: <d7e625ae-4c9a-30a1-6f8d-2efd059d1e5f@oracle.com> (raw)
In-Reply-To: <F31F44A3-5120-4432-863E-4740AA494D28@kylinos.cn>

On 11/8/19 5:24 PM, Jackie Liu wrote:
> 
>>
>>> 2019年11月8日 17:10,Bob Liu <bob.liu@oracle.com> 写道:
>>>
>>> On 11/8/19 5:00 PM, Jackie Liu wrote:
>>>> oops, please ignore this, it's crash with commit '2665abfd757fb35a241c6f0b1ebf620e3ffb36fb'
>>>> I need test more, and resend later.
>>>>
>>>
>>> Hmm.. io_link_cancel_timeout() may free req..
>>>
>>
>> Actually, there is no problem with this patch. It is caused by a patch that I
>> have not sent yet, I will send it after doing more tests.
>>
> 
> Sad. rejected by mailing list? 
> 
> @@ -714,9 +714,9 @@ static void __io_free_req(struct io_kiocb *req)
>         kmem_cache_free(req_cachep, req);
>  }
> 
> -static bool io_link_cancel_timeout(struct io_ring_ctx *ctx,
> -                                  struct io_kiocb *req)
> +static bool io_link_cancel_timeout(struct io_kiocb *req)
>  {
> +       struct io_ring_ctx *ctx = req->ctx;
>         int ret;
> 
>         ret = hrtimer_try_to_cancel(&req->timeout.timer);
> 
> I use req directly to convert to ctx, there is no crash problem here.
> 

Oh, I see.. Sorry for miss that..

> --
> BR, Jackie Liu
> 
> 
> 


  reply	other threads:[~2019-11-08  9:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  7:29 [PATCH v2] io_uring: reduced function parameter ctx if possible Jackie Liu
2019-11-08  9:00 ` Jackie Liu
2019-11-08  9:10   ` Bob Liu
     [not found]     ` <7B6E98CA-22DE-4AFA-94C3-D65395A1629C@kylinos.cn>
2019-11-08  9:24       ` Jackie Liu
2019-11-08  9:35         ` Bob Liu [this message]
2019-11-08 14:11 ` Jens Axboe
2019-11-08 14:16   ` Jens Axboe
     [not found]     ` <5dc57d18.1c69fb81.78a44.b83dSMTPIN_ADDED_BROKEN@mx.google.com>
2019-11-08 14:39       ` Jens Axboe
     [not found]         ` <5dc57f27.1c69fb81.27d15.ccf4SMTPIN_ADDED_BROKEN@mx.google.com>
2019-11-08 14:47           ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7e625ae-4c9a-30a1-6f8d-2efd059d1e5f@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=liuyun01@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).