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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7379a953-5a87-7978-b413-3d52b9b55795@redhat.com>
Date:   Thu, 17 Nov 2022 12:48:20 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>, akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH -next] migrate: stop using 0 as NULL pointer

On 16.11.22 02:23, Yang Li wrote:
> mm/migrate.c:1198:24: warning: Using plain integer as NULL pointer
> 
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3080
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> ---
>   mm/migrate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 15dc56a3da7a..e50b3c42e6ad 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1195,7 +1195,7 @@ static int unmap_and_move(new_page_t get_new_page,
>   		return -ENOMEM;
>   	dst = page_folio(newpage);
>   
> -	dst->private = 0;
> +	dst->private = NULL;
>   	rc = __unmap_and_move(src, dst, force, mode);
>   	if (rc == MIGRATEPAGE_SUCCESS)
>   		set_page_owner_migrate_reason(&dst->page, reason);

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ