]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 22 Feb 2021 07:18:06 +0000 (12:48 +0530)
committerJassi Brar <jaswinder.singh@linaro.org>
Mon, 22 Feb 2021 19:34:27 +0000 (13:34 -0600)
commitf1a6078ab62382002e06c4f49995bde26400e661
treede9a12d880c8ca9b212cdbc007ed88edcf858ef4
parent2a5cf5c2c52061dccc634568ea77de87b5c35ed6
mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer

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: 2d8817363fe1 ("mailbox: arm_mhuv2: Add driver")
Cc: v5.11 <stable@vger.kernel.org> # v5.11
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/arm_mhuv2.c