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: <67808455-39ed-9fae-014b-c022304a2a32@linux.alibaba.com>
Date:   Thu, 21 May 2020 09:48:07 -0700
From:   Yang Shi <yang.shi@...ux.alibaba.com>
To:     Qian Cai <cai@....pw>
Cc:     kirill.shutemov@...ux.intel.com, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC linux-next PATCH] mm: khugepaged: remove error message when
 checking external pins



On 5/21/20 7:56 AM, Qian Cai wrote:
> On Wed, May 13, 2020 at 05:03:03AM +0800, Yang Shi wrote:
> []
>>   mm/khugepaged.c | 24 +++++++++++++++++-------
>>   1 file changed, 17 insertions(+), 7 deletions(-)
>>
>> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
>> index 1fdd677..048f5d4 100644
>> --- a/mm/khugepaged.c
>> +++ b/mm/khugepaged.c
>> @@ -602,12 +602,6 @@ static bool is_refcount_suitable(struct page *page)
>>   	if (PageSwapCache(page))
>>   		expected_refcount += compound_nr(page);
>>   
>> -	if (IS_ENABLED(CONFIG_DEBUG_VM) && expected_refcount > refcount) {
>> -		pr_err("expected_refcount (%d) > refcount (%d)\n",
>> -				expected_refcount, refcount);
>> -		dump_page(page, "Unexpected refcount");
>> -	}
>> -
>>   	return page_count(page) == expected_refcount;
>>   }
> mm/khugepaged.c: In function 'is_refcount_suitable':
> mm/khugepaged.c:575:25: warning: variable 'refcount set but not used [-Wunused-but-set-variable]
>    int expected_refcount, refcount;
>                           ^~~~~~~~
>
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -572,9 +572,8 @@ static void release_pte_pages(pte_t *pte, pte_t *_pte,
>   
>   static bool is_refcount_suitable(struct page *page)
>   {
> -	int expected_refcount, refcount;
> +	int expected_refcount;
>   
> -	refcount = page_count(page);
>   	expected_refcount = total_mapcount(page);
>   	if (PageSwapCache(page))
>   		expected_refcount += compound_nr(page);

Thanks for catching this.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ