Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3875479yba; Tue, 16 Apr 2019 23:00:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY1TyMV0cKZre/fcQVyhflWGOm3cTFfNdjrAORLczkBwE+SkFHKjRafitu4xP305mprXzs X-Received: by 2002:a63:243:: with SMTP id 64mr80517263pgc.214.1555480805570; Tue, 16 Apr 2019 23:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555480805; cv=none; d=google.com; s=arc-20160816; b=awjrt5gElt1RflAUvffVU9I2vd5Q952tKCuXozy2z8069evMQZfCEnrqTzFUkFNOlZ hFf/ctfselgOmBm6EvX55jQknbTao4wUL2YgqruNo9I98MAkSWEhesiOqqYd5Esb8CRO nM2/120+qyu9agUWxkq1lQbsJNFDgyRSAlmhQ/r6K4BcILw387TSI1xsqI/pAmXZhgY+ ZU5JAHCgwKSeeIBCs5BJvXfOdAHpLKmvYNGdP4q9RJ+3D06lpspPd83/jcGG5NbIP17x WHi8wBj28rfKVKsJDg+64TNx+AKd8hexF5j2S8CJZTMxo272nypkzK3iJtDDHuyouYqf HxpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ACtm8Eb0/4kspQ0EJJEAO4ZLa4UvATtz24+esrSLa6c=; b=BWJu37hKm1Gou+R7IxGX5BgvIbC08jEqjZkziBtItEwNmt5MeWaiFnaq8WEosyH0pJ oZsHJg/lWc3CE0Hr4JAyxV5G4cvJKaGjhCDc9/d66bK8wf2CJZikNz1qH9SQJR54VGer r70HLOEw4Jqx7RvtaV8Tn6kRBtYBF06f0Bm177AfhgqStgZGoszj91bIk/cdrnh51jrO eT0nKU5lk8SyJI2CS1cqJrTj4T3VWFue7vzREesb+uEam8y3m9tY/dJYssVe4/Dn27EO G8y/0gKQlo9fay0nX/cUEyQKZ3ozR+i3fz8q7daf7H4ro5sEfhjrGnFLj7pIITFwZuyG GuUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=T4Bvl8+4; 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 g77si3401653pfd.221.2019.04.16.22.59.50; Tue, 16 Apr 2019 23:00:05 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=T4Bvl8+4; 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 S1730705AbfDQF6d (ORCPT + 99 others); Wed, 17 Apr 2019 01:58:33 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44124 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbfDQF6d (ORCPT ); Wed, 17 Apr 2019 01:58:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id w18so71159wrv.11; Tue, 16 Apr 2019 22:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ACtm8Eb0/4kspQ0EJJEAO4ZLa4UvATtz24+esrSLa6c=; b=T4Bvl8+44+Ik4fiUHE8YnaYn3EQQs1bh27yZB2AVujXlA032CUMWA55vD7vM6RPZlk DTGJrPg7SQV6a2xW4dtwgySp+9lv2XHzDugGovtBH4pCJ6eFOK4ht4SPRkuEBaeFGlDj 94DyBtGbKob2tlS5mps8nfPG3qgJb4kuAqGJKGQ6bRCl3WK1o52O1zxXckUDO38me61H wtsyvB4St41C/LalU/72jTZ2fMMUPJ/n/9CmQhdLTkjO88h3p4C1mxRS/PCZ6WphqJDc SSluFvXO0FwposYLVt7qtkf61El/tPmkWoZ66ZJUQEYlett8oMWRs9YcvB8jmtJYX+KX +8Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ACtm8Eb0/4kspQ0EJJEAO4ZLa4UvATtz24+esrSLa6c=; b=XCDpTx64ULzpg323pHnC13xtLtIx5WEKb4cWcyy0gDzXSoJcLlKch11qy994sVPRTT 6oxe3yjwey1+rCTE91+44xYPA2JJWBsuf4/tBtwXn3aI0sghgFpWm6KvLpUYMI7R6mqO tHdSw0cV84JDGlCvxCsr1Aiswbr4X8o1iV7lTX2uLLrD/W4+evBz8xLr54JL9aC2cTgn Vhc5W7lJcEkU3hQmLhOTlpeHoUl86p7sT1slTpiocc3jRQdpKyklfEIU/bhYpZ6RXOT4 m9k3xENXOKxYaxuqbutej292KV5CfGD3/V1vxRXPR1f6ighso07nZxWL0KVJ9mxU6t/H cK7g== X-Gm-Message-State: APjAAAUwQq3EfhcoOp3HBZFxi2GVgiy0vZdRwBVbkz7qmVSF9oY1vLQZ NyTeNDeDdczPbn9WUm2qEGg= X-Received: by 2002:adf:dbce:: with SMTP id e14mr56661500wrj.249.1555480711352; Tue, 16 Apr 2019 22:58:31 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id y133sm2330908wmd.2.2019.04.16.22.58.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 22:58:30 -0700 (PDT) Date: Wed, 17 Apr 2019 07:58:28 +0200 From: Ingo Molnar To: Wenwen Wang Cc: Thomas Gleixner , Bjorn Helgaas , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:PCI SUBSYSTEM" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v2] x86/PCI: fix a memory leak bug Message-ID: <20190417055828.GB95755@gmail.com> References: <1555423298-6677-1-git-send-email-wang6495@umn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Wenwen Wang wrote: > On Tue, Apr 16, 2019 at 3:33 PM Thomas Gleixner wrote: > > > > On Tue, 16 Apr 2019, Wenwen Wang wrote: > > > > > In pcibios_irq_init(), the PCI IRQ routing table 'pirq_table' is firstly > > > found through pirq_find_routing_table(). If the table is not found and > > > 'CONFIG_PCI_BIOS' is defined, the table is then allocated in > > > pcibios_get_irq_routing_table() using kmalloc(). In the following > > > execution, if the I/O APIC is used, this table is actually not used. > > > However, in that case, the allocated table is not freed, which can lead to > > > a memory leak bug. > > > > s/which can lead to/which is/ > > > > There is no 'can'. It simply is a memory leak. > > > > > To fix this issue, this patch frees the allocated table if it is not used. > > > > To fix this issue, free the allocated table if it is not used. > > > > 'this patch' is completely redundant information and discouraged in > > Documentation/process/.... > > > > Thanks for your suggestions, Thomas. I will revise the commit's message. > > Wenwen > > > Other than that: > > > > Acked-by: Thomas Gleixner You didn't add Thomas's Acked-by to your commit ... Thanks, Ingo