Harshit Mogalapalli 8fcf2d012c ubi: block: Fix a possible use-after-free bug in ubiblock_create()
Smatch warns:
	drivers/mtd/ubi/block.c:438 ubiblock_create()
	warn: '&dev->list' not removed from list

'dev' is freed in 'out_free_dev:, but it is still on the list.

To fix this, delete the list item before freeing.

Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
2023-02-14 15:17:55 +01:00
..
2023-02-13 22:23:03 +01:00
2023-02-02 21:13:51 +01:00
2022-09-21 11:32:27 +02:00
2023-02-13 22:24:10 +01:00
2022-09-21 11:12:18 +02:00