[qca-nss-drv]: sysctl init inside spin lock
nss_n2h_empty_pool_buf_register_sysctl() was called within
spin_lock_bh(&(nss_top->lock)). This register call was internally
calling a mem_alloc which could go to sleep. Hence this was causing
a warning.
Fix: Moved the registration to nss_init() where all the registerations
are invoked.
CRs-Fixed: 793357
Change-Id: I51536dea0ea3b0821d007219011bd6d0b09e92e1
Signed-off-by: Vijay Dewangan <vdewanga@codeaurora.org>
diff --git a/nss_init.c b/nss_init.c
index f9ca687..4bfee61 100755
--- a/nss_init.c
+++ b/nss_init.c
@@ -1380,6 +1380,11 @@
nss_ipv4_register_sysctl();
nss_ipv6_register_sysctl();
+ /*
+ * Registering sysctl for n2h empty pool buffer.
+ */
+ nss_n2h_empty_pool_buf_register_sysctl();
+
#ifdef CONFIG_DEBUG_KMEMLEAK
/*
* If the system is under kmemleak debugging, track our