]> git.baikalelectronics.ru Git - kernel.git/commit
fprobe: Check rethook_alloc() return in rethook initialization
authorRafael Mendonca <rafaelmendsr@gmail.com>
Tue, 25 Oct 2022 03:12:08 +0000 (00:12 -0300)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 3 Nov 2022 23:50:00 +0000 (08:50 +0900)
commit7397418a73439246af3940f31f0d214b4ae993bd
tree06f1b787d0588ff6a658059eda3c77a56a5ad903
parent63799733423da00d8633b56d0e494ccec651c3b9
fprobe: Check rethook_alloc() return in rethook initialization

Check if fp->rethook succeeded to be allocated. Otherwise, if
rethook_alloc() fails, then we end up dereferencing a NULL pointer in
rethook_add_node().

Link: https://lore.kernel.org/all/20221025031209.954836-1-rafaelmendsr@gmail.com/
Fixes: e2584b09e7fb ("fprobe: Add exit_handler support")
Cc: stable@vger.kernel.org
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/fprobe.c