]> 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)
commita72895e11ff6742ef1b92d1b6cb90c233bae1e0b
tree22fb67dcf5e2202a362c200e1e56ac77c58c9ee7
parentac98da39c75779b6b661654859d1af722d7e575e
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: 28e20668d01c ("MIPS: Fix race condition in module relocation code.")
Fixes: a39d8aef61c8 ("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