]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: module: Ensure we always clean up r_mips_hi16_list
authorPaul Burton <paul.burton@imgtec.com>
Thu, 30 Mar 2017 18:37:44 +0000 (11:37 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 28 Jun 2017 10:22:38 +0000 (12:22 +0200)
commit351b0940d473146923711bc943fc881354a4c1f3
tree22fb67dcf5e2202a362c200e1e56ac77c58c9ee7
parent59baa24d8710add3689124fb2a232bac2decae9a
MIPS: module: Ensure we always clean up r_mips_hi16_list

If we hit an error whilst processing a reloc then we would return early
from apply_relocate & potentially not free entries in r_mips_hi16_list,
thereby leaking memory. Fix this by ensuring that we always run the code
to free r_mipps_hi16_list when errors occur.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 861667dc82f5 ("MIPS: Fix race condition in module relocation code.")
Fixes: 04211a574641 ("MIPS: Bail on unsupported module relocs")
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15831/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/module.c