Steven Rostedt (VMware) 1dcb3ebc24 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>
2021-04-16 11:43:20 +02:00
..
2021-04-14 08:41:58 +02:00
2020-08-26 09:10:39 -04:00
2020-08-04 14:20:26 -07:00
2021-03-30 14:31:52 +02:00
2020-08-12 10:58:02 -07:00
2021-02-07 15:37:17 +01:00
2021-03-25 09:04:11 +01:00
2020-11-14 11:26:04 -08:00
2020-07-27 14:31:12 -04:00
2021-02-07 15:37:17 +01:00