Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9414435pxu; Mon, 28 Dec 2020 15:43:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzaqJGDN+Nl6dqwiEd/WgW5a+V39oIjeN5OdTblxUjb4auec9bE5lL0KjzvFW/4wfG75sE X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr43048083ejb.163.1609199021510; Mon, 28 Dec 2020 15:43:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609199021; cv=none; d=google.com; s=arc-20160816; b=zTk2e1iO6+7tJTQPLfTOuWsqA0+HHO9btzIs0ukpedwzZT80muKPRYp0xnNJy+IbeG Mu6tIv+D1/Vq6we+0coXoUIRIJz0UiDuOO0LYqqxYiBbinft+qSaYjbr0bmQ6+6YrpSq fWQSTnL7wY0ANHykXq/UsXzCKyTgNAsyI1luQgkg6qD+IHeN3EJEUZA3zVob8wfoOFzS YpPAlyNotzQYSqakDDqe43YHmkUlx+enVdqSQqpbTfOmdoDO0tW923JgWUIJBIn50w3O ozrm423WWQBIscdtUg9N4vNFGv6PiXrR66pn/gNVaMnGP6ZN9jEmNM4qPFNIwspG1uPB Bl/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MZyDrBFS0sfrrCwiyeLzDTHUtlX1x15jz/hhhJliTDM=; b=dNBMY6I7uGqTPB8roa5NtIpSW1aBOl792/OSmXSRdEBrjyZsSDaktIe4GbU/aZBr2W gWYl9qTOyPQcFtOMpL5F6A+cUiQ4HWqqLnb2BYKlzGDfYcm1iJcKNXz5UEGne2hc62Cb aMtu/qt2Cjwc8H1SWDELS44fhrFw/Xohrbi+E5wA+Efz8M670b/ALjwlR+VV7Izm+55J PXEqowQv0aM+qOEYpwg8TXOKC0PDiW7+PvN1g3f7wY2OiDQSawa8w5ojpEI6OC4lNVpn 7VFUG3D/z6kv7T8bb1I3Bi+80x3Gq7MKFTN/MQxJYyh1hl6cnsI4b3j5qRCNxgqnSIfZ C8Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2jKY1c1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si21493067eji.682.2020.12.28.15.43.19; Mon, 28 Dec 2020 15:43:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2jKY1c1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504876AbgL1OdC (ORCPT + 99 others); Mon, 28 Dec 2020 09:33:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:40532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504707AbgL1Ocb (ORCPT ); Mon, 28 Dec 2020 09:32:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94F97221F0; Mon, 28 Dec 2020 14:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165911; bh=3pitrn+OSz+zq9Mn/OzSQ97Z+lpLb4gLAO+mHS1U07o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2jKY1c1JndskNa3TzejPgmRTu2qY3GanOnMFIEE+LURQTTcH5f+h+U4Lxuiz+EDNz cdbk5VQDH38P/iBuhQb9FdYXKy9PZS6xzEm81lM1DARr8Oezsa1d3YKR1IpoNvSkox KXmzD50pwgguSxW858idyc4nYOqp41yc7sNjuGJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, SeongJae Park , Michael Kurth , Pawel Wieczorkiewicz , Juergen Gross Subject: [PATCH 5.10 698/717] xen/xenbus/xen_bus_type: Support will_handle watch callback Date: Mon, 28 Dec 2020 13:51:36 +0100 Message-Id: <20201228125054.430346538@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park commit be987200fbaceaef340872841d4f7af2c5ee8dc3 upstream. This commit adds support of the 'will_handle' watch callback for 'xen_bus_type' users. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman --- drivers/xen/xenbus/xenbus.h | 2 ++ drivers/xen/xenbus/xenbus_probe.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) --- a/drivers/xen/xenbus/xenbus.h +++ b/drivers/xen/xenbus/xenbus.h @@ -44,6 +44,8 @@ struct xen_bus_type { int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename); int (*probe)(struct xen_bus_type *bus, const char *type, const char *dir); + bool (*otherend_will_handle)(struct xenbus_watch *watch, + const char *path, const char *token); void (*otherend_changed)(struct xenbus_watch *watch, const char *path, const char *token); struct bus_type bus; --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -136,7 +136,8 @@ static int watch_otherend(struct xenbus_ container_of(dev->dev.bus, struct xen_bus_type, bus); return xenbus_watch_pathfmt(dev, &dev->otherend_watch, - NULL, bus->otherend_changed, + bus->otherend_will_handle, + bus->otherend_changed, "%s/%s", dev->otherend, "state"); }