Re: [PATCH v2] block: fix potential invalid pointer dereference in blk_add_partition
From: Jens Axboe
Date: Thu Sep 12 2024 - 10:48:49 EST
On Wed, 11 Sep 2024 18:59:54 +0530, Riyan Dhiman wrote:
> The blk_add_partition() function initially used a single if-condition
> (IS_ERR(part)) to check for errors when adding a partition. This was
> modified to handle the specific case of -ENXIO separately, allowing the
> function to proceed without logging the error in this case. However,
> this change unintentionally left a path where md_autodetect_dev()
> could be called without confirming that part is a valid pointer.
>
> [...]
Applied, thanks!
[1/1] block: fix potential invalid pointer dereference in blk_add_partition
commit: 26e197b7f9240a4ac301dd0ad520c0c697c2ea7d
Best regards,
--
Jens Axboe