Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9231722pxu; Mon, 28 Dec 2020 09:58:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxe6TNzFKVGiK0YaAcjsKy+XNPBI3QV/qIJfqURGIJ6+b6nUC4S9uXp4s0mwIEbfbEiHnpe X-Received: by 2002:a05:6402:2da:: with SMTP id b26mr43539719edx.350.1609178317485; Mon, 28 Dec 2020 09:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609178317; cv=none; d=google.com; s=arc-20160816; b=KbHrt4R026XqhcbBfTN5QGBH9kyRAh6bl6iGI5JZhNapF3I7UhPkuR0QfjB3JiOtyQ WSmSGpr7wxEHoGgvDI9qq3s/OjmLLHDo5Ogo4+m3SfY+Zrq8pbVts6/IbE9iWjp4lBOH DxkhxH40RzF9axaYiLTLx8Wuh7SO/vdxqEepEn7i2xSlEXN5PNw6RWnfrYbbfk6Yz2yE jqepOv5QJ5qzVGJhIo5/bqRS3I0Qfw/USkoFk4ImPsKv3Y1aYMtcHlgbfmI6FWAVguW5 ikuUGqkLGcepHhZo8trsrk/cFn8sVxukC6f2lxG6b4sgM8g7Ma1XryXZO5dw0edZT+0G l3RQ== 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=z/GY4ORzvaHWP1bsFQd3qtaC4ERmOTDL8pgNw+XkJzJILwIW8/nAur5nk7b5Xm1Z/X 9JAZfQ+9LUrX3DlyuKFX4ega4TNTu63kmtEoot87wT7uqQ5zWc+/0yx0TLocKitlM96N pz5A2Zu7/QhsfrYd0kJhhngDn4LtXF463yjjB5eo0MPDFNXgtbCMZi/5kZtDK/pSjb+/ BEbsyi6t3iCDQPqS+ZGZ8G/qw61qHocYKreKm07it6S0HpI1BSADVLgrKL/KjnVZxM4x 1o8dVgvgcf7pqPyMt78+rCgy3Ca+/RIuBsZ4foAokTmyNyf0W3C6r9DlHC9FjHdsEXPv W2+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1rzvLmp/"; 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 r5si20388546edo.330.2020.12.28.09.58.15; Mon, 28 Dec 2020 09:58:37 -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="1rzvLmp/"; 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 S1732898AbgL1NTk (ORCPT + 99 others); Mon, 28 Dec 2020 08:19:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:48082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733079AbgL1NTg (ORCPT ); Mon, 28 Dec 2020 08:19:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE932207CF; Mon, 28 Dec 2020 13:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161535; bh=3pitrn+OSz+zq9Mn/OzSQ97Z+lpLb4gLAO+mHS1U07o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1rzvLmp/ELUBkBYjE+Z47j3mCID/We2G29rz5dwXLfaX2cZA0WCopUUZwHTpTvzOb G92LY9Rbg18GtOOOJv0cYz2Xw4mZ28v/cRokBAdB5vrfY2GM+RbI+X2m+v9CHwDeWn lgklrDxni6dxiIUMSu/D8lh/aE8BjPqDDRd+ywsQ= 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 4.14 238/242] xen/xenbus/xen_bus_type: Support will_handle watch callback Date: Mon, 28 Dec 2020 13:50:43 +0100 Message-Id: <20201228124916.402987167@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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"); }