Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208910
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/memblock: check memblock_reserve on fail in memblock_virt_alloc_internal |
| Date | 2015-08-18 00:00 +0200 |
| Message-ID | <pYABI-31Z-3@gated-at.bofh.it> (permalink) |
| References | <pXOnn-11b-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, 16 Aug 2015 00:26:46 +0600 Alexander Kuleshov <kuleshovmail@gmail.com> wrote: > This patch adds a check for memblock_reserve() call in the > memblock_virt_alloc_internal() function, because memblock_reserve() > can return -errno on fail. > > ... > > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -1298,7 +1298,9 @@ again: > > return NULL; > done: > - memblock_reserve(alloc, size); > + if (memblock_reserve(alloc, size)) > + return NULL; > + > ptr = phys_to_virt(alloc); > memset(ptr, 0, size); This shouldn't ever happen. If it *does* happen, something is messed up and we should warn. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm/memblock: check memblock_reserve on fail in memblock_virt_alloc_internal Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-08-15 20:30 +0200 Re: [PATCH] mm/memblock: check memblock_reserve on fail in memblock_virt_alloc_internal Andrew Morton <akpm@linux-foundation.org> - 2015-08-18 00:00 +0200
csiph-web