* + mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch added to -mm tree
@ 2017-05-31 21:08 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-05-31 21:08 UTC (permalink / raw)
To: garsilva, mm-commits
The patch titled
Subject: mm/memory_hotplug.c: add NULL check to avoid potential NULL pointer dereference
has been added to the -mm tree. Its filename is
mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: mm/memory_hotplug.c: add NULL check to avoid potential NULL pointer dereference
NULL check at line 1226: if (!pgdat), implies that pointer pgdat
might be NULL.
rollback_node_hotadd() dereferences this pointer. Add NULL check to avoid
a potential NULL pointer dereference.
Addresses-Coverity-ID: 1369133
Link: http://lkml.kernel.org/r/20170530212436.GA6195@embeddedgus
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN mm/memory_hotplug.c~mm-add-null-check-to-avoid-potential-null-pointer-dereference mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~mm-add-null-check-to-avoid-potential-null-pointer-dereference
+++ a/mm/memory_hotplug.c
@@ -1273,7 +1273,7 @@ register_fail:
error:
/* rollback pgdat allocation and others */
- if (new_pgdat)
+ if (new_pgdat && pgdat)
rollback_node_hotadd(nid, pgdat);
memblock_remove(start, size);
_
Patches currently in -mm which might be from garsilva@embeddedor.com are
mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-31 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 21:08 + mm-add-null-check-to-avoid-potential-null-pointer-dereference.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.