From: Chen Gang <gang.chen@asianux.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
mpm@selenic.com, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/slub.c: add parameter length checking for alloc_loc_track()
Date: Tue, 16 Jul 2013 09:03:27 +0800 [thread overview]
Message-ID: <51E49BDF.30008@asianux.com> (raw)
In-Reply-To: <0000013fe2e73e30-817f1bdb-8dc7-4f7b-9b60-b42d5d244fda-000000@email.amazonses.com>
On 07/15/2013 11:16 PM, Christoph Lameter wrote:
> On Mon, 15 Jul 2013, Chen Gang wrote:
>
>> > On 07/12/2013 09:49 PM, Christoph Lameter wrote:
>>> > > On Fri, 12 Jul 2013, Chen Gang wrote:
>>> > >
>>>> > >> Since alloc_loc_track() will alloc additional space, and already knows
>>>> > >> about 'max', so need be sure of 'max' must be larger than 't->count'.
>>> > >
>>> > > alloc_loc_track is only called if t->count > max from add_location:
>>> > >
>> >
>> > For add_location(), if "t->count > t->max", it calls alloc_loc_track()
>> > with "max == 2 * t->max".
>> >
>> > In this case we need be sure that "t->count < 2 * t->max".
> We are sure about that since t->count is always incremented by one and
> then checked against t->max. The location database is build up from a
> single hardware thread without any concurrency.
>
> So we do not really need this patch.
>
>
>
Hmm... what you says above is reasonable.
In this case, since alloc_loc_track() is a static function, it will
depend on the related maintainers' willing and opinions to decide
whether add the related check or not (just like add 'BUG_ON' or not).
I need respect the original related maintainers' willing and opinions.
Thanks.
--
Chen Gang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-07-16 1:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 8:07 [PATCH] mm/slub.c: remove 'per_cpu' which is useless variable Chen Gang
2013-07-11 6:45 ` Pekka Enberg
2013-07-11 6:50 ` Chen Gang
2013-07-11 16:45 ` Christoph Lameter
2013-07-11 18:28 ` Pekka Enberg
2013-07-11 20:16 ` Christoph Lameter
2013-07-11 23:52 ` Chen Gang
2013-07-12 0:23 ` [PATCH v2] " Chen Gang
2013-07-12 0:55 ` [PATCH] mm/slub.c: add parameter length checking for alloc_loc_track() Chen Gang
2013-07-12 13:49 ` Christoph Lameter
2013-07-15 0:17 ` Chen Gang
2013-07-15 15:16 ` Christoph Lameter
2013-07-16 1:03 ` Chen Gang [this message]
2013-07-17 15:03 ` Christoph Lameter
2013-07-18 0:43 ` Chen Gang
2013-07-18 13:45 ` Christoph Lameter
2013-07-19 0:05 ` Chen Gang F T
2013-07-19 13:57 ` Christoph Lameter
2013-07-22 0:27 ` Chen Gang
2013-07-22 0:42 ` Wanpeng Li
2013-07-22 0:42 ` Wanpeng Li
2013-07-22 1:30 ` Chen Gang
2013-07-12 13:45 ` [PATCH v2] mm/slub.c: remove 'per_cpu' which is useless variable Christoph Lameter
2013-07-15 0:08 ` Chen Gang
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=51E49BDF.30008@asianux.com \
--to=gang.chen@asianux.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@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