public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jackie Liu <[email protected]>
To: Bob Liu <[email protected]>
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: Re: [PATCH v2] io_uring: reduced function parameter ctx if possible
Date: Fri, 8 Nov 2019 17:24:10 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>


> 
>> 2019年11月8日 17:10,Bob Liu <[email protected]> 写道:
>> 
>> 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.

--
BR, Jackie Liu




  parent reply	other threads:[~2019-11-08  9:24 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]     ` <[email protected]>
2019-11-08  9:24       ` Jackie Liu [this message]
2019-11-08  9:35         ` Bob Liu
2019-11-08 14:11 ` Jens Axboe
2019-11-08 14:16   ` Jens Axboe
     [not found]     ` <[email protected]>
2019-11-08 14:39       ` Jens Axboe
     [not found]         ` <[email protected]>
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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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