Skip to contentSkip to conversation

alpha: Checking for a failed kmalloc() in process_reloc_for_got()?

DISCUSSION SF Markus Elfring 2 participants 3 messages Dec 3, 2016 – Dec 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

Another run of a small script for the semantic patch language (Coccinelle) pointed the implementation of the function “process_reloc_for_got� out for further considerations.
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/alpha/kernel/module.c?idà5f574a0bb1f4502a4b2264fdb0ef6419cf3772#n40

Would it be useful to check the return value from a call of the function “kmalloc� also there?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 4 lines · SF Markus Elfring

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/alpha/kernel/module.c?idà5f574a0bb1f4502a4b2264fdb0ef6419cf3772#n40

Would it be useful to check the return value from a call of the function “kmalloc� also there?

*drumroll* it'd actually be a proper bugfix.

Signature · 7 lines
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 6 lines
Quoted 4 lines

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/alpha/kernel/module.c?idà5f574a0bb1f4502a4b2264fdb0ef6419cf3772#n40

Would it be useful to check the return value from a call of the function “kmalloc� also there?

*drumroll* it'd actually be a proper bugfix.

Which kind of exception handling can be added here when the function “process_reloc_for_got� has got the return type “void� so far?

Will it be needed to handle such a software failure at more source code places by a special error code?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html