lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [Patch 14/21] Create ELF header
    On 12/14, Suzuki K. Poulose wrote:
    >
    > +static void get_elfhdr_size(struct core_proc *cp)
    > +{
    > + struct vm_area_struct *gate_vma;
    > + int segs;
    > +
    > + segs = cp->task->mm->map_count;

    But this is unsafe. What if cp->task was stopped when
    open_gencore() was called? In this case it can be killed/dead.

    cp->task->mm can be NULL. In fact, cp->task can point to nothing.

    Any usage of cp->task is not safe, afaics.

    Oleg.



    \
     
     \ /
      Last update: 2010-12-14 17:33    [W:0.035 / U:30.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site