Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread David Miller
From: Eric Dumazet Date: Fri, 26 Aug 2016 08:51:39 -0700 > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian > Signed-off-by: Eric Dumazet Applied, thanks Er

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Linus Torvalds
On Fri, Aug 26, 2016 at 10:40 AM, CAI Qian wrote: > After applied to this patch and ran the reproducer (compiling gcc), had > no bucket_table_alloc in kmemleak report anymore. Hence, > > Tested-by: CAI Qian > > Funny enough, it now gave me this, > > [ 3406.807461] kmemleak: 1353 new suspected mem

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread CAI Qian
> , "Linus Torvalds" > , "Florian Westphal" > Sent: Friday, August 26, 2016 11:51:39 AM > Subject: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks() > > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_a

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Cong Wang
On Fri, Aug 26, 2016 at 8:51 AM, Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian > Signed-off-by: Eric Dumazet > Cc: Florian Westphal >

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Herbert Xu
On Fri, Aug 26, 2016 at 08:51:39AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian > Signed-off-by: Eric Dumazet > Cc: Florian We

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Florian Westphal
Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian > Signed-off-by: Eric Dumazet > Cc: Florian Westphal > --- > lib/rhashtable.c |7

[PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Eric Dumazet
From: Eric Dumazet If vmalloc() was successful, do not attempt a kmalloc_array() Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") Reported-by: CAI Qian Signed-off-by: Eric Dumazet Cc: Florian Westphal --- lib/rhashtable.c |7 --- 1 file changed, 4 insertions(+),