Received: by 10.223.185.116 with SMTP id b49csp2072093wrg; Mon, 12 Feb 2018 03:56:37 -0800 (PST) X-Google-Smtp-Source: AH8x224Yhr8EA29cf21x+emF6H3bkmyEIhFR/dJ/qupZj5yIdAVyg3g/tl9ivmF9SUp058KWEshl X-Received: by 2002:a17:902:7445:: with SMTP id e5-v6mr9113704plt.204.1518436597007; Mon, 12 Feb 2018 03:56:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518436596; cv=none; d=google.com; s=arc-20160816; b=ibQY36je9TGCNdw/WCV3skXFZ6PC2l6TamnR2N2M8xTgCVclM4KqDIKsZXxK9lTxWI KoTGGlL6mzNtqbvdJNAW13Ixw5Dmcb75+3IpZ/X6LcCr1dLfu6JfjouxA3REH/K4+bgt a8zDOrrEJ+i9jJg9L0jqa7KZT1vaiqJxE8OZOTuaj2LVTWGENebBbr+lpRs/nUW6IyCA UGOvrWrF6Sl2lIFLtvcOtqzAwMP+6Ck8/pEBVxpsVSoRxaW59EUmhpk582tUpm22l7Ft 3U2cd/JvnX0IixEKpOEjbu/dDNRdcAl5snIdx5c8l3B91s3dofZSHsqDpT94LL7DC2i2 YE8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=F798XQ24ROZqGTEW9soVOdRz9xhGr3ZSFqJT8aHeFXc=; b=aE0ekZiRfl4mA5/mwtLaLG5ds/rZYnfjSI+Ke0I0oyL8M4IotBOz492XYUxG0KSka4 EFxa9b5azCVq+lPyAke4OTSR7Gor+NhKTtLJVGcF3/SQ4oXikyiMAJpfv5EjopOrwHi+ lJyPykgjbEdzpyymqhd3f8WskCR7OKA1BsjlI+l+L3Po7/3mYZwi8iB1bp4ZVxyuuoqN Me4tQoN5v98PBfaxanADqUm8ZUrG842/IeSeEk8DoXBSSmJQrxdWNc+GFiI3fwIdxTFf 0bx3IuI2ItaI9HbjEYdKSE7DLlkNratCi/lg0T7b8vi+1PfAfALAWGa3mXB+UbczNGOr byog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o21si2507616pfj.203.2018.02.12.03.56.23; Mon, 12 Feb 2018 03:56:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbeBLJGa (ORCPT + 99 others); Mon, 12 Feb 2018 04:06:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:38918 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbeBLJG2 (ORCPT ); Mon, 12 Feb 2018 04:06:28 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E2ED5AB5D; Mon, 12 Feb 2018 09:06:26 +0000 (UTC) Subject: Re: [PATCH 1/2] xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling To: Simon Gaiser , xen-devel@lists.xenproject.org Cc: stable@vger.kernel.org, Boris Ostrovsky , linux-kernel@vger.kernel.org References: <20180207222236.7434-1-simon@invisiblethingslab.com> From: Juergen Gross Message-ID: <1fbf69f9-f835-897e-144f-8c6f8b94cd26@suse.com> Date: Mon, 12 Feb 2018 10:06:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/02/18 09:49, Juergen Gross wrote: > On 07/02/18 23:22, Simon Gaiser wrote: >> Commit fd8aa9095a95 ("xen: optimize xenbus driver for multiple >> concurrent xenstore accesses") made a subtle change to the semantic of >> xenbus_dev_request_and_reply() and xenbus_transaction_end(). >> >> Before on an error response to XS_TRANSACTION_END >> xenbus_dev_request_and_reply() would not decrement the active >> transaction counter. But xenbus_transaction_end() has always counted the >> transaction as finished regardless of the response. > > Which is correct now. Xenstore will free all transaction related > data regardless of the response. A once failed transaction can't > be repaired, it has to be repeated completely. > > The real problem is decrementing the counter when XS_TRANSACTION_END > for a non-existing transaction is being sent. > >> The new behavior is that xenbus_dev_request_and_reply() and >> xenbus_transaction_end() will always count the transaction as finished >> regardless the response code (handled in xs_request_exit()). > > ENOENT should not decrement the transaction counter, while all > other responses to XS_TRANSACTION_END should still do so. Sorry, I stand corrected: the ENOENT case should never happen, as this case is tested in xenbus_write_transaction(). It doesn't hurt to test for ENOENT, though. What should be handled is EINVAL: this would happen if a user specified a string different from "T" and "F". Juergen