linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: dbaryshkov@gmail.com, linux-pcmcia@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe
Date: Thu, 26 Mar 2015 09:52:25 +0000	[thread overview]
Message-ID: <20150326095225.GY8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1427339752-25800-1-git-send-email-xerofoify@gmail.com>

On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote:
> This fixes the memory found when running  coccinelle on the latest

How does this "fix the memory" ?  Is the memory faulty?

> kernel tree for if we are unable to successfully allocate memory
> for the structure pointer,sinfo of type skt_dev_info and need to
> clean up the memory already allocated to the clk structure pointer,
> clk by calling clk_get on it and freeing the no longer required
> mermory for this structure pointer.

This makes no sense.  clk_get() itself doesn't allocate any memory.  As
usual, you act as a mechanical automatom which doesn't understand what
you're doing or you just guess.  I don't care which it is, you are a
danger to the kernel by doing this.  As many other experienced kernel
developers have told you, please stop.

In any case, I'm NAKing your patch as there's better ways to solve this.
That's where experience and research come in.

Nevertheless, thanks for pointing out the oversight, and I notice that
there are a few more cases too.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

       reply	other threads:[~2015-03-26  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1427339752-25800-1-git-send-email-xerofoify@gmail.com>
2015-03-26  9:52 ` Russell King - ARM Linux [this message]
     [not found]   ` <B1082D73-6857-468E-8A59-9ADD8D005DC2@gmail.com>
2015-03-26 11:26     ` [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe Russell King - ARM Linux
     [not found]       ` <03F500AB-90A8-465E-9965-2872274CE758@gmail.com>
2015-03-26 15:42         ` Larry Finger

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=20150326095225.GY8656@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=dbaryshkov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=xerofoify@gmail.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).