skb_share_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… skb_share_check(9) β€” Kernel API Manual glow-up πŸ’…

okay so bestie, welcome to the skb_share_check(9) page from the Kernel API Manual β€” we're checking if a buffer is shared and cloning it if so, and yes it's giving iconic kernel-core energy. 🫢✨

🌸 NAME 🌸

skb_share_check β€” check if buffer is shared and if so clone it. πŸ’–

✨ SYNOPSIS ✨

struct sk_buff * skb_share_check (struct sk_buff *skb , gfp_t pri );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” buffer to check. literally the buffer you're putting under the microscope. πŸ”
  • pri β€” priority for memory allocation. the allocation-priority vibe you're handing over. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: if the buffer is shared, the buffer is cloned and the old copy drops a reference. a new clone with a single reference is returned. if the buffer is not shared, the original buffer is returned β€” no clone, no drama. 😌

when you're calling this from interrupt status or with spinlocks held, pri must be GFP_ATOMIC. like, mandatory, no cap. πŸ”₯

and if memory allocation fails? NULL is returned. that's the whole thing, bestie. 😭

πŸ”₯ SEE ALSO πŸ”₯

the cross-ref squad is huge β€” like, syllabus week huge β€” but every single one is here, no skips, no edits. 🫢


mwah πŸ’‹ that's the whole page, bestie. source/version + date tea: ./include/linux, October 2026, and the page is skb_share_check(9). periodt. πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from