| Date | Tue, 14 Dec 2010 17:24:06 +0100 | From | Oleg Nesterov <> | Subject | Re: [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.
|