aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 13:57:07 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-01 12:02:05 -0400
commit239a7dc2fea4d079bc3090b5514497a5ced400d3 (patch)
treeee4f5492a3f7c692db64d4f738877cbe09a2de14 /drivers/scsi/scsi_transport_iscsi.c
parent5c9cfeddbb49954b459fda91bf5479f5a0a4e409 (diff)
[SCSI] iscsi_transport: Check iscsi interface skb allocation return value
Let's not oops when we cannot allocate a skb! Add a check for if alloc_skb fails. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index caf1836bbeca..4fbd8e1a0695 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -609,12 +609,10 @@ iscsi_if_send_reply(int pid, int seq, int type, int done, int multi,
609 int t = done ? NLMSG_DONE : type; 609 int t = done ? NLMSG_DONE : type;
610 610
611 skb = alloc_skb(len, GFP_ATOMIC); 611 skb = alloc_skb(len, GFP_ATOMIC);
612 /* 612 if (!skb) {
613 * FIXME: 613 printk(KERN_ERR "Could not allocate skb to send reply.\n");
614 * user is supposed to react on iferror == -ENOMEM; 614 return -ENOMEM;
615 * see iscsi_if_rx(). 615 }
616 */
617 BUG_ON(!skb);
618 616
619 nlh = __nlmsg_put(skb, pid, seq, t, (len - sizeof(*nlh)), 0); 617 nlh = __nlmsg_put(skb, pid, seq, t, (len - sizeof(*nlh)), 0);
620 nlh->nlmsg_flags = flags; 618 nlh->nlmsg_flags = flags;