Received: by 10.223.185.116 with SMTP id b49csp4148088wrg; Mon, 26 Feb 2018 12:03:21 -0800 (PST) X-Google-Smtp-Source: AH8x227apmQEoRGTt19FXqAYnj5ryssNy5JGcfI8/XlBWEXx0k7IAQeByDwypxzSyIV6tfxUHzMk X-Received: by 2002:a17:902:7786:: with SMTP id o6-v6mr11448695pll.2.1519675401058; Mon, 26 Feb 2018 12:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519675401; cv=none; d=google.com; s=arc-20160816; b=EaXEtmWv6ZEuBL/83ut3MvWSS+yNksUosgx6jUDj5dwvfyuP4vVODHC8dvAh8f+Zd0 GFFpipmsOZbYqsYR7QIivSmDc3Fp6ViQMcOo8srCvwatUczAorwHfhYr4DtgnRL+mtNb 0/1M6HfdG7W/2Ki4xojWJBk/bObLdydKNzT9eRxiQYIgyNGTCPzuWNQMortO4lqeCWE2 H+x9Ac9OVQErDAdKr+r4oZJ0S2XAgk6yHXSxKzI0lLDVso+ol0ToLSEz++UwlytLgOsr Sd9tFfjB17YULs8MoRFONVq0yZ4nVTQKUV9aR8Fb0MloCuiu7BftuJA9gEkCrdoPKdVV QI8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=CEb6ujBNxTrJD7n9uqsBb831jpip22gBP1Iep60n0tc=; b=RM6VpRz5/HRKLcJhvggGx69emqxzCUVv7kk8qqM1TXWiVXUVwT1cH1jCSCHjlYtVvW 28iTEVVykL5WziEFNyDZo+1mFMi57OSoatZFN70+9305pr4AhuN0U2J9H/xUCcCPQqs6 03BaSVLFZfm20g0CDJ25D/YhDC4ZehVx15t7QDclgvPBmOaiAaBNS/BQhwUOP9QgTVnG sHgolWkn0YlWtvVScsHTiIISjJmevKvGluQLMOdHCd6wzl1dBqjV4atHgIOsPUoyic33 DRqAPgoHj5VlyOUF/iAUGBEMiTgXjPWEO0FJK4hObW7QiRtkFXwc1KyQo68YpgEfPYU8 K/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=JIZ9eRcZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si5911101pgq.557.2018.02.26.12.03.03; Mon, 26 Feb 2018 12:03:21 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=JIZ9eRcZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751343AbeBZUCT (ORCPT + 99 others); Mon, 26 Feb 2018 15:02:19 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38998 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbeBZUCR (ORCPT ); Mon, 26 Feb 2018 15:02:17 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1QK0vjC077173; Mon, 26 Feb 2018 20:01:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=CEb6ujBNxTrJD7n9uqsBb831jpip22gBP1Iep60n0tc=; b=JIZ9eRcZ6FoNq2L0CzfGu3fxZZoCjPbS/zikS1zHECCPMRW0DsPbaCB33xI1Xwb+yz0K FkiV8ZHvoky0VlOaCL1i44XNJBS61lnH1/rTM9GdQ55yFeHvFgVKk0FRy5B70sgSu3uv CCkTJa9HcA7Zk9k18GLMY1x6zVFXveezXROsLfVOncPPp9buvzyRrPHSeTITWYa8ETxk 2RhPAa7e1LxK1GfHexDjybMeBKgBDid1prtWbEyxJ9nJKzwoydZGuu45Dbk2bJ60aFt3 xkUnSicjK6nU0ZHkRz/7AvtToUtidOfmkC7LmH0DTupyoT3SpxFPB61KuFdHgHE8tdls vg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2gcrw9r06e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Feb 2018 20:01:57 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1QK1upD000879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Feb 2018 20:01:56 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1QK1tuI020725; Mon, 26 Feb 2018 20:01:55 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Feb 2018 12:01:55 -0800 Subject: Re: [PATCH 1/2] xen: fix out-of-bounds irq unbind for MSI message groups To: Amit Shah , xen-devel@lists.xenproject.org Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , David Vrabel , Eduardo Valentin , Juergen Gross , Thomas Gleixner , "K. Y. Srinivasan" , Liu Shuo , Anoob Soman References: <1519666595-41362-1-git-send-email-aams@amazon.com> <1519666595-41362-2-git-send-email-aams@amazon.com> From: Boris Ostrovsky Message-ID: Date: Mon, 26 Feb 2018 15:02:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1519666595-41362-2-git-send-email-aams@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8816 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802260253 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/26/2018 12:36 PM, Amit Shah wrote: > When an MSI descriptor was not available, the error path would try to > unbind an irq that was never acquired - potentially unbinding an > unrelated irq. > > Fixes: 4892c9b4ada9f9 ("xen: add support for MSI message groups") > Reported-by: Hooman Mirhadi > CC: > CC: Roger Pau Monné > CC: David Vrabel > CC: Boris Ostrovsky > CC: Eduardo Valentin > CC: Juergen Gross > CC: Thomas Gleixner > CC: "K. Y. Srinivasan" > CC: Liu Shuo > CC: Anoob Soman > Signed-off-by: Amit Shah > --- > drivers/xen/events/events_base.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c > index 1ab4bd1..b6b8b29 100644 > --- a/drivers/xen/events/events_base.c > +++ b/drivers/xen/events/events_base.c > @@ -749,6 +749,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, > } > > ret = irq_set_msi_desc(irq, msidesc); > + i--; > if (ret < 0) > goto error_irq; We really only need to do this in case of an error. (And this patch needs to go to stable trees as well.) Thanks -boris