[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516df5d7-b514-11dc-130e-f1a2edce0108@web.de>
Date: Thu, 16 Apr 2020 08:14:07 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: 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>,
Kirill Tkhai <ktkhai@...tuozzo.com>,
Yang Shi <yang.shi@...ux.alibaba.com>
Subject: Re: [PATCH v4] mm/ksm: Fix NULL pointer dereference when KSM zero
page is enabled
…
>> +++ 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.
>> + */
>> + err = 0;
>> up_read(&mm->mmap_sem);
…
> It's conventional to put braces around multi-line blocks such as this.
Are there different views to consider around the usage of single statements
together with curly brackets in if branches?
Regards,
Markus
Powered by blists - more mailing lists