From: Minchan Kim <minchan@kernel.org>
To: zhouxianrong <zhouxianrong@tom.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
ngupta@vflare.org, sergey.senozhatsky.work@gmail.com,
zhouxianrong <zhouxianrong@huawei.com>
Subject: Re: [PATCH] zsmalloc: fix linking bug in init_zspage
Date: Mon, 13 Aug 2018 15:05:49 +0900 [thread overview]
Message-ID: <20180813060549.GB64836@rodete-desktop-imager.corp.google.com> (raw)
In-Reply-To: <20180810002817.2667-1-zhouxianrong@tom.com>
Hi,
On Thu, Aug 09, 2018 at 08:28:17PM -0400, zhouxianrong wrote:
> From: zhouxianrong <zhouxianrong@huawei.com>
>
> The last partial object in last subpage of zspage should not be linked
> in allocation list. Otherwise it could trigger BUG_ON explicitly at
> function zs_map_object. But it happened rarely.
Could you be more specific? What case did you see the problem?
Is it a real problem or one founded by review?
Thanks.
>
> Signed-off-by: zhouxianrong <zhouxianrong@huawei.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);
> --
> 2.13.6
>
next prev parent reply other threads:[~2018-08-13 6:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 0:28 [PATCH] zsmalloc: fix linking bug in init_zspage zhouxianrong
2018-08-13 6:05 ` Minchan Kim [this message]
2018-08-13 10:55 ` Sergey Senozhatsky
2018-08-14 0:24 ` Minchan Kim
2018-08-14 0:51 ` Sergey Senozhatsky
[not found] ` <1784999539.213028.1534378242020.JavaMail.root@rz-web2>
2018-08-16 3:46 ` Minchan Kim
-- strict thread matches above, loose matches on Subject: below --
2018-08-09 13:53 zhouxianrong
2018-08-09 14:41 ` Vlastimil Babka
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=20180813060549.GB64836@rodete-desktop-imager.corp.google.com \
--to=minchan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=zhouxianrong@huawei.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).