lkml.org 
[lkml]   [2015]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V4] mm: fix kernel crash in khugepaged thread
    On Fri, 13 Nov 2015 19:54:11 +0800
    yalin wang <yalin.wang2010@gmail.com> wrote:

    > >>> TP_fast_assign(
    > >>> __entry->mm = mm;
    > >>> - __entry->pfn = pfn;
    > >>> + __entry->pfn = page_to_pfn(page);
    > >>
    > >> Instead of the condition, we could have:
    > >>
    > >> __entry->pfn = page ? page_to_pfn(page) : -1;
    > >
    > > I agree. Please do it like this.

    hmm, pfn is defined as an unsigned long, would -1 be the best.
    Or should it be (-1UL).

    Then we could also have:

    TP_printk("mm=%p, scan_pfn=0x%lx%s, writable=%d, referenced=%d, none_or_zero=%d, status=%s, unmapped=%d",
    __entry->mm,
    __entry->pfn == (-1UL) ? 0 : __entry->pfn,
    __entry->pfn == (-1UL) ? "(null)" : "",

    Note the added %s after %lx I have in the print format.

    -- Steve



    > ok , i will send V5 patch .


    \
     
     \ /
      Last update: 2015-11-13 15:21    [W:3.247 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site