---
name: "scsi_allocate_command"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/scsi_allocate_command"
---

# scsi\_allocate\_command(9)

get a fully allocated SCSI command

## NAME

scsi\_allocate\_command - get a fully allocated SCSI command

## SYNOPSIS

**struct scsi\_cmnd \* scsi\_allocate\_command(gfp\_t** *gfp\_mask***);**

## ARGUMENTS

*gfp\_mask*

allocation mask

## DESCRIPTION

This function is for use outside of the normal host based pools. It allocates the relevant command and takes an additional reference on the pool it used. This function \*must\* be paired with scsi\_free\_command which also has the identical mask, otherwise the free pool counts will eventually go wrong and you'll trigger a bug.

This function should \*only\* be used by drivers that need a static command allocation at start of day for internal functions.

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
