phy: ti: am654-serdes: fix an use-after-free in serdes_am654_clk_register()
authorWen Yang <wen.yang99@zte.com.cn>
Mon, 8 Jul 2019 06:19:05 +0000 (14:19 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 26 Aug 2019 11:50:01 +0000 (17:20 +0530)
commit3e644828421e31167bedd8dc4d291cdcc822ab20
tree1f683031afd65f88cbd90668676623ee28827dbf
parentcacc9539cff118735b11a350d121cb7eeca7e358
phy: ti: am654-serdes: fix an use-after-free in serdes_am654_clk_register()

The regmap_node variable is still being used in the syscon_node_to_regmap()
call after the of_node_put() call, which may result in use-after-free.

Fixes: 71e2f5c5c224 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/ti/phy-am654-serdes.c