Messages in this thread | | | Date | Tue, 5 Jun 2012 12:10:47 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 2/3] uprobes: change build_map_info() to try kmalloc(GFP_NOWAIT) first |
| |
On 06/04, Oleg Nesterov wrote: > > @@ -772,8 +772,13 @@ build_map_info(struct address_space *mapping, loff_t offset, bool is_register) > continue; > > if (!prev) { > - more++; > - continue; > + prev = kmalloc(sizeof(struct map_info), > + GFP_NOWAIT | __GFP_NOMEMALLOC | __GFP_NOWARN); > + if (!prev) { > + more++; > + continue; > + } > + prev->next = NULL; > }
OK, this is not exactly right, it is pointless and wrong to do kmalloc(GFP_NOWAIT) if it failed before (iow, more != 0).
Easy to fix, I'll send v2 tomorrow.
Oleg.
| |