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>] [day] [month] [year] [list]
Message-ID: <9e184857ee9f4e5d8f176b5b511c0dc4@huawei.com>
Date:   Mon, 9 Nov 2020 12:07:53 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Alex Shi <alex.shi@...ux.alibaba.com>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        Hugh Dickins <hughd@...gle.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [REF PATCH] mm/swap: fix swapon failure

Hi:
Alex Shi <alex.shi@...ux.alibaba.com> wrote:
> One of my VM guest has a swapon issue:
> root #swapon -v -f /swap1
> swapon /swap1
> swapon: /swap1: found swap signature: version 1, page-size 4, same byte order
> swapon: /swap1: pagesize=4096, swapsize=1607467008, devsize=1607467008
> swapon: /swap1: swapon failed: Invalid argument
>
> and bisection report commit 822bca52ee7e "mm/swapfile.c: fix potential memory leak in sys_swapon" cause the trouble.
>
> Go through the context I found the exit_swap_address_space(p->type) shouldn't be used in good result path. So just move it to error path.
>

Many thanks for your patch. But I'am somehow confused as we only do the label free_swap_address_space stuff in error path. And the good result
path can't reach here as it just goto out before free_swap_address_space label. Could you please explain it for me more detailed?

Thanks again.

> Fixes: 822bca52ee7e ("mm/swapfile.c: fix potential memory leak in
> sys_swapon")
> Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ