Repository navigation
Commit 919067c
net: add CONFIG_PCPU_DEV_REFCNT
I was working on a syzbot issue, claiming one device could not be
dismantled because its refcount was -1
unregister_netdevice: waiting for sit0 to become free. Usage count = -1
It would be nice if syzbot could trigger a warning at the time
this reference count became negative.
This patch adds CONFIG_PCPU_DEV_REFCNT options which defaults
to per cpu variables (as before this patch) on SMP builds.
v2: free_dev label in alloc_netdev_mqs() is moved to avoid
a compiler warning (-Wunused-label), as reported
by kernel test robot <lkp@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 942f0c6 commit 919067c
3 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2092 | 2092 | | |
2093 | 2093 | | |
2094 | 2094 | | |
| 2095 | + | |
| 2096 | + | |
2095 | 2097 | | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
2096 | 2101 | | |
2097 | 2102 | | |
2098 | 2103 | | |
| |||
4044 | 4049 | | |
4045 | 4050 | | |
4046 | 4051 | | |
| 4052 | + | |
4047 | 4053 | | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
4048 | 4057 | | |
4049 | 4058 | | |
4050 | 4059 | | |
| |||
4055 | 4064 | | |
4056 | 4065 | | |
4057 | 4066 | | |
| 4067 | + | |
4058 | 4068 | | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
4059 | 4072 | | |
4060 | 4073 | | |
4061 | 4074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10312 | 10312 | | |
10313 | 10313 | | |
10314 | 10314 | | |
| 10315 | + | |
10315 | 10316 | | |
10316 | 10317 | | |
10317 | 10318 | | |
10318 | 10319 | | |
10319 | 10320 | | |
| 10321 | + | |
| 10322 | + | |
| 10323 | + | |
10320 | 10324 | | |
10321 | 10325 | | |
10322 | 10326 | | |
| |||
10674 | 10678 | | |
10675 | 10679 | | |
10676 | 10680 | | |
| 10681 | + | |
10677 | 10682 | | |
10678 | 10683 | | |
10679 | 10684 | | |
| 10685 | + | |
10680 | 10686 | | |
10681 | 10687 | | |
10682 | 10688 | | |
| |||
10740 | 10746 | | |
10741 | 10747 | | |
10742 | 10748 | | |
| 10749 | + | |
10743 | 10750 | | |
10744 | 10751 | | |
| 10752 | + | |
10745 | 10753 | | |
10746 | 10754 | | |
10747 | 10755 | | |
| |||
10783 | 10791 | | |
10784 | 10792 | | |
10785 | 10793 | | |
| 10794 | + | |
10786 | 10795 | | |
10787 | 10796 | | |
| 10797 | + | |
10788 | 10798 | | |
10789 | 10799 | | |
10790 | 10800 | | |
| |||
0 commit comments