Linux ATA/IDE development
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	linux-ide@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ata_piix: use piix_host_stop() in ich_pata_ops
Date: Thu, 14 Dec 2006 23:42:47 +0000	[thread overview]
Message-ID: <b0943d9e0612141542s558d3768h57a7bb9b5440a246@mail.gmail.com> (raw)
In-Reply-To: <b0943d9e0612130241k3363a2c9kd464d33122e6147f@mail.gmail.com>

On 13/12/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:
> On 11/12/06, Tejun Heo <htejun@gmail.com> wrote:
> > piix_init_one() allocates host private data which should be freed by
> > piix_host_stop().  ich_pata_ops wasn't converted to piix_host_stop()
> > while merging, leaking 4 bytes on driver detach.  Fix it.
>
> I tried your patch last night but the leak is still reported. I need
> to investigate further and put some printk's in the piix_host_stop
> function to check whether the freeing really takes place.

The piix_host_stop() isn't actually called on my machine, so this is
not the cause of the leak.

What causes the leak seem to be the error returned by
ata_pci_init_one() called from piix_init_one(). These are the related
kernel messages:

ata_piix 0000:00:1f.1: version 2.00ac7
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 16 (level, low) -> IRQ 18
PCI: Unable to reserve I/O region #1:8@1f0 for device 0000:00:1f.1
ata_piix: probe of 0000:00:1f.1 failed with error -16

I think the call to ata_pci_init_one() should be followed by some
clean-up in case it fails. There is also another return without
clean-up in piix_init_one() after the call to piix_disable_ahci(). I
don't have time to try this now.

-- 
Catalin

  reply	other threads:[~2006-12-14 23:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b0943d9e0612091454j6df1fb0ej2fa006c3fa33abae@mail.gmail.com>
2006-12-11 13:26 ` [PATCH] ata_piix: use piix_host_stop() in ich_pata_ops Tejun Heo
2006-12-11 14:19   ` Alan
2006-12-13 10:41   ` Catalin Marinas
2006-12-14 23:42     ` Catalin Marinas [this message]
2006-12-15 23:14       ` [PATCH] Fix a memory leak in piix_init_one Catalin Marinas

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=b0943d9e0612141542s558d3768h57a7bb9b5440a246@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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