From 6549d0075fb78e70b977b70c8e4278e3544ee603 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Sat, 29 Mar 2025 18:09:47 +0300 Subject: [PATCH] Reoder config refcount acquire in kernel module That's like an impossible occurrence but why not :) --- src/kytunblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kytunblock.c b/src/kytunblock.c index f2b0f5c..bbc9b3f 100644 --- a/src/kytunblock.c +++ b/src/kytunblock.c @@ -483,8 +483,8 @@ static NF_CALLBACK(ykb_nf_hook, skb) { uint8_t *data_buf = NULL; int nf_verdict = NF_ACCEPT; + kref_get(&cur_config->refcount); struct config_t *config = cur_config; - kref_get(&config->refcount); ++global_stats.all_packet_counter;