This is a note to let you know that I've just added the patch titled mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mailbox-arm_mhuv2-skip-calling-kfree-with-invalid-pointer.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6b50df2b8c208a04d44b8df5b7baaf668ceb8fc3 Mon Sep 17 00:00:00 2001 From: Viresh Kumar <viresh.kumar@xxxxxxxxxx> Date: Mon, 22 Feb 2021 12:48:06 +0530 Subject: mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer From: Viresh Kumar <viresh.kumar@xxxxxxxxxx> commit 6b50df2b8c208a04d44b8df5b7baaf668ceb8fc3 upstream. It is possible that 'data' passed to kfree() is set to a error value instead of allocated space. Make sure it doesn't get called with invalid pointer. Fixes: 5a6338cce9f4 ("mailbox: arm_mhuv2: Add driver") Cc: v5.11 <stable@xxxxxxxxxxxxxxx> # v5.11 Reported-by: kernel test robot <lkp@xxxxxxxxx> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx> Signed-off-by: Jassi Brar <jaswinder.singh@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mailbox/arm_mhuv2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mailbox/arm_mhuv2.c +++ b/drivers/mailbox/arm_mhuv2.c @@ -699,7 +699,9 @@ static irqreturn_t mhuv2_receiver_interr ret = IRQ_HANDLED; } - kfree(data); + if (!IS_ERR(data)) + kfree(data); + return ret; } Patches currently in stable-queue which might be from viresh.kumar@xxxxxxxxxx are queue-5.11/opp-correct-debug-message-in-_opp_add_static_v2.patch queue-5.11/cpufreq-brcmstb-avs-cpufreq-free-resources-in-error-.patch queue-5.11/cpufreq-brcmstb-avs-cpufreq-fix-resource-leaks-in-re.patch queue-5.11/mailbox-arm_mhuv2-skip-calling-kfree-with-invalid-pointer.patch