Skip to content

Commit

Permalink
scsi: libcxgbi: use GFP_ATOMIC in cxgbi_conn_alloc_pdu()
Browse files Browse the repository at this point in the history
For mgmt cmds ->alloc_pdu() can be called from atomic context so use
GFP_ATOMIC instead of GFP_KERNEL.

Signed-off-by: Varun Prakash <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
Varun Prakash authored and martinkpetersen committed Jan 9, 2018
1 parent affc677 commit dd04b0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/cxgbi/libcxgbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd04b0f

Please sign in to comment.