Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1620556ybe; Tue, 3 Sep 2019 00:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPWBOGXcOhfIK3dRRm4NkgRTnogw1cK2PmM7U7Xm2zF6YCQ7TQGZ7t5pVUxHn5w/qjay+T X-Received: by 2002:a05:6a00:8c:: with SMTP id c12mr24063413pfj.200.1567496665530; Tue, 03 Sep 2019 00:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567496665; cv=none; d=google.com; s=arc-20160816; b=fm5fPGrbme7M6/QWlPimYmGAk83CYIiQX4o7sonnWb6srcGTe6tk2aCNGmRrj35aY1 VtuTIPSNS4I1v2FX9lFMxLV17zqFGcGKUfJ2ZneORYDjP2vw9MAcyeEuUYnHPofy23KA qx8z5cXbtK7GM7LdBrgW6AIYX43JkWC5/+7Gh3r8JcfCqCnZGsn0Q3NXNqrPtd44uLgO QAJrZFYGKLoUq6amyzs3JYKCEJf3UtCuK8GJ2oy/o3rExvv4UCueVudIhQVZr698DY3e 1KlXC0WBtQUIeWCtftlx5vamNYNHgnKuNYsuYElgy9DWsHCxt+lwezdR0J7TgW16Z9U1 Pw9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=VtrJTlz/934AIhYmM6InHRxgMo7S9QIWe6BX+HcGZbw=; b=idMqnh2TDWWc88Ozt8vbAgbFwf8qOCja1KDd5AjDY3gdM6T/7yuiFwj7+L4axcdGYg B3DfsbOd31g33m7eo2jEuhWFCLaidWV1aQ1s888gJQFnS/6mE6xi8YwgVF+tArnAplol Wv8DfqbH1GFmVclq+dJu7bR6PbBx91G7H+qvdYp6YkpCu2BoJqIACPa3KhMuX0H+kloU 5oVwDGJKU54G5fpOORLRfQETqzouTiCDXACPXb8p/0rMZrWB3tdv0fBniqytT1UFfKo5 UlxOJflG86OSb/tD8VfO0h2DcN5J6GhUn9sIMdJPRpyBEE1Ti9UDqYGVJbkfig9NlBUx gV9A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a35si14005818pla.5.2019.09.03.00.44.10; Tue, 03 Sep 2019 00:44:25 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbfICHnQ (ORCPT + 99 others); Tue, 3 Sep 2019 03:43:16 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:38794 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbfICHnP (ORCPT ); Tue, 3 Sep 2019 03:43:15 -0400 Received: by mail-oi1-f194.google.com with SMTP id 7so3865308oip.5; Tue, 03 Sep 2019 00:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VtrJTlz/934AIhYmM6InHRxgMo7S9QIWe6BX+HcGZbw=; b=mOf7E/Gtv0PQauwWsgsc3CGIUORrbSaTXj4DrXHjWFsbyKREJMBydxcDqosNPeHO/k qAznXsb7W91+0Nw8GH9stD+GNrlF7zwsSLCUoPTGp1XPcOhX/u5sRnFhEWaYt/wCozxj C8AG+idRqY7TlHY5AGdW6etUcUWMyUcCeKjW8clgxV6I3vIh8SDIfEygbXF2DrB7fpyk qpeW5WYZhc/hYWZ2R0nIhHNMCdA54jGOmayycu5jP8y8o12wpyCygdHPAk4e7jJrVcxG PHDNXNaSWIf0EEe5Tjl8xP8wuN2l9CWnPe7pZwa/ZfmLyJUN0+u26TVz5yKbD1mwZFat yh0Q== X-Gm-Message-State: APjAAAUL9+Zfdg7/Iw3jYrH7T+wGH5eE2NPUDN34IF1c3hbds0cQfEjc ++TICr/r3rlrNwlQfjafLsvmtoZEVwBDjvEehpQ= X-Received: by 2002:aca:50ca:: with SMTP id e193mr10273740oib.110.1567496594789; Tue, 03 Sep 2019 00:43:14 -0700 (PDT) MIME-Version: 1.0 References: <1566359059-4844-1-git-send-email-wenwen@cs.uga.edu> <20190902223424.GJ7013@google.com> In-Reply-To: <20190902223424.GJ7013@google.com> From: "Rafael J. Wysocki" Date: Tue, 3 Sep 2019 09:43:03 +0200 Message-ID: Subject: Re: [PATCH v2] ACPI / PCI: fix acpi_pci_irq_enable() memory leak To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Wenwen Wang , "Rafael J. Wysocki" , Len Brown , "open list:PCI SUBSYSTEM" , "open list:ACPI" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 3, 2019 at 12:34 AM Bjorn Helgaas wrote: > > On Mon, Sep 02, 2019 at 11:19:58PM +0200, Rafael J. Wysocki wrote: > > On Wed, Aug 21, 2019 at 5:44 AM Wenwen Wang wrote: > > > > > > In acpi_pci_irq_enable(), 'entry' is allocated by kzalloc() in > > > acpi_pci_irq_check_entry() (invoked from acpi_pci_irq_lookup()). However, > > > it is not deallocated if acpi_pci_irq_valid() returns false, leading to a > > > memory leak. To fix this issue, free 'entry' before returning 0. > > > > > > Fixes: e237a5518425 ("x86/ACPI/PCI: Recognize that Interrupt Line 255 means > > > "not connected"") > > > > > > Signed-off-by: Wenwen Wang > > > > Bjorn, any more comments? > > Nope, looks fine to me. Thanks, queuing it up for v5.4 then.