lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] mm/ksm: Fix NULL pointer dereference when KSM zero page is enabled
From
Date

>> +++ 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

\
 
 \ /
  Last update: 2020-04-16 08:15    [W:0.062 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site