Commit 794cd13
net: airoha: Move net_devs registration in a dedicated routine
Since airoha_probe() is not executed under rtnl lock, there is small race
where a given device is configured by user-space while the remaining ones
are not completely loaded from the dts yet. This condition will allow a
hw device misconfiguration since there are some conditions (e.g. GDM2 check
in airoha_dev_init()) that require all device are properly loaded from the
device tree. Fix the issue moving net_devices registration at the end of
the airoha_probe routine.
Fixes: 9cd451d ("net: airoha: Add loopback support for GDM2")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: NipaLocal <nipa@local>1 parent a27ef29 commit 794cd13
1 file changed
+26
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2924 | 2924 | | |
2925 | 2925 | | |
2926 | 2926 | | |
2927 | | - | |
2928 | | - | |
2929 | | - | |
| 2927 | + | |
| 2928 | + | |
2930 | 2929 | | |
2931 | | - | |
2932 | | - | |
2933 | | - | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
2934 | 2933 | | |
2935 | | - | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
2936 | 2937 | | |
2937 | | - | |
2938 | | - | |
2939 | | - | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
2940 | 2947 | | |
2941 | 2948 | | |
2942 | 2949 | | |
| |||
3027 | 3034 | | |
3028 | 3035 | | |
3029 | 3036 | | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
3030 | 3041 | | |
3031 | 3042 | | |
3032 | 3043 | | |
| |||
3040 | 3051 | | |
3041 | 3052 | | |
3042 | 3053 | | |
3043 | | - | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
3044 | 3058 | | |
3045 | | - | |
3046 | | - | |
| 3059 | + | |
3047 | 3060 | | |
3048 | 3061 | | |
3049 | 3062 | | |
| |||
0 commit comments