From: Michal Hocko <mhocko@kernel.org>
To: nixiaoming <nixiaoming@huawei.com>
Cc: akpm@linux-foundation.org, vdavydov.dev@gmail.com,
hannes@cmpxchg.org, garsilva@embeddedor.com,
ktkhai@virtuozzo.com, stummala@codeaurora.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Add conditions to avoid out-of-bounds
Date: Mon, 4 Jun 2018 13:20:26 +0200 [thread overview]
Message-ID: <20180604112026.GI19202@dhcp22.suse.cz> (raw)
In-Reply-To: <20180604103735.42781-1-nixiaoming@huawei.com>
On Mon 04-06-18 18:37:35, nixiaoming wrote:
> In the function memcg_init_list_lru
> if call goto fail when i == 0, will cause out-of-bounds at lru->node[i]
How? All I can see is that the fail path does
for (i = i - 1; i >= 0; i--)
so it will not do anything for i=0.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-06-04 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 10:37 nixiaoming
2018-06-04 11:20 ` Michal Hocko [this message]
2018-06-04 11:27 ` Nixiaoming
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=20180604112026.GI19202@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=garsilva@embeddedor.com \
--cc=hannes@cmpxchg.org \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nixiaoming@huawei.com \
--cc=stummala@codeaurora.org \
--cc=vdavydov.dev@gmail.com \
/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