scsi: libcxgbi: use GFP_ATOMIC in cxgbi_conn_alloc_pdu()

For mgmt cmds ->alloc_pdu() can be called from atomic context so use
GFP_ATOMIC instead of GFP_KERNEL.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Varun Prakash 2018-01-04 21:04:17 +05:30 committed by Martin K. Petersen
parent affc67788f
commit dd04b0f3b6

View File

@ -1914,7 +1914,7 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 opcode)
if (task->sc) {
task->hdr = (struct iscsi_hdr *)tdata->skb->data;
} else {
task->hdr = kzalloc(SKB_TX_ISCSI_PDU_HEADER_MAX, GFP_KERNEL);
task->hdr = kzalloc(SKB_TX_ISCSI_PDU_HEADER_MAX, GFP_ATOMIC);
if (!task->hdr) {
__kfree_skb(tdata->skb);
tdata->skb = NULL;