lkml.org 
[lkml]   [2018]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] mm: Add conditions to avoid out-of-bounds
Date
I'm very sorry. It was my mistake. 
it won't cross the border here.

Thanks


-----Original Message-----
From: Michal Hocko [mailto:mhocko@kernel.org]
Sent: Monday, June 04, 2018 7:20 PM
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

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

\
 
 \ /
  Last update: 2018-06-04 13:28    [W:0.138 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site