Re: memleak around kobject_init_and_add()

2019-05-02 Thread Tobin C. Harding
On Thu, May 02, 2019 at 09:28:08AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 02, 2019 at 09:17:42AM +0200, Greg Kroah-Hartman wrote: > > On Thu, May 02, 2019 at 07:56:16AM +1000, Tobin C. Harding wrote: > > > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > > > > On Sat, A

Re: memleak around kobject_init_and_add()

2019-05-02 Thread Greg Kroah-Hartman
On Thu, May 02, 2019 at 09:17:42AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 02, 2019 at 07:56:16AM +1000, Tobin C. Harding wrote: > > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > > > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > > > (Note at bo

Re: memleak around kobject_init_and_add()

2019-05-02 Thread Greg Kroah-Hartman
On Thu, May 02, 2019 at 07:56:16AM +1000, Tobin C. Harding wrote: > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > > (Note at bottom on reasons for 'To' list 'Cc' list) > > > > > > Hi, > > > > > > kobje

Re: memleak around kobject_init_and_add()

2019-05-01 Thread Tobin C. Harding
On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > (Note at bottom on reasons for 'To' list 'Cc' list) > > > > Hi, > > > > kobject_init_and_add() seems to be routinely misused. A failed call to this > > func

Re: memleak around kobject_init_and_add()

2019-04-28 Thread Tobin C. Harding
On Mon, Apr 29, 2019, at 02:15, Greg Kroah-Hartman wrote: > On Sun, Apr 28, 2019 at 11:19:57AM +1000, Tobin C. Harding wrote: > > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > > > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > > > (Note at bottom on re

Re: memleak around kobject_init_and_add()

2019-04-28 Thread Greg Kroah-Hartman
On Sun, Apr 28, 2019 at 11:19:57AM +1000, Tobin C. Harding wrote: > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > > (Note at bottom on reasons for 'To' list 'Cc' list) > > > > > > Hi, > > > > > > kobje

Re: memleak around kobject_init_and_add()

2019-04-27 Thread Tobin C. Harding
On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > (Note at bottom on reasons for 'To' list 'Cc' list) > > > > Hi, > > > > kobject_init_and_add() seems to be routinely misused. A failed call to this > > func

Re: memleak around kobject_init_and_add()

2019-04-27 Thread Tobin C. Harding
On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > > (Note at bottom on reasons for 'To' list 'Cc' list) > > > > Hi, > > > > kobject_init_and_add() seems to be routinely misused. A failed call to this > > func

Re: memleak around kobject_init_and_add()

2019-04-27 Thread Greg Kroah-Hartman
On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote: > (Note at bottom on reasons for 'To' list 'Cc' list) > > Hi, > > kobject_init_and_add() seems to be routinely misused. A failed call to this > function requires a call to kobject_put() otherwise we leak memory. > > Examples meml

memleak around kobject_init_and_add()

2019-04-27 Thread Tobin C. Harding
(Note at bottom on reasons for 'To' list 'Cc' list) Hi, kobject_init_and_add() seems to be routinely misused. A failed call to this function requires a call to kobject_put() otherwise we leak memory. Examples memleaks can be seen in: mm/slub.c fs/btrfs/sysfs.c fs/xfs/xf