mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-18 23:00:50 +00:00
If of_clk_add_provider() fails in ca8210_register_ext_clock(),
it calls clk_unregister() to release priv->clk and returns an
error. However, the caller ca8210_probe() then calls ca8210_remove(),
where priv->clk is freed again in ca8210_unregister_ext_clock(). In
this case, a use-after-free may happen in the second time we call
clk_unregister().
Fix this by removing the first clk_unregister(). Also, priv->clk could
be an error code on failure of clk_register_fixed_rate(). Use
IS_ERR_OR_NULL to catch this case in ca8210_unregister_ext_clock().
Fixes:
|
||
|---|---|---|
| .. | ||
| adf7242.c | ||
| at86rf230.c | ||
| at86rf230.h | ||
| atusb.c | ||
| atusb.h | ||
| ca8210.c | ||
| cc2520.c | ||
| fakelb.c | ||
| Kconfig | ||
| mac802154_hwsim.c | ||
| mac802154_hwsim.h | ||
| Makefile | ||
| mcr20a.c | ||
| mcr20a.h | ||
| mrf24j40.c | ||