net/handshake/request.c
Source file repositories/reference/linux-study-clean/net/handshake/request.c
File Facts
- System
- Linux kernel
- Corpus path
net/handshake/request.c- Extension
.c- Size
- 10289 bytes
- Lines
- 387
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/socket.hlinux/kernel.hlinux/module.hlinux/skbuff.hlinux/inet.hlinux/file.hlinux/rhashtable.hnet/sock.hnet/genetlink.hnet/netns/generic.hkunit/visibility.huapi/linux/handshake.hhandshake.htrace/events/handshake.h
Detected Declarations
function handshake_req_hash_initfunction handshake_req_hash_destroyfunction handshake_req_hash_addfunction handshake_req_destroyfunction handshake_sk_destructfunction __add_pending_lockedfunction __remove_pending_lockedfunction remove_pendingfunction FD_PREPAREfunction handshake_req_submitfunction handshake_completefunction handshake_req_cancelexport handshake_req_allocexport handshake_req_privateexport handshake_req_submitexport handshake_req_cancel
Annotated Snippet
if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {
trace_handshake_cancel_busy(net, req, sk);
return false;
}
goto out_true;
}
if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {
/* Request already completed */
trace_handshake_cancel_busy(net, req, sk);
return false;
}
out_true:
trace_handshake_cancel(net, req, sk);
fput(req->hr_file);
return true;
}
EXPORT_SYMBOL(handshake_req_cancel);
Annotation
- Immediate include surface: `linux/types.h`, `linux/socket.h`, `linux/kernel.h`, `linux/module.h`, `linux/skbuff.h`, `linux/inet.h`, `linux/file.h`, `linux/rhashtable.h`.
- Detected declarations: `function handshake_req_hash_init`, `function handshake_req_hash_destroy`, `function handshake_req_hash_add`, `function handshake_req_destroy`, `function handshake_sk_destruct`, `function __add_pending_locked`, `function __remove_pending_locked`, `function remove_pending`, `function FD_PREPARE`, `function handshake_req_submit`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration 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.