All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe
       [not found] <1427339752-25800-1-git-send-email-xerofoify@gmail.com>
@ 2015-03-26  9:52 ` Russell King - ARM Linux
       [not found]   ` <B1082D73-6857-468E-8A59-9ADD8D005DC2@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2015-03-26  9:52 UTC (permalink / raw)
  To: Nicholas Krause; +Cc: dbaryshkov, linux-pcmcia, linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe
       [not found]   ` <B1082D73-6857-468E-8A59-9ADD8D005DC2@gmail.com>
@ 2015-03-26 11:26     ` Russell King - ARM Linux
       [not found]       ` <03F500AB-90A8-465E-9965-2872274CE758@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2015-03-26 11:26 UTC (permalink / raw)
  To: Nicholas Krause; +Cc: dbaryshkov, linux-pcmcia, linux-kernel

On Thu, Mar 26, 2015 at 07:14:38AM -0400, Nicholas Krause wrote:
> 
> 
> On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> >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.
> Very well then I  guess my patch commit message was wrong. 

Again, you fail to understand what you are being told.  Please re-read
the paragraph which starts "In any case, I'm NAKing your patch".

Your patch is one way to solve it, but there are other solutions too.
I've just posted a small patch series which addresses the issue you
have raised.  You need to perform no further action on this.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe
       [not found]       ` <03F500AB-90A8-465E-9965-2872274CE758@gmail.com>
@ 2015-03-26 15:42         ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2015-03-26 15:42 UTC (permalink / raw)
  To: Nicholas Krause, Russell King - ARM Linux
  Cc: dbaryshkov, linux-pcmcia, linux-kernel

On 03/26/2015 10:08 AM, Nicholas Krause wrote:


> I looked through the clk Api and this seems the simplest way to do it.  Can you send me your solution as I  am curious how yours is better than  mine.  Furthermore I  have finally come to the conclusion that my research efforts need to improve and will look into improving them. Also it would be great if you can put reported by me on the patches in your series fixing this issue.

http://marc.info/?l=linux-pcmcia&m=142736903012616&w=2 and following patches.

Read and learn,

Larry




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-26 15:42 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.