lkml.org 
[lkml]   [2015]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice
Hello,

On Wed, Jul 22, 2015 at 08:03:57AM +0800, Baoquan He wrote:
> Yes, dyn_size can't be zero. But in pcpu_setup_first_chunk(), the local
> variable dyn_size could be zero caused by below code:
>
> if (ai->reserved_size) {
> schunk->free_size = ai->reserved_size;
> pcpu_reserved_chunk = schunk;
> pcpu_reserved_chunk_limit = ai->static_size +
> ai->reserved_size;
> } else {
> schunk->free_size = dyn_size;
> dyn_size = 0; /* dynamic area covered
> */
> }
>
> So if no reserved_size dyn_size is assigned to zero, and is checked to
> see if dchunk need be created in below code:

Hmmm... but then pcpu_reserved_chunk is NULL so there still is no
duplicate on the list, no?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-07-22 16:21    [W:3.220 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site