From: Vlastimil Babka <vbabka@suse.cz>
To: zhouxianrong <zhouxianrong@tom.com>, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, minchan@kernel.org,
ngupta@vflare.org, sergey.senozhatsky.work@gmail.com
Subject: Re: [PATCH] zsmalloc: fix linking bug in init_zspage
Date: Thu, 9 Aug 2018 16:41:25 +0200 [thread overview]
Message-ID: <5985fb0b-1241-9ddb-c32d-bc879247270d@suse.cz> (raw)
In-Reply-To: <20180809135356.4070-1-zhouxianrong@tom.com>
On 08/09/2018 03:53 PM, zhouxianrong wrote:
> The last partial object in last subpage of zspage should not be linked
> in allocation list.
Please expand the changelog. Why it should not be? What happens if it
is? Kernel panic, data corruption or whatnot? So that people not
familiar with zsmalloc internals can judge how important the patch is
for e.g. backporting.
Thanks,
Vlastimil
> Signed-off-by: zhouxianrong <zhouxianrong@tom.com>
> ---
> mm/zsmalloc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 8d87e973a4f5..24dd8da0aa59 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1040,6 +1040,8 @@ static void init_zspage(struct size_class *class, struct zspage *zspage)
> * Reset OBJ_TAG_BITS bit to last link to tell
> * whether it's allocated object or not.
> */
> + if (off > PAGE_SIZE)
> + link -= class->size / sizeof(*link);
> link->next = -1UL << OBJ_TAG_BITS;
> }
> kunmap_atomic(vaddr);
>
next prev parent reply other threads:[~2018-08-09 14:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 13:53 [PATCH] zsmalloc: fix linking bug in init_zspage zhouxianrong
2018-08-09 14:41 ` Vlastimil Babka [this message]
2018-08-10 0:28 zhouxianrong
2018-08-13 6:05 ` Minchan Kim
2018-08-13 10:55 ` Sergey Senozhatsky
2018-08-14 0:24 ` Minchan Kim
2018-08-14 0:51 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5985fb0b-1241-9ddb-c32d-bc879247270d@suse.cz \
--to=vbabka@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=zhouxianrong@tom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).