Messages in this thread | | | Date | Tue, 7 Jun 2022 17:20:39 +0100 | From | Mark Brown <> | Subject | Re: [PATCH 1/1] spi: fix use after free in of_spi_notify |
| |
On Tue, Jun 07, 2022 at 11:52:33PM +0800, Xiaohui Zhang wrote: > We can't use "ctlr->dev" after it has been freed.
> spi = of_register_spi_device(ctlr, rd->dn); > - put_device(&ctlr->dev); > > if (IS_ERR(spi)) { > pr_err("%s: failed to create for '%pOF'\n", > __func__, rd->dn); > + put_device(&ctlr->dev); > of_node_clear_flag(rd->dn, OF_POPULATED); > return notifier_from_errno(PTR_ERR(spi)); > } > + put_device(&ctlr->dev); > break;
Could you be more explicit about where the problematic use of ctlr->dev is please? [unhandled content-type:application/pgp-signature] | |