Hypothetically, the following should work:
kthread_run(kconnect, s, 0);
// I've never written kernel drivers to this extent. In regular C
// applications, when you launch a thread, the main-thread (which is
// where we are at the moment), cannot end until the spawned thread
// finishes. Thus I'm not sure if you need to check to ensure the
// thread has finished before returning from the init_sock() function.
int kconnect(void *data)
Sock** s = (Sock**) data;
// now, the only problem here is that your program does not know
// how many Socks there are; sure, you as the programmer know, but
// really it is the thread that should be able to obtain this
// information during runtime. An alternative would be to bundle
// the Sock array and the number of elements in the array into a
// structure, then pass that structure as the data to the thread.