fs/smb/server/transport_ipc.c
Source file repositories/reference/linux-study-clean/fs/smb/server/transport_ipc.c
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/server/transport_ipc.c- Extension
.c- Size
- 24467 bytes
- Lines
- 1005
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/jhash.hlinux/slab.hlinux/rwsem.hlinux/mutex.hlinux/wait.hlinux/hashtable.hnet/net_namespace.hnet/genetlink.hlinux/socket.hlinux/workqueue.hlinux/overflow.hvfs_cache.htransport_ipc.hserver.hsmb_common.hmgmt/user_config.hmgmt/share_config.hmgmt/user_session.hmgmt/tree_connect.hmgmt/ksmbd_ida.hconnection.htransport_tcp.htransport_rdma.h
Detected Declarations
struct ksmbd_ipc_msgstruct ipc_msg_table_entryfunction ksmbd_ipc_validate_versionfunction ksmbd_nl_init_fixupfunction rpc_context_flagsfunction ipc_update_last_activefunction ipc_msg_freefunction ipc_msg_handle_freefunction handle_responsefunction ipc_server_config_on_startupfunction handle_startup_eventfunction handle_unsupported_eventfunction handle_generic_eventfunction ipc_msg_sendfunction ipc_validate_msgfunction ksmbd_ipc_heartbeat_requestfunction ksmbd_ipc_spnego_authen_requestfunction ksmbd_ipc_tree_connect_requestfunction ksmbd_ipc_tree_disconnect_requestfunction ksmbd_ipc_logout_requestfunction ksmbd_ipc_share_config_requestfunction __ipc_heartbeatfunction ipc_timer_heartbeatfunction ksmbd_ipc_id_allocfunction ksmbd_rpc_id_freefunction ksmbd_ipc_releasefunction ksmbd_ipc_soft_resetfunction ksmbd_ipc_init
Annotated Snippet
struct ksmbd_ipc_msg {
unsigned int type;
unsigned int sz;
unsigned char payload[] __counted_by(sz);
};
struct ipc_msg_table_entry {
unsigned int handle;
unsigned int type;
wait_queue_head_t wait;
struct hlist_node ipc_table_hlist;
void *response;
unsigned int msg_sz;
};
static struct delayed_work ipc_timer_work;
static int handle_startup_event(struct sk_buff *skb, struct genl_info *info);
static int handle_unsupported_event(struct sk_buff *skb, struct genl_info *info);
static int handle_generic_event(struct sk_buff *skb, struct genl_info *info);
static int ksmbd_ipc_heartbeat_request(void);
static const struct nla_policy ksmbd_nl_policy[KSMBD_EVENT_MAX + 1] = {
[KSMBD_EVENT_UNSPEC] = {
.len = 0,
},
[KSMBD_EVENT_HEARTBEAT_REQUEST] = {
.len = sizeof(struct ksmbd_heartbeat),
},
[KSMBD_EVENT_STARTING_UP] = {
.len = sizeof(struct ksmbd_startup_request),
},
[KSMBD_EVENT_SHUTTING_DOWN] = {
.len = sizeof(struct ksmbd_shutdown_request),
},
[KSMBD_EVENT_LOGIN_REQUEST] = {
.len = sizeof(struct ksmbd_login_request),
},
[KSMBD_EVENT_LOGIN_RESPONSE] = {
.len = sizeof(struct ksmbd_login_response),
},
[KSMBD_EVENT_SHARE_CONFIG_REQUEST] = {
.len = sizeof(struct ksmbd_share_config_request),
},
[KSMBD_EVENT_SHARE_CONFIG_RESPONSE] = {
.len = sizeof(struct ksmbd_share_config_response),
},
[KSMBD_EVENT_TREE_CONNECT_REQUEST] = {
.len = sizeof(struct ksmbd_tree_connect_request),
},
[KSMBD_EVENT_TREE_CONNECT_RESPONSE] = {
.len = sizeof(struct ksmbd_tree_connect_response),
},
[KSMBD_EVENT_TREE_DISCONNECT_REQUEST] = {
.len = sizeof(struct ksmbd_tree_disconnect_request),
},
[KSMBD_EVENT_LOGOUT_REQUEST] = {
.len = sizeof(struct ksmbd_logout_request),
},
[KSMBD_EVENT_RPC_REQUEST] = {
},
[KSMBD_EVENT_RPC_RESPONSE] = {
},
[KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST] = {
},
[KSMBD_EVENT_SPNEGO_AUTHEN_RESPONSE] = {
},
[KSMBD_EVENT_LOGIN_REQUEST_EXT] = {
.len = sizeof(struct ksmbd_login_request),
},
[KSMBD_EVENT_LOGIN_RESPONSE_EXT] = {
.len = sizeof(struct ksmbd_login_response_ext),
},
};
static struct genl_ops ksmbd_genl_ops[] = {
{
.cmd = KSMBD_EVENT_UNSPEC,
.doit = handle_unsupported_event,
},
{
.cmd = KSMBD_EVENT_HEARTBEAT_REQUEST,
.doit = handle_unsupported_event,
},
{
.cmd = KSMBD_EVENT_STARTING_UP,
.doit = handle_startup_event,
},
{
Annotation
- Immediate include surface: `linux/jhash.h`, `linux/slab.h`, `linux/rwsem.h`, `linux/mutex.h`, `linux/wait.h`, `linux/hashtable.h`, `net/net_namespace.h`, `net/genetlink.h`.
- Detected declarations: `struct ksmbd_ipc_msg`, `struct ipc_msg_table_entry`, `function ksmbd_ipc_validate_version`, `function ksmbd_nl_init_fixup`, `function rpc_context_flags`, `function ipc_update_last_active`, `function ipc_msg_free`, `function ipc_msg_handle_free`, `function handle_response`, `function ipc_server_config_on_startup`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.