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]
Date:	Fri, 11 Oct 2013 10:23:28 +0800
From:	Weijie Yang <weijie.yang.kh@...il.com>
To:	Seth Jennings <sjennings@...iantweb.net>
Cc:	Bob Liu <bob.liu@...cle.com>,
	Seth Jennings <spartacus06@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	linux-mm@...ck.org, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	linux-kernel@...r.kernel.org, Shaohua Li <shli@...ionio.com>,
	Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH] frontswap: enable call to invalidate area on swapoff

Thanks, Seth

On Thu, Oct 10, 2013 at 10:26 AM, Seth Jennings
<sjennings@...iantweb.net> wrote:
> On Thu, Oct 10, 2013 at 09:29:07AM +0800, Bob Liu wrote:
>> On 10/09/2013 10:40 PM, Seth Jennings wrote:
>> >
>> > The reason we never noticed this for zswap is that zswap has no
>> > dynamically allocated per-type resources.  In the expected case,
>> > where all of the pages have been drained from zswap,
>> > zswap_frontswap_invalidate_area() is a no-op.
>> >
>>
>> Not exactly, see the bug fix "mm/zswap: bugfix: memory leak when
>> re-swapon" from Weijie.
>> Zswap needs invalidate_area() also.
>
> I remembered this patch as soon as I sent out this note.  What I said
> about zswap_frontswap_invalidate_area() being a no-op in the expected
> case is true as of v3.12-rc4, but it shouldn't be :)
>
> I sent a note to Andrew reminding him to pull in that patch.
>
> Thanks,
> Seth
> --
> 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/

I am sorry to interrupt this topic, but I found an tiny issue near that:

we can not "set_blocksize(bdev, p->old_block_size);" at the end of swapoff()
because swap_info p may be reused by concurrent swapon called
I think we need to  save the p->old_block_size in a local var and use it instead

to Krzysztof : would you please add this in your patch?
Thanks
--
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