Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3335175imu; Sun, 11 Nov 2018 12:37:47 -0800 (PST) X-Google-Smtp-Source: AJdET5eEaJP+TLer580oqFM46p45F3MHRGOsXHMFI9iaNKN1SEc47hXHv/A8m7LMOGO7gxXSEIuJ X-Received: by 2002:a62:1e83:: with SMTP id e125-v6mr17343951pfe.231.1541968667610; Sun, 11 Nov 2018 12:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968667; cv=none; d=google.com; s=arc-20160816; b=lSB6So/4k9i0leohnxyXp+7wVtSt5kDWrBCy22D0NW/PddRKd8Xf+cG39vzD0dBt2F rSP8+Or+lHsMQHmzBpeW8zbMG1S9KoAnazBdDJDar1HDFksYDS4wMVO+SxT1QKqvpRKL A9fhy0EK16I3O6bvmwQTYmoE7IdP0PcwiT2imr5EvYNHOBF/og4oWa9Gyp90lAqqITFM cWi0q47KLDUzhUFt5tgnTrkRniSYJ2l6sLT9iYeo9spJABCRt4tJNxqs/Kz6C/1lm/8X fwjmB3YnRTDmskNVIm5WMDZHpXZaV7sJCsTTuzKTQYyfJQ4fNgFBMXmp6vglvgiFHlm/ SyOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=KLqHR//qvEFHJb8N9pJ276Ugi4m6YcXj49v427JnCDE=; b=vL4mDmSVXGYXjzzbPIBymwPtzTsRPUWKvN8rxQKy3evJHbrG8X2TirltI7iqkhYfa9 qnJXsbM6/B4vVbN/VYJahmLcYIQMf1N+386C0SiorCBFqK8Tof1e1TGKe68t8VBoQSpA P/n4AyY+kFtfbEnbijBeOmaSdQrCI+e6rYJkEfw2er0QZpqfqmYO+hweJ/iDF6IRHKQU 357AaDlwO1wb8r4CdmjWWuDhD05BLDRrGshc+Sj8K4HmtMQVHl5A68PhvVFi9S+YooRd AUgpJSAVn0Fri0VULeCtsV8iUQHq+B2JxMSOFek9C0pWRBBxAoAucEJsWXheICK4GaGA 8PGg== 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 l13-v6si17858539pls.222.2018.11.11.12.37.32; Sun, 11 Nov 2018 12:37:47 -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 S1730103AbeKLFsL (ORCPT + 99 others); Mon, 12 Nov 2018 00:48:11 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49664 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbeKLFsK (ORCPT ); Mon, 12 Nov 2018 00:48:10 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsW-0000oJ-CS; Sun, 11 Nov 2018 19:58:40 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsT-0001c1-GJ; Sun, 11 Nov 2018 19:58:37 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Boris Ostrovsky" , "Ben Hutchings" , "Juergen Gross" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 179/366] xen: Remove unnecessary BUG_ON from __unbind_from_irq() In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Boris Ostrovsky commit eef04c7b3786ff0c9cb1019278b6c6c2ea0ad4ff upstream. Commit 910f8befdf5b ("xen/pirq: fix error path cleanup when binding MSIs") fixed a couple of errors in error cleanup path of xen_bind_pirq_msi_to_irq(). This cleanup allowed a call to __unbind_from_irq() with an unbound irq, which would result in triggering the BUG_ON there. Since there is really no reason for the BUG_ON (xen_free_irq() can operate on unbound irqs) we can remove it. Reported-by: Ben Hutchings Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Signed-off-by: Ben Hutchings --- drivers/xen/events/events_base.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -636,8 +636,6 @@ static void __unbind_from_irq(unsigned i xen_irq_info_cleanup(info); } - BUG_ON(info_for_irq(irq)->type == IRQT_UNBOUND); - xen_free_irq(irq); }