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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8760d3w6bh.fsf@yhuang-dev.intel.com>
Date:   Fri, 01 Sep 2017 09:33:54 +0800
From:   "Huang\, Ying" <ying.huang@...el.com>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     <akpm@...ux-foundation.org>, <ying.huang@...el.com>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: kvfree the swap cluster info if the swap file is unsatisfactory

"Darrick J. Wong" <darrick.wong@...cle.com> writes:

> If initializing a small swap file fails because the swap file has a
> problem (holes, etc.) then we need to free the cluster info as part of
> cleanup.  Unfortunately a previous patch changed the code to use
> kvzalloc but did not change all the vfree calls to use kvfree.
>
> Found by running generic/357 from xfstests.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>

Thanks for fixing!

Reviewed-by: "Huang, Ying" <ying.huang@...el.com>

Best Regards,
Huang, Ying

> ---
>  mm/swapfile.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 6ba4aab..c1deb01 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -3052,7 +3052,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
>  	p->flags = 0;
>  	spin_unlock(&swap_lock);
>  	vfree(swap_map);
> -	vfree(cluster_info);
> +	kvfree(cluster_info);
>  	if (swap_file) {
>  		if (inode && S_ISREG(inode->i_mode)) {
>  			inode_unlock(inode);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ