---
name: "skb_share_check"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/skb_share_check"
---

# skb\_share\_check(9)

check if buffer is shared and if so clone it

## 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

*pri*

priority for memory allocation

## DESCRIPTION

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. When being called from interrupt status or with spinlocks held pri must be GFP\_ATOMIC.

NULL is returned on a memory allocation failure.

## COPYRIGHT
