Re: [PATCH] ubifs: Get/put page when changing PG_private

From: Richard Weinberger
Date: Fri Dec 21 2018 - 03:56:31 EST

Am Samstag, 15. Dezember 2018, 16:01:30 CET schrieb Richard Weinberger:
> The page migration code assumes that a page with PG_private
> set has its page count elevated by 1.
> UBIFS never did this and therefore the migration code was unable
> to migrate some pages owned by UBIFS.
> The lead to situations where the CMA memory allocator failed to
> allocate memory.
> Fix this by using get/put_page when changing PG_private.
> Cc: <stable@xxxxxxxxxxxxxxx>
> Cc: zhangjun <openzhangj@xxxxxxxxx>
> Fixes: 4ac1c17b2044 ("UBIFS: Implement ->migratepage()")
> Reported-by: zhangjun <openzhangj@xxxxxxxxx>
> Signed-off-by: Richard Weinberger <richard@xxxxxx>

FYI, on the XFS side a similar change caused a regression.

Until this regression is not fully understood, including the implications
for UBIFS, I'll not merge this patch.