Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9211552pxu; Mon, 28 Dec 2020 09:23:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMvk2G+y18wF1CvtVuv5Xpk7U2OheDukqlJYwyJRZZel2VzbYwbJv8xHVg9NOshd14QCRr X-Received: by 2002:a17:906:3401:: with SMTP id c1mr43610614ejb.156.1609176207525; Mon, 28 Dec 2020 09:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609176207; cv=none; d=google.com; s=arc-20160816; b=TW7rhtZ3GTLrgumjeDyk0+PhoF+DpPLNCsK5g0l6M821BVPd/vwMONZDB/NeKl2JSt F/zQPPJmngZFyxMivGTbl/rSvWnxmvAGK2qO3k6tDCICqEk6uc3+fzBN5BJaVAxWcbfg H3tOL/7T2FfZK1mIlf8xayepFgIwNKqkjNUpnSJ1xhNQM8z8VcuRN9Xk8DT8yyB3gdcJ Z3nTOHhZQm2B9hpsKLoQoyYOgwPujANbPJM52N1iZy78QwztslVABUk38OOPU7OKJrmP yYqtzs7EGd22AQ7zv19suA/PDpMx2uzK/fpD0P1HVrvkk28E8VWbnMPS+7qlOh0GKsPG GNiQ== 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=2SMFXZYJGFsvdAXBwSM4EVqPm2iQMHDsVTkv7Lw6J68=; b=mgPAi/PznaWiFk+wjlbXUfmQXccy6FQ0U4BWe4q6JzHNDPeC5seWA1uwbmGZT9QA/1 6B5MA2VIMAFLXDVTTa7LeEKkzrW0PDE8hFKssc43+VIxnNhETq5M1vmTOi4eUWwrwYZ5 OlAsntpCviNixzqYQSyhis5NB9Y8gdPyO1mFeV4MweFteYVs9rIlFluOHWkRQW76V9VQ DZQehGaMH/TbOsuSClkaz5R2RsvWBEgU1eq+UYmhADc9MQ9aj6bxs9n/8MqVlQ4SYJeF aDvWexYmHm/trjuWw6n+OzkDXSj6uiWBTCh5HD2Zn405vVso5DbqKX6wVP2tSU81Ffxx 4Msg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="GD/AOkMR"; 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 md16si19288753ejb.563.2020.12.28.09.23.05; Mon, 28 Dec 2020 09:23:27 -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="GD/AOkMR"; 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 S1729201AbgL1M6j (ORCPT + 99 others); Mon, 28 Dec 2020 07:58:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:54934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgL1M6h (ORCPT ); Mon, 28 Dec 2020 07:58:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B1F3B22573; Mon, 28 Dec 2020 12:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160276; bh=ZhPJvr4T5Hc51Jhsmbvw8vrcuIYjwobBSzb5/C5zD2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GD/AOkMRbe/eXitbUba25C02f0sPMshZyGHdmMHbauQcRxeCzj01Fnc1JWi1HSXYg YThFKEEIz45yAGCmgMibGCU2JH7ZyNPQ0yBKSBH9j0oJVJObgTpszDdpPDOj8nbGby NpuT8lJDLtaweaR11CHKHnGwPC4suaeRk1zdj6SA= 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.4 129/132] xen/xenbus/xen_bus_type: Support will_handle watch callback Date: Mon, 28 Dec 2020 13:50:13 +0100 Message-Id: <20201228124852.641102092@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124846.409999325@linuxfoundation.org> References: <20201228124846.409999325@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_probe.c | 3 ++- drivers/xen/xenbus/xenbus_probe.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -137,7 +137,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"); } --- a/drivers/xen/xenbus/xenbus_probe.h +++ b/drivers/xen/xenbus/xenbus_probe.h @@ -42,6 +42,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 **vec, unsigned int len); void (*otherend_changed)(struct xenbus_watch *watch, const char **vec, unsigned int len); struct bus_type bus;