diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-16 15:20:01 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-16 15:20:01 +0200 |
commit | a695af2e4524ff47c335a47474ac9d956cec3415 (patch) | |
tree | 4660090879cc4c456da533f77740ec7c4cbc48fa /kernels/marlin/tvec_base_deferrable-hack.patch | |
parent | build: do not skip incomplete kernel specifications (diff) | |
download | android-wireguard-module-builder-a695af2e4524ff47c335a47474ac9d956cec3415.tar.xz android-wireguard-module-builder-a695af2e4524ff47c335a47474ac9d956cec3415.zip |
kernels: marlin: move hack to init from uninit
Diffstat (limited to 'kernels/marlin/tvec_base_deferrable-hack.patch')
-rw-r--r-- | kernels/marlin/tvec_base_deferrable-hack.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernels/marlin/tvec_base_deferrable-hack.patch b/kernels/marlin/tvec_base_deferrable-hack.patch index 1eef1db..dbfd27e 100644 --- a/kernels/marlin/tvec_base_deferrable-hack.patch +++ b/kernels/marlin/tvec_base_deferrable-hack.patch @@ -1,5 +1,5 @@ diff --git a/src/ratelimiter.c b/src/ratelimiter.c -index e33ec72a..27a34071 100644 +index e33ec72a..5062e329 100644 --- a/src/ratelimiter.c +++ b/src/ratelimiter.c @@ -19,6 +19,7 @@ @@ -18,14 +18,14 @@ index e33ec72a..27a34071 100644 static DECLARE_DEFERRABLE_WORK(gc_work, wg_ratelimiter_gc_entries); static struct hlist_head *table_v4; #if IS_ENABLED(CONFIG_IPV6) -@@ -216,6 +218,10 @@ err: +@@ -169,6 +171,10 @@ err_oom: - void wg_ratelimiter_uninit(void) + int wg_ratelimiter_init(void) { + struct timer_list dummy_timer; + setup_deferrable_timer_on_stack(&dummy_timer, NULL, 0); + gc_work.timer.base = dummy_timer.base; + mutex_lock(&init_lock); - if (!init_refcnt || --init_refcnt) + if (++init_refcnt != 1) goto out; |