Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-07 Thread Catalin Marinas
On Mon, Oct 07, 2013 at 01:02:43AM +0100, Larry Finger wrote: > On 10/04/2013 03:54 AM, Catalin Marinas wrote: > > On 3 October 2013 22:13, Larry Finger wrote: > >> diff --git a/drivers/memstick/core/memstick.c > >> b/drivers/memstick/core/memstick.c > >> index ffcb10a..0c73a45 100644 > >> ---

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-07 Thread Catalin Marinas
On Mon, Oct 07, 2013 at 01:02:43AM +0100, Larry Finger wrote: On 10/04/2013 03:54 AM, Catalin Marinas wrote: On 3 October 2013 22:13, Larry Finger larry.fin...@lwfinger.net wrote: diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index ffcb10a..0c73a45

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Larry Finger
On 10/06/2013 08:57 PM, Alex Dubov wrote: Hi, In the good old times, when this driver was first written, device name used to be a fixed size array (of 32 chars, if I'm not mistaken) in the kobj struct, so there was no need to free it explicitly. Since than, somebody changed the name field to

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Alex Dubov
not obvious how it is supposed to be handled these days. From: Larry Finger To: Catalin Marinas Cc: Alex Dubov ; Linux Kernel Mailing List ; Kay Sievers ; Greg Kroah-Hartman Sent: Monday, 7 October 2013 11:02 AM Subject: Re: [PATCH] memstick: Fix memory leak

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Larry Finger
On 10/04/2013 03:54 AM, Catalin Marinas wrote: On 3 October 2013 22:13, Larry Finger wrote: diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index ffcb10a..0c73a45 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c @@ -415,6

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Larry Finger
On 10/04/2013 03:54 AM, Catalin Marinas wrote: On 3 October 2013 22:13, Larry Finger larry.fin...@lwfinger.net wrote: diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index ffcb10a..0c73a45 100644 --- a/drivers/memstick/core/memstick.c +++

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Alex Dubov
; Greg Kroah-Hartman gre...@suse.de Sent: Monday, 7 October 2013 11:02 AM Subject: Re: [PATCH] memstick: Fix memory leak in memstick_check() error path On 10/04/2013 03:54 AM, Catalin Marinas wrote: On 3 October 2013 22:13, Larry Finger larry.fin...@lwfinger.net wrote: diff --git a/drivers

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-06 Thread Larry Finger
On 10/06/2013 08:57 PM, Alex Dubov wrote: Hi, In the good old times, when this driver was first written, device name used to be a fixed size array (of 32 chars, if I'm not mistaken) in the kobj struct, so there was no need to free it explicitly. Since than, somebody changed the name field to

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-04 Thread Catalin Marinas
On 3 October 2013 22:13, Larry Finger wrote: > With kernel 3.12-rc3, kemcheck reports the following leak: That would be "kmemleak" rather than "kmemcheck" ;) >> unreferenced object 0x8800ae85c190 (size 16): >> comm "kworker/u4:3", pid 685, jiffies 4294916336 (age 2831.760s) >> hex dump

Re: [PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-04 Thread Catalin Marinas
On 3 October 2013 22:13, Larry Finger larry.fin...@lwfinger.net wrote: With kernel 3.12-rc3, kemcheck reports the following leak: That would be kmemleak rather than kmemcheck ;) unreferenced object 0x8800ae85c190 (size 16): comm kworker/u4:3, pid 685, jiffies 4294916336 (age 2831.760s)

[PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-03 Thread Larry Finger
With kernel 3.12-rc3, kemcheck reports the following leak: > unreferenced object 0x8800ae85c190 (size 16): > comm "kworker/u4:3", pid 685, jiffies 4294916336 (age 2831.760s) > hex dump (first 16 bytes): > 6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0... > backtrace:

[PATCH] memstick: Fix memory leak in memstick_check() error path

2013-10-03 Thread Larry Finger
With kernel 3.12-rc3, kemcheck reports the following leak: unreferenced object 0x8800ae85c190 (size 16): comm kworker/u4:3, pid 685, jiffies 4294916336 (age 2831.760s) hex dump (first 16 bytes): 6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0... backtrace: