lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOFgiyqm48tHcwmr0SP2ERXp5QW22tx-U0PxvZtyeasF-DmgZw@mail.gmail.com>
Date:	Fri, 24 Oct 2014 05:19:56 +0530
From:	Devendra Naga <devendranaga4@...il.com>
To:	Gioh Kim <gioh.kim@....com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	John Stultz <john.stultz@...aro.org>,
	Rebecca Schultz Zavin <rebecca@...roid.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	gunho.lee@....com
Subject: Re: [RFC 1/2] staging: ion: shrink page-pool by page unit

On Fri, Oct 24, 2014 at 5:01 AM, Gioh Kim <gioh.kim@....com> wrote:
>
>
> 2014-10-24 오전 8:16, Gioh Kim 쓴 글:
>
>>
>>
>> 2014-10-24 오전 5:36, Devendra Naga 쓴 글:
>>>
>>> Hello,
>>>
>>> On Thu, Oct 23, 2014 at 6:22 PM, Gioh Kim <gioh.kim@....com> wrote:
>>>>          sys_heap = container_of(heap, struct ion_system_heap, heap);
>>>> @@ -219,7 +219,10 @@ static int ion_system_heap_shrink(struct ion_heap
>>>> *heap, gfp_t gfp_mask,
>>>>          for (i = 0; i < num_orders; i++) {
>>>>                  struct ion_page_pool *pool = sys_heap->pools[i];
>>>>
>>>> -               nr_total += ion_page_pool_shrink(pool, gfp_mask,
>>>> nr_to_scan);
>>>> +               nr_freed += ion_page_pool_shrink(pool, gfp_mask,
>>>> nr_to_scan);
>>>
>>>
>>> nr_freed is not initialised to zero. This might result in updating of
>>> a garbage value stored initially after nr_freed is created.
>>
>>
>> Yes, your're right. It's my mistake.
>> I testes this on my platform with custom kernel and copied codes.
>> I missed a line for it.
>> I'm sorry.
>
>
> Following is the correct code:
> nr_freed = ion_page_pool_shrink(pool, gfp_mask, nr_to_scan);
>

Thanks that is correct. You can send another patch with this fix (it
can be patchset v2 or rfc v2).

>
>>
>>>
>>>> +               nr_total += nr_freed;
>>>> +               /* nr_to_scan can be negative */
>>>> +               nr_to_scan -= nr_freed;
>>>>          }
>>>>
>>>>          return nr_total;
>>>> --
>>>> 1.7.9.5
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
>>>> in
>>>> the body of a message to majordomo@...r.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Please read the FAQ at  http://www.tux.org/lkml/
>>>
>>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ