aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorYang Yingliang <[email protected]>2022-07-12 21:55:04 +0800
committerMark Brown <[email protected]>2022-07-13 13:49:02 +0100
commit43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0 (patch)
tree2b8b11523c75916c3149759489b24352b2c33c30 /lib/memory-notifier-error-inject.c
parentcdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a (diff)
spi: Fix simplification of devm_spi_register_controller
This reverts commit 59ebbe40fb51 ("spi: simplify devm_spi_register_controller"). If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path. Fixes: 59ebbe40fb51 ("spi: simplify devm_spi_register_controller") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions