Some kernel libs (eg. rpc) open a socket inside kernel, and are associated with file-descriptors (FDs). These could be used by any process hitting the code. Given that for any process, the FDs are stored in the task_struct in its File Descriptor Table, where are these kernel-FDs stored and how are they accounted for? These are not particularly created by process (say, these FDs were created at module_init). How are the values to such FDs allocated, the process FDs start with 0, 1, 2 and could overlap these?
This is also extended to any other kind of FDs: file, pipe, etc.