Commit ab07d62
net: macb: reduce scope of rx_fs_lock-protected regions
Commit ae8223d ("net: macb: Added support for RX filtering")
introduces a lock, rx_fs_lock which is intended to protect the list of
rx_flow items and synchronize access to the hardware rx filtering
registers.
However, the region protected by this lock is overscoped, unnecessarily
including things like slab allocation. Reduce this lock scope to only
include operations which must be performed atomically: list traversal,
addition, and removal, and hitting the macb filtering registers.
This fixes the use of kmalloc w/ GFP_KERNEL in atomic context.
Fixes: ae8223d ("net: macb: Added support for RX filtering")
Cc: Rafal Ozieblo <rafalo@cadence.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 7733857 commit ab07d62
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2796 | 2796 | | |
2797 | 2797 | | |
2798 | 2798 | | |
| 2799 | + | |
2799 | 2800 | | |
2800 | 2801 | | |
2801 | 2802 | | |
| |||
2811 | 2812 | | |
2812 | 2813 | | |
2813 | 2814 | | |
| 2815 | + | |
| 2816 | + | |
2814 | 2817 | | |
2815 | 2818 | | |
2816 | 2819 | | |
| |||
2833 | 2836 | | |
2834 | 2837 | | |
2835 | 2838 | | |
| 2839 | + | |
2836 | 2840 | | |
2837 | 2841 | | |
2838 | 2842 | | |
| 2843 | + | |
2839 | 2844 | | |
2840 | 2845 | | |
2841 | 2846 | | |
| |||
2846 | 2851 | | |
2847 | 2852 | | |
2848 | 2853 | | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2849 | 2857 | | |
2850 | 2858 | | |
2851 | 2859 | | |
| |||
2862 | 2870 | | |
2863 | 2871 | | |
2864 | 2872 | | |
2865 | | - | |
2866 | 2873 | | |
| 2874 | + | |
| 2875 | + | |
2867 | 2876 | | |
2868 | 2877 | | |
2869 | 2878 | | |
2870 | 2879 | | |
| 2880 | + | |
2871 | 2881 | | |
2872 | 2882 | | |
2873 | 2883 | | |
| |||
2936 | 2946 | | |
2937 | 2947 | | |
2938 | 2948 | | |
2939 | | - | |
2940 | 2949 | | |
2941 | 2950 | | |
2942 | | - | |
2943 | | - | |
2944 | 2951 | | |
2945 | 2952 | | |
2946 | 2953 | | |
| |||
2959 | 2966 | | |
2960 | 2967 | | |
2961 | 2968 | | |
2962 | | - | |
2963 | 2969 | | |
2964 | 2970 | | |
2965 | 2971 | | |
| |||
0 commit comments