Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6101201ybi; Wed, 29 May 2019 02:54:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgqT0jRyNG1Nn0Bq0VIZLjYaP9Zjv0ylvrPVD8TDc0q3FjQzzy7qL7QRSc+Uh4UDqkKQFE X-Received: by 2002:a17:902:7089:: with SMTP id z9mr44276953plk.335.1559123685655; Wed, 29 May 2019 02:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559123685; cv=none; d=google.com; s=arc-20160816; b=Vz8alSGnTGPCqHyX4ObRXMoe3/gxnUZRiK6C7lhpkFJ891SOhLfI9xUWm8A2W847XS m560GD5bV5sbM3UW858LsL4b8vUwUC/Pt+BfdfwSRBoHFt5Uh+1k6FEMQo3Tk0OqQQSE skmBZYVr4ylDbYZ2lOUCMpl6j9bFlvxXSSXV91WUxvbAdGPbWPo1oObaKQN1e+RqVIbV NCWZXwysEKnFep3igoCGK8s/YUcQdgBvUwVZ3w6Wte9Nhisqn47ccxWS+Ic1lvmfMgT5 fZrjAJgSIQL0eE7pXPXPwXobHW1/vvRBYrMajb5OLC78Igy1v6SIRQmVY6dvvputSQJc hs7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references :subject:cc:to:from:date:message-id; bh=qUZUDI2oW9rWJc3pI43SV8L7N9vaFOBkGOHBys9KQ1I=; b=JYade+UvnsONIFTR8wK1AwcW1g83YPBdEfG3l411Su/Vw0GvNurVGJnblEPkl9wBef wd2MqpDOtd4yHroh5JKCErN7RC6WQytEcsQxo6QCr8r75NV8JapTwGUwVVWN56ayCpCj 2IHmSDMMzU8WEM1VXiiRgfnfesuGORI4TvJPha0l3ygYNrZNdYLoG2YDX/290RF9M0ZL ZaGJ7u9rAby6Xk2BJobOSjKnU5c4OcRSpkqAI8S15KflkoVwQtPFpQ/gn9LXIZOAO7a4 8XMx0RAuiKuQzIPVoHBDDeTKtjmCoZWbRZX0p308s+FcROOTBDPWn3/i6bf0Olb0MkZY Gr7g== 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 h3si6355235pjb.19.2019.05.29.02.54.29; Wed, 29 May 2019 02:54:45 -0700 (PDT) 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 S1726254AbfE2JwX convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 May 2019 05:52:23 -0400 Received: from prv1-mh.provo.novell.com ([137.65.248.33]:33324 "EHLO prv1-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfE2JwX (ORCPT ); Wed, 29 May 2019 05:52:23 -0400 Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Wed, 29 May 2019 03:52:22 -0600 Message-Id: <5CEE56510200007800233550@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.1.1 Date: Wed, 29 May 2019 03:52:17 -0600 From: "Jan Beulich" To: "Juergen Gross" Cc: "Stefano Stabellini" , , "xen-devel" , "Boris Ostrovsky" , "Konrad Rzeszutek Wilk" , , Subject: Re: [Xen-devel] [PATCH v2 1/3] xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() References: <20190529090407.1225-1-jgross@suse.com> <20190529090407.1225-2-jgross@suse.com> In-Reply-To: <20190529090407.1225-2-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 29.05.19 at 11:04, wrote: > The condition in xen_swiotlb_free_coherent() for deciding whether to > call xen_destroy_contiguous_region() is wrong: in case the region to > be freed is not contiguous calling xen_destroy_contiguous_region() is > the wrong thing to do: it would result in inconsistent mappings of > multiple PFNs to the same MFN. This will lead to various strange > crashes or data corruption. > > Instead of calling xen_destroy_contiguous_region() in that case a > warning should be issued as that situation should never occur. > > Cc: stable@vger.kernel.org > Signed-off-by: Juergen Gross > Reviewed-by: Boris Ostrovsky Reviewed-by: Jan Beulich