---
name: "sk_clone_lock"
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/sk_clone_lock"
---

# sk\_clone\_lock(9)

clone a socket, and lock its clone

## NAME

sk\_clone\_lock - clone a socket, and lock its clone

## SYNOPSIS

**struct sock \* sk\_clone\_lock(const struct sock \*** *sk***, const gfp\_t** *priority***);**

## ARGUMENTS

*sk*

the socket to clone

*priority*

for allocation (**GFP\_KERNEL**, **GFP\_ATOMIC**, etc)

## DESCRIPTION

Caller must unlock socket even in error path (bh\_unlock\_sock(newsk))

## COPYRIGHT
