linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Jean Delvare <jdelvare@suse.de>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Yi Zhang <yi.zhang@redhat.com>,
	Terry Bowman <terry.bowman@amd.com>
Subject: Re: [PATCH v2] i2c: piix4: Fix a memory leak in the EFCH MMIO support
Date: Wed, 29 Jun 2022 21:37:36 +0200	[thread overview]
Message-ID: <YryqAEfeLpKf9iBf@shikoro> (raw)
In-Reply-To: <20220622083743.65e057dd@endymion.delvare>

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

On Wed, Jun 22, 2022 at 08:37:43AM +0200, Jean Delvare wrote:
> The recently added support for EFCH MMIO regions introduced a memory
> leak in that code path. The leak is caused by the fact that
> release_resource() merely removes the resource from the tree but does
> not free its memory. We need to call release_mem_region() instead,
> which does free the memory. As a nice side effect, this brings back
> some symmetry between the legacy and MMIO paths.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Reported-by: Yi Zhang <yi.zhang@redhat.com>
> Tested-by: Yi Zhang <yi.zhang@redhat.com>
> Fixes: 7c148722d074 ("i2c: piix4: Add EFCH MMIO support to region request and release")
> Cc: Terry Bowman <terry.bowman@amd.com>

Applied to for-current with Terry's tags given to v1, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-06-29 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  6:37 [PATCH v2] i2c: piix4: Fix a memory leak in the EFCH MMIO support Jean Delvare
2022-06-29 19:37 ` Wolfram Sang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YryqAEfeLpKf9iBf@shikoro \
    --to=wsa@kernel.org \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=terry.bowman@amd.com \
    --cc=yi.zhang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).