binfmt_elf: Respect error return from `regset->active'
The regset API documented in <linux/regset.h> defines -ENODEV as the result of the `->active' handler to be used where the feature requested is not available on the hardware found. However code handling core file note generation in `fill_thread_core_info' interpretes any non-zero result from the `->active' handler as the regset requested being active. Consequently processing continues (and hopefully gracefully fails later on) rather than being abandoned right away for the regset requested. Fix the problem then by making the code proceed only if a positive result is returned from the `->active' handler. Signed-off-by: Maciej W. Rozycki <firstname.lastname@example.org> Signed-off-by: Paul Burton <email@example.com> Fixes: 4206d3aa ("elf core dump: notes user_regset") Patchwork: https://patchwork.linux-mips.org/patch/19332/ Cc: Alexander Viro <firstname.lastname@example.org> Cc: James Hogan <email@example.com> Cc: Ralf Baechle <firstname.lastname@example.org> Cc: email@example.com Cc: firstname.lastname@example.org Cc: email@example.com
Showing with 1 addition and 1 deletion