Re: [PATCH v2 2/2] net: fman: use devm_kzalloc() for fman and rely on devres
From: ZhaoJinming
Date: Wed Jun 24 2026 - 05:53:19 EST
Thank you for the feedback. I fully understand the concern about
devm_ conversions. I have reworked the patch to avoid the devm_kzalloc()
approach entirely. The new version explicitly calls devm_free_irq() on
the error paths before kfree(fman), keeping the original kzalloc_obj()
allocation unchanged. The fix targets the same UAF problem but without
introducing any devm_ allocation conversion.
v3:
- Drop devm_kzalloc() approach
- Fix by explicitly calling devm_free_irq() before kfree(fman)
on all post-IRQ-registration error paths
- Add conditional check for err_irq before devm_free_irq() in
read_dts_node() to handle the case where err_irq is not registered
Best regards,
ZhaoJinming