Re: [PATCH] mips: cdmm: fix use-after-free in mips_cdmm_bus_discover

From: Thomas Bogendoerfer
Date: Fri Nov 27 2020 - 04:57:36 EST


On Fri, Nov 20, 2020 at 03:48:47PM +0800, Qinglang Miao wrote:
> kfree(dev) has been called inside put_device so anther
> kfree would cause a use-after-free bug/
>
> Fixes: 8286ae03308c ("MIPS: Add CDMM bus support")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
> ---
> drivers/bus/mips_cdmm.c | 1 -
> 1 file changed, 1 deletion(-)

applied with braces removal to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]