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

Re: [PATCH 03/10] tools/xenstore: Don't assume conn->in points to the LU request


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Luca Fancellu <luca.fancellu@xxxxxxx>
  • Date: Thu, 24 Jun 2021 08:56:56 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nLqfbhX6NaaxpoFNyV/1TQMz4uCXhbWpJ0jXuUgd7Ds=; b=BewtCYcUQ1/3/oxfU1Dhs672QMoMSpL4oMwDjmD8sab4znHeEz75EmeZL5jmJquTsqVIlr/JsZ2+QWfnFUthEVmcWSnzvpY+34yEW4jo/8bsdALOy6lX6lBFyEEuaU4IUMuatvkczlG2oHQHkhoBM7jnyBOOj842rYO3Z7XVVPVlme2xVMrmzn0noyrgUaExys3TS8xfnrMEkDhiVZU0h50JtnSLLUgudcgzA/IklaaiR1FCR34KbxxaYCYd/7kNK+6MLfP7/k8NXIZR4cqt3Y6S6h+Nf7jWc7/Z30WtRrsoPkeGd8bQiRaybk2zdM0iVq9avWvoAG6rv7qC0lXs7A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U0f78UW3uOpHNusd4o9kDHiVbWLJUw1IHOZzFtjGoEjCW2qgo2Jq/tpWj5UK+Ju5YDmbFCs3tYfmztWCMRlv1cSGjc5bffZFqjs6drP7Q7ljxhzbgxCPZNz3IMZOWuR3TTzubCfuWGsed3PKtU7nIGCzlnfNMDs/McmOUGbbWHaJPrhy58OeUSdQdB9fFRTsIKF2Ucv39MycwpMgZ1ArH/RtHkuk1IkP7q0Cf9tfZ+B31fBfxfKLjjQSePEtfPYbWDWIuz2/9C3YNQj+OK2jjs2bIhlvP5K1SS2fxN6RNEm3WbJngMsLVcLbI4NBy92fKxLjSlfqGvOVD5OwJzey3w==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, raphning@xxxxxxxxxxxx, doebel@xxxxxxxxx, Julien Grall <jgrall@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 24 Jun 2021 07:57:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;


> On 24 Jun 2021, at 08:34, Juergen Gross <jgross@xxxxxxxx> wrote:
> 
> On 24.06.21 09:32, Juergen Gross wrote:
>> On 16.06.21 16:43, Julien Grall wrote:
>>> From: Julien Grall <jgrall@xxxxxxxxxx>
>>> 
>>> call_delayed() is currently assuming that conn->in is NULL when
>>> handling delayed request. However, the connection is not paused.
>>> Therefore new request can be processed and conn->in may be non-NULL
>>> if we have only received a partial request.
>>> 
>>> Furthermore, as we overwrite conn->in, the current partial request
>>> will not be transferred. This will result to corrupt the connection.
>>> 
>>> Rather than updating conn->in, stash the LU request in lu_status and
>>> let each callback for delayed request to update conn->in when
>>> necessary.
>>> 
>>> To keep a sane interface, the code to write the "OK" response the
>>> LU request is moved in xenstored_core.c.
>>> 
>>> Fixes: c5ca1404b4 ("tools/xenstore: add support for delaying execution 
> 
>>> of a xenstore request")
>>> Fixes: ed6eebf17d ("tools/xenstore: dump the xenstore state for live 
>>> update")
>>> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
>> With dropping the conn parameter from call_delayed as already
>> mentioned by Luca you can add my:
> 
> Oh, please drop my request to delete the conn parameter, as it is being
> used in patch 4 again.
> 
>> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> 
> This stands, of course.

Hi Juergen,

I’m sorry but I don’t see when the parameter is used, in patch 4 we have this 
call:

line 2344:
        if (delayed_requests) {
            list_for_each_entry(conn, &connections, list) {
                struct delayed_request *req, *tmp;

                list_for_each_entry_safe(req, tmp,
                             &conn->delayed, list)
                    call_delayed(conn, req);
            }
        }

But call_delayed is still this one:

Line 273:
static void call_delayed(struct connection *conn, struct delayed_request *req)
{
    if (req->func(req)) {
        undelay_request(req);
        talloc_set_destructor(req, NULL);
    }
}

Am I missing something?

Cheers,
Luca

> 
> 
> Juergen
> <OpenPGP_0xB0DE9DD628BF132F.asc>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.