Skip to content

Commit

Permalink
iscsi: Use GFP_ATOMIC in iscsi_offload_mesg().
Browse files Browse the repository at this point in the history
Changing to GFP_ATOMIC because the only caller in cnic/bnx2i may
be calling this function while holding spin_lock.

This problem was discovered by Mike Christie.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 30, 2009
1 parent ca7daea commit a541f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/scsi_transport_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost,
struct iscsi_uevent *ev;
int len = NLMSG_SPACE(sizeof(*ev) + data_size);

skb = alloc_skb(len, GFP_NOIO);
skb = alloc_skb(len, GFP_ATOMIC);
if (!skb) {
printk(KERN_ERR "can not deliver iscsi offload message:OOM\n");
return -ENOMEM;
Expand All @@ -1012,7 +1012,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost,

memcpy((char *)ev + sizeof(*ev), data, data_size);

return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_NOIO);
return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_ATOMIC);
}
EXPORT_SYMBOL_GPL(iscsi_offload_mesg);

Expand Down

0 comments on commit a541f84

Please sign in to comment.