]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64: __init code no longer called during non __init
authorAllen Pais <allen.pais@oracle.com>
Fri, 2 Jan 2015 05:18:41 +0000 (10:48 +0530)
committerAllen Pais <allen.pais@oracle.com>
Wed, 9 Sep 2015 18:42:15 +0000 (00:12 +0530)
commitc03249bfd7dc0957d99d12bff7c9b0dd189ad7f2
treef443cea3f45eaac9a65305613beca76c45603e68
parentb953c0d234bc72e8489d3bf51a276c5c4ec85345
sparc64: __init code no longer called during non __init

mdesc_update calling __init memory free code through a pointer at
non-init time. Since text page was already given back and reused
this results in an illegal instruction trap. Was not caught by
linker section mismatch checks due to pointer indirection.

This patch NULL's out mops pointer after __init time and then
checks for non-NULL before calling mops->free.

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
(cherry picked from commit 6dbae4a0137d7855472c4845b5db11cffa32efc1)
(cherry picked from commit f0673a413f04de21963ab7f3912eb9a84c52c66e)
arch/sparc/kernel/mdesc.c