From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
Mark Asselstine <mark.asselstine@windriver.com>
Subject: Re: [PATCH net-next 1/3] net: ipv4: fix potential memory leak by assigning uhash_entries
Date: Wed, 22 Jun 2011 10:23:20 -0400 [thread overview]
Message-ID: <4E01FAD8.6030106@windriver.com> (raw)
In-Reply-To: <1308719087.2713.4.camel@edumazet-laptop>
On 11-06-22 01:04 AM, Eric Dumazet wrote:
> Le mardi 21 juin 2011 à 16:43 -0400, Paul Gortmaker a écrit :
[...]
>> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
>> index abca870..6f53a5a 100644
>> --- a/net/ipv4/udp.c
>> +++ b/net/ipv4/udp.c
>> @@ -2155,7 +2155,7 @@ void udp4_proc_exit(void)
>> }
>> #endif /* CONFIG_PROC_FS */
>>
>> -static __initdata unsigned long uhash_entries;
>> +static __initdata unsigned long uhash_entries = UDP_HTABLE_SIZE_MIN;
>> static int __init set_uhash_entries(char *str)
>> {
>> if (!str)
>
> Arg no, I really wanted to get more hash slots in my 32bit machines,
> with 4Gbytes of memory.
>
> Here is what I currently have (without your patch)
>
> [ 1.903086] UDP hash table entries: 512 (order: 2, 16384 bytes)
>
>
> I mean, this kmemleak was already reported.
Ah, I'd not read that thread - here is the link if anyone else
is following along:
http://lists-archives.org/linux-kernel/27460513-kmemleak-for-mips.html
>
> 32MB machines are things of the past.
>
> If you really care, please add a change to alloc_large_system_hash() ?
Given the user list (dcache.c, inode.c, pid.c, ...) it probably
isn't worth the churn of adding a min argument to the calls.
I'm fine with dropping this patch (and glad I'd CC'd you on it)
Thanks,
Paul.
>
>
>
next prev parent reply other threads:[~2011-06-22 14:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 20:43 [PATCH net-next 0/3] Three possible UDP fixes Paul Gortmaker
2011-06-21 20:43 ` [PATCH net-next 1/3] net: ipv4: fix potential memory leak by assigning uhash_entries Paul Gortmaker
2011-06-22 5:04 ` Eric Dumazet
2011-06-22 5:32 ` David Miller
2011-06-22 14:23 ` Paul Gortmaker [this message]
2011-06-21 20:43 ` [PATCH net-next 2/3] ipv6/udp: Use the correct variable to determine non-blocking condition Paul Gortmaker
2011-06-22 5:42 ` Eric Dumazet
2011-06-21 20:43 ` [PATCH net-next 3/3] udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet Paul Gortmaker
2011-06-22 5:43 ` Eric Dumazet
2011-06-21 23:31 ` [PATCH net-next 0/3] Three possible UDP fixes David Miller
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=4E01FAD8.6030106@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=mark.asselstine@windriver.com \
--cc=netdev@vger.kernel.org \
/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).