[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4a40bfcf1c964bbb9b68a8b7c467a5a770907e4a.camel@perches.com>
Date: Thu, 16 Apr 2020 13:05:54 -0700
From: Joe Perches <joe@...ches.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>,
Markus Elfring <Markus.Elfring@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Muchun Song <songmuchun@...edance.com>,
Xiongchun Duan <duanxiongchun@...edance.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Yang Shi <yang.shi@...ux.alibaba.com>
Subject: Re: [PATCH v4] mm/ksm: Fix NULL pointer dereference when KSM zero
page is enabled
On Thu, 2020-04-16 at 14:20 +0300, Kirill Tkhai wrote:
> On 16.04.2020 09:14, Markus Elfring wrote:
> > …
> > > > +++ b/mm/ksm.c
> > > > @@ -2112,8 +2112,15 @@ static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
> > …
> > > > + if (vma)
> > > > + err = try_to_merge_one_page(vma, page,
> > > > + ZERO_PAGE(rmap_item->address));
> > > > + else
> > > > + /**
> > > > + * If the vma is out of date, we do not need to
> > > > + * continue.
trivia:
It's generally better to not use "/**" as that's used for kernel-doc
and this could be a single line like
+ /* If the vma is out of date, no need to continue */
> > > It's conventional to put braces around multi-line blocks such as this.
true
> > Are there different views to consider around the usage of single statements
> > together with curly brackets in if branches?
no
Powered by blists - more mailing lists