mm: don't warn when vmalloc() fails due to a fatal signal
Subsystems (2)
PATCH 1/1 mm: don't warn when vmalloc() fails due to a fatal signal
When vmalloc() fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However, vmalloc() can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably.
Don't warn when vmalloc() fails due to fatal signal pending.
--- mm/vmalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
mm/vmalloc.c +2 -1
@@ -1683,7 +1683,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,if (fatal_signal_pending (current)) { area->nr_pages = i; - goto fail; + goto fail_no_warn; }if (node ==NUMA_NO_NODE )
@@ -1709,6 +1709,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,warn_alloc (gfp_mask,NULL ,"vmalloc: allocation failure, allocated %ld of %ld bytes" , (area->nr_pages*PAGE_SIZE ), area->size); +fail_no_warn:vfree (area->addr);return NULL ; }
Signature · 7 lines
2.12.0.246.ga2ecc84866-goog -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Dmitry Vyukov
When
vmalloc()fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However,vmalloc()can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably.Don't warn when
vmalloc()fails due to fatal signal pending.Signed-off-by Dmitry Vyukov <[email protected]>
Signature · 7 lines
Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Dmitry Vyukov
When
vmalloc()fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However,vmalloc()can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably.Don't warn when
vmalloc()fails due to fatal signal pending.Signed-off-by Dmitry Vyukov <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Dmitry Vyukov
When
vmalloc()fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However,vmalloc()can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably.Don't warn when
vmalloc()fails due to fatal signal pending.Signed-off-by Dmitry Vyukov <[email protected]>
Quoted 27 lines
--- mm/vmalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)mm/vmalloc.c +2
-1@@ -1683,7 +1683,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,if (fatal_signal_pending (current)) { area->nr_pages = i; - goto fail; + goto fail_no_warn; }if (node ==NUMA_NO_NODE )@@ -1709,6 +1709,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,warn_alloc (gfp_mask,NULL ,"vmalloc: allocation failure, allocated %ld of %ld bytes" , (area->nr_pages*PAGE_SIZE ), area->size); +fail_no_warn:vfree (area->addr);return NULL ; }Signature · 1 line
2.12.0.246.ga2ecc84866-goog
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>