Received: by 10.223.185.116 with SMTP id b49csp6552208wrg; Wed, 28 Feb 2018 11:23:37 -0800 (PST) X-Google-Smtp-Source: AH8x226bDq2ELgUjZ7dh/5Vi2m1kNkBja8eoliTR3NjEuIKPL+ll51gvOyQvB7uFy3KZy/zDy6c0 X-Received: by 2002:a17:902:a504:: with SMTP id s4-v6mr19570026plq.43.1519845817498; Wed, 28 Feb 2018 11:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519845817; cv=none; d=google.com; s=arc-20160816; b=YzMr5HPzS+sRGv3MRGTDFCABUQoS7ZzRprAjlsu2wWDRZ8CbVFomK/lPB4yowIDwXU S1nwMjw+aR/zYNdbeQ6RLvWOA2gG23df49z6Bqsvj/j9SR4WMSFnbUN48omrEycnILY6 NQOleJN3yjYoh5PE0ohUnqe771TtAQWeQyK4zY3bKP9a7jsKj1SuQL5CklCWpId4HI8m 2rKfwz/CflnhRyNCPQY/TqDlZ0skmh5qajAIil1ZptXXZRbMXcy+zQh9oKVE98fMo8dZ LBw4Ug06bFYxb/hdRfjfpDvwQGt72ea7P20aNb41dKfwf0FyWI9+8AvEQD3zvnTYRynS zOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=wN9bp+O0muhcb8BTqFuES8Rj1PfyFXouUlbfZbjpO24=; b=KC6xLQ81ldE6NalcmqreFm+xI4eKVt5ZnT9yQj1F2WcoFm4HBAWjP9KQWf9Ft3cxnJ MesQ0tjZVFxnMwbFRmgisLl6Q0yCgZeaMrC/uKTrJIviEiiorhk5HlIVlWCKnFncY6Wz OBo0ONYPrZPrKVtWO0ClmWaCS+nf0UfiXf3o7VQIC484JPvTjehL3scsNwoM/jVHUy6F FYjfGoS1ZSyByw87Ejp4Iv9sDfbkx00ATKr44ps3UWtetrmb9dFy3QgIxrUsi2QayAC/ tPZDqlLRidAq2rd/w0p3zFP382jJyhFp7T3eqVt06T9/G+tH7naiU2IE3do96d4s4CaM Dc7Q== 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 3-v6si1677728plz.783.2018.02.28.11.23.22; Wed, 28 Feb 2018 11:23:37 -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; 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 S933677AbeB1TWF (ORCPT + 99 others); Wed, 28 Feb 2018 14:22:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:43099 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933197AbeB1TWD (ORCPT ); Wed, 28 Feb 2018 14:22:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6483EADC6; Wed, 28 Feb 2018 19:22:02 +0000 (UTC) Subject: Re: [PATCH] xen/pirq: fix error path cleanup when binding MSIs To: Roger Pau Monne , linux-kernel@vger.kernel.org Cc: Boris Ostrovsky , Amit Shah , stable@vger.kernel.org, xen-devel@lists.xenproject.org References: <20180228091903.99889-1-roger.pau@citrix.com> From: Juergen Gross Message-ID: Date: Wed, 28 Feb 2018 20:22:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180228091903.99889-1-roger.pau@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/02/18 10:19, Roger Pau Monne wrote: > Current cleanup in the error path of xen_bind_pirq_msi_to_irq is > wrong. First of all there's an off-by-one in the cleanup loop, which > can lead to unbinding wrong IRQs. > > Secondly IRQs not bound won't be freed, thus leaking IRQ numbers. > > Note that there's no need to differentiate between bound and unbound > IRQs when freeing them, __unbind_from_irq will deal with both of them > correctly. > > Fixes: 4892c9b4ada9f9 ("xen: add support for MSI message groups") > Reported-by: Hooman Mirhadi > Signed-off-by: Roger Pau Monné Committed to xen/tip for-linus-4.16a Juergen