In the Linux kernel, the following vulnerability has been resolved: spi: Fix simplification of devmspiregistercontroller This reverts commit 59ebbe40fb51 ("spi: simplify devmspiregistercontroller"). If devmaddaction() fails in devmaddactionorreset(), devmspiunregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spiputcontroller() in error path.