Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4224780yba; Wed, 17 Apr 2019 07:14:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSFis23Mc9uTnYmsB+3ShR1ty6OM3wyovAzUyw2aFBMxec6c5Ye5pl2OnwBkLSCDWQqCP/ X-Received: by 2002:a63:2c55:: with SMTP id s82mr79848630pgs.356.1555510440974; Wed, 17 Apr 2019 07:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555510440; cv=none; d=google.com; s=arc-20160816; b=qkc7BPStt2mGamyYYukzjjtdFCxpVOVN9ti81lf4IMIUQsuvnhXy95HrQm0L9YD/CX 4ryofIH2GhkINOIiN5M5W1GqMaIAG946cYf9Gz3Gs8g0zshz5jINSLtcVx0vdGDnDQ9F 3cVGYx251jVTKApFTLYrEOLY6+DjE0XWvLnFv7Jp/dAM46kOK7CejHUfob7DqHyVGQs0 pno6nwrw7gCmPN11Zcg8G7POfuR+5AefP9RsoFf0lvUNLzBiacBLSYHdiwiiQ8ddZk6m CvFE/XIvcz9KWlx36cYSfSQEUAxBF5bdtiE2kKVM8Kk5cqmwirIIHTXYB9xkY9XiAvB5 oSyQ== 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:dkim-signature; bh=VINQTYcmYlPJVi7GnyF7i/H+KZBnevrjSbV8ruaLGtU=; b=uFZjfo1DGbwQNegZf2Y3qvAF7P5jn+hHiREzDVMQTvJD9fSZFQU2P3ImoRTZUPdh5G bkkr5/fFno9ZypVaCKZ7w/vn9IZazc6feX1JxTSULapqm2cLDRtuoG9YJXwsnBwQrHo3 O2V8JdWbBG5yzLgKHk7tuKbWRT7G1kjJcfrCfwA2i963SbomEtaKy7M3FyAIAhIc2lm5 i41CWjwP/e6CX4/m/sxSYrFXTV9GYhedZo5BKm6Dmp3sqFUTwzYGDDfUsP/H6aHG1f25 KMQqRJ8vfBSP2X7rX0Q5hoXcAN2YQzO+lcUY/hi2lCvgvTj/RwDs20wfg+u/50QYJ1Po k9Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umn.edu header.s=20160920 header.b=bHbDZZKb; 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=umn.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h29si55367237pfd.180.2019.04.17.07.13.45; Wed, 17 Apr 2019 07:14:00 -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=pass header.i=@umn.edu header.s=20160920 header.b=bHbDZZKb; 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=umn.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732387AbfDQOLd (ORCPT + 99 others); Wed, 17 Apr 2019 10:11:33 -0400 Received: from mta-p1.oit.umn.edu ([134.84.196.201]:39900 "EHLO mta-p1.oit.umn.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728335AbfDQOLd (ORCPT ); Wed, 17 Apr 2019 10:11:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mta-p1.oit.umn.edu (Postfix) with ESMTP id 63A2D5D9; Wed, 17 Apr 2019 14:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=umn.edu; h= content-type:content-type:subject:subject:message-id:date:date :from:from:in-reply-to:references:mime-version:received:received :received; s=20160920; t=1555510291; x=1557324692; bh=VINQTYcmYl PJVi7GnyF7i/H+KZBnevrjSbV8ruaLGtU=; b=bHbDZZKbAZkEEuVeeHjJG8qoSK BV5LVxoTkxQ58VtnjWczYr4j1AS80hkq9rP4bBtlBSYVQNVVE3d28RSpiFSscnE2 JptPZE1yH5CeEWKbTo0wWs24/i1fsuY/iKuZOXpqa/HTuRm1OnpT+tEI1NjS4k3j h2wYTn1krpoMCQJGQGFkZGMyI2jkLmn/48V5tC3wTK6dwOL2+PzAw4wd10l3peOS CYDmNlcEvcZLUfCEVV0TbkRPXnCIphf8fwrFkVXjrLHv0NCFphWKskZI+MJzPrEr hDhv9SZF/Gc1gNyfw85PGF5DY/5l2RYXDB436sxVESc8F5O9/Rp1Ho+9Op5Q== X-Virus-Scanned: amavisd-new at umn.edu Received: from mta-p1.oit.umn.edu ([127.0.0.1]) by localhost (mta-p1.oit.umn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zk4tC_K_YH_t; Wed, 17 Apr 2019 09:11:31 -0500 (CDT) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: wang6495) by mta-p1.oit.umn.edu (Postfix) with ESMTPSA id 2F4587D; Wed, 17 Apr 2019 09:11:31 -0500 (CDT) Received: by mail-io1-f49.google.com with SMTP id p16so20704266iod.2; Wed, 17 Apr 2019 07:11:31 -0700 (PDT) X-Gm-Message-State: APjAAAWks2WMOTflab2gbrXI4l9PpcHjWsI+7TBCuTO9H7IoxTOHnYH5 qSoQTrA/qQ3XLXQpKTcfUzEwYhC9m2k+tz8FWQY= X-Received: by 2002:a6b:ca87:: with SMTP id a129mr57926289iog.187.1555510290910; Wed, 17 Apr 2019 07:11:30 -0700 (PDT) MIME-Version: 1.0 References: <1555423298-6677-1-git-send-email-wang6495@umn.edu> <20190417055828.GB95755@gmail.com> In-Reply-To: <20190417055828.GB95755@gmail.com> From: Wenwen Wang Date: Wed, 17 Apr 2019 09:10:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] x86/PCI: fix a memory leak bug To: Ingo Molnar 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)" , Wenwen Wang 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 Wed, Apr 17, 2019 at 12:58 AM Ingo Molnar wrote: > > > * 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 ... > I will add it and resubmit the patch. Thanks, Wenwen