diff options
| author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-03-30 09:58:38 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-16 11:43:20 +0200 |
| commit | 1dcb3ebc24164c0b5d3b13696d80bf163e16b664 (patch) | |
| tree | 9ae055a7fb24c07674c56f9cc9852f4b554f388f /include/linux/verification.h | |
| parent | 6c6d58322079f94d58e22eda1166240181ac3270 (diff) | |
ftrace: Check if pages were allocated before calling free_pages()
[ Upstream commit 59300b36f85f254260c81d9dd09195fa49eb0f98 ]
It is possible that on error pg->size can be zero when getting its order,
which would return a -1 value. It is dangerous to pass in an order of -1
to free_pages(). Check if order is greater than or equal to zero before
calling free_pages().
Link: https://lore.kernel.org/lkml/20210330093916.432697c7@gandalf.local.home/
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/verification.h')
0 files changed, 0 insertions, 0 deletions
