#define GSS_SVC_UPCALL_TIMEOUT (20)
-static spinlock_t __ctx_index_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t __ctx_index_lock;
static __u64 __ctx_index;
__u64 gss_get_next_ctx_index(void)
{
int i;
+ spin_lock_init(&__ctx_index_lock);
+ /*
+ * this helps reducing context index confliction. after server reboot,
+ * conflicting request from clients might be filtered out by initial
+ * sequence number checking, thus no chance to sent error notification
+ * back to clients.
+ */
+ get_random_bytes(&__ctx_index, sizeof(__ctx_index));
+
+
cache_register(&rsi_cache);
cache_register(&rsc_cache);
CWARN("Init channel is not opened by lsvcgssd, following "
"request might be dropped until lsvcgssd is active\n");
- /* this helps reducing context index confliction. after server reboot,
- * conflicting request from clients might be filtered out by initial
- * sequence number checking, thus no chance to sent error notification
- * back to clients. */
- get_random_bytes(&__ctx_index, sizeof(__ctx_index));
-
return 0;
}