diff options
author | Paul Burton <[email protected]> | 2016-02-04 13:05:02 +0000 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2016-04-03 12:32:10 +0200 |
commit | 04211a574641e29b529dcc84e75c03d7e9e368cf (patch) | |
tree | 8acdcb1e2379f5707734460608a72b0d214ae831 /lib/cpu-notifier-error-inject.c | |
parent | f7f797cfc6c80a3505d1a316ee9aa3ec329289e9 (diff) |
MIPS: Bail on unsupported module relocs
When an unsupported reloc is encountered in a module, we currently
blindly branch to whatever would be at its entry in the reloc handler
function pointer arrays. This may be NULL, or if the unsupported reloc
has a type greater than that of the supported reloc with the highest
type then we'll dereference some value after the function pointer array
& branch to that. The result is at best a kernel oops.
Fix this by checking that the reloc type has an entry in the function
pointer array (ie. is less than the number of items in the array) and
that the handler is non-NULL, returning an error code to fail the module
load if no handler is found.
Signed-off-by: Paul Burton <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Steven J. Hill <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/12432/
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions