Commit ad5c318
net: mv643xx_eth: fix an OF node reference leak
Current implementation of mv643xx_eth_shared_of_add_port() calls
of_parse_phandle(), but does not release the refcount on error. Call
of_node_put() in the error path and in mv643xx_eth_shared_of_remove().
This bug was found by an experimental verification tool that I am
developing.
Fixes: 76723bc ("net: mv643xx_eth: add DT parsing support")
Signed-off-by: Joe Hattori <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent fb3a9a1 commit ad5c318
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2704 | 2704 | | |
2705 | 2705 | | |
2706 | 2706 | | |
| 2707 | + | |
2707 | 2708 | | |
2708 | 2709 | | |
2709 | 2710 | | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
2710 | 2716 | | |
2711 | 2717 | | |
2712 | 2718 | | |
| |||
2769 | 2775 | | |
2770 | 2776 | | |
2771 | 2777 | | |
2772 | | - | |
2773 | | - | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
2774 | 2782 | | |
2775 | 2783 | | |
2776 | 2784 | | |
| |||
2792 | 2800 | | |
2793 | 2801 | | |
2794 | 2802 | | |
| 2803 | + | |
| 2804 | + | |
2795 | 2805 | | |
2796 | 2806 | | |
2797 | 2807 | | |
| |||
0 commit comments