---
name: "skb_copy_ubufs"
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_copy_ubufs"
---

# skb\_copy\_ubufs(9)

copy userspace skb frags buffers to kernel

## NAME

skb\_copy\_ubufs - copy userspace skb frags buffers to kernel

## SYNOPSIS

**int skb\_copy\_ubufs(struct sk\_buff \*** *skb***, gfp\_t** *gfp\_mask***);**

## ARGUMENTS

*skb*

the skb to modify

*gfp\_mask*

allocation priority

## DESCRIPTION

This must be called on SKBTX\_DEV\_ZEROCOPY skb. It will copy all frags into kernel and drop the reference to userspace pages.

If this function is called from an interrupt **gfp\_mask** must be **GFP\_ATOMIC**.

Returns 0 on success or a negative error code on failure to allocate kernel memory to copy to.

## COPYRIGHT
