---
name: "skb_kill_datagram"
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_kill_datagram"
---

# skb\_kill\_datagram(9)

Free a datagram skbuff forcibly

## NAME

skb\_kill\_datagram - Free a datagram skbuff forcibly

## SYNOPSIS

**int skb\_kill\_datagram(struct sock \*** *sk***, struct sk\_buff \*** *skb***, unsigned int** *flags***);**

## ARGUMENTS

*sk*

socket

*skb*

datagram skbuff

*flags*

MSG\_ flags

## DESCRIPTION

This function frees a datagram skbuff that was received by skb\_recv\_datagram. The flags argument must match the one used for skb\_recv\_datagram.

If the MSG\_PEEK flag is set, and the packet is still on the receive queue of the socket, it will be taken off the queue before it is freed.

This function currently only disables BH when acquiring the sk\_receive\_queue lock. Therefore it must not be used in a context where that lock is acquired in an IRQ context.

It returns 0 if the packet was removed by us.

## COPYRIGHT
