Message ID | 20200414075622.69822-1-songmuchun@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] mm/ksm: Fix NULL pointer dereference when KSM zero page is enabled | expand |
> to crash when we access vma->vm_mm(its offset is 0x40) later in Will another fine-tuning become relevant also for this wording? > following calltrace is captured in kernel 4.19 with KSM zero page Can the mentioned Linux version trigger any special software development concerns? Will any other tags become helpful in such a case? Regards, Markus
On Tue, Apr 14, 2020 at 5:17 PM Markus Elfring <Markus.Elfring@web.de> wrote: > > > to crash when we access vma->vm_mm(its offset is 0x40) later in > > Will another fine-tuning become relevant also for this wording? > Sorry, I don't understand what this means because of my poor English. Could you explain it again. Thanks. > > > following calltrace is captured in kernel 4.19 with KSM zero page > > Can the mentioned Linux version trigger any special software > development concerns? > > Will any other tags become helpful in such a case? How about changing "following calltrace is captured in kernel 4.19 with KSM zero page" to "The following calltrace is captured with the following patch applied: e86c59b1b12d ("mm/ksm: improve deduplication of zero pages with colouring") " ?
>>> to crash when we access vma->vm_mm(its offset is 0x40) later in >> >> Will another fine-tuning become relevant also for this wording? > > Sorry, I don't understand what this means because of my poor English. Our language knowledge can evolve over time. > Could you explain it again. You integrated a few of my suggestions into your message selection. - Thanks. I wonder why you did not like the following small adjustment possibilities so far. to a crash … vm_mm (its … >> Will any other tags become helpful in such a case? > > How about changing > "following calltrace is captured in kernel 4.19 with KSM zero page" > to > "The following calltrace is captured with the following patch applied: > e86c59b1b12d ("mm/ksm: improve deduplication of zero pages with > colouring") > " > ? I find it unlikely that such a wording alternative would be more appropriate while I became just curious for related development consequences around the usage of a longterm kernel version. Would you like to reuse the term “call trace”? Regards, Markus
On Tue, Apr 14, 2020 at 10:17 PM Markus Elfring <Markus.Elfring@web.de> wrote: > > >>> to crash when we access vma->vm_mm(its offset is 0x40) later in > >> > >> Will another fine-tuning become relevant also for this wording? > > > > Sorry, I don't understand what this means because of my poor English. > > Our language knowledge can evolve over time. > > > > Could you explain it again. > > You integrated a few of my suggestions into your message selection. - Thanks. > I wonder why you did not like the following small adjustment possibilities > so far. > > to a crash … vm_mm (its … > Thanks a lot. I will fix it. > > >> Will any other tags become helpful in such a case? > > > > How about changing > > "following calltrace is captured in kernel 4.19 with KSM zero page" > > to > > "The following calltrace is captured with the following patch applied: > > e86c59b1b12d ("mm/ksm: improve deduplication of zero pages with > > colouring") > > " > > ? > > I find it unlikely that such a wording alternative would be more appropriate > while I became just curious for related development consequences around > the usage of a longterm kernel version. > > Would you like to reuse the term “call trace”? > OK, I will reuse the “call trace”. Thanks again. Anyone else have any suggestions? If not, I will post another v4 version to fix the commit message that Markus mentioned.
diff --git a/mm/ksm.c b/mm/ksm.c index a558da9e71770..69b2f85e22d5b 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -2112,8 +2112,11 @@ static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item) down_read(&mm->mmap_sem); vma = find_mergeable_vma(mm, rmap_item->address); - err = try_to_merge_one_page(vma, page, - ZERO_PAGE(rmap_item->address)); + if (vma) + err = try_to_merge_one_page(vma, page, + ZERO_PAGE(rmap_item->address)); + else + err = -EFAULT; up_read(&mm->mmap_sem); /* * In case of failure, the page was not really empty, so we