diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-07-24 16:47:34 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-07-28 12:49:20 -0400 |
commit | 9aaa2b4621280b6de1ecfb6dd7cd5cbe59fd1264 (patch) | |
tree | 2532d6190f4267bb5233683c5908ef38e1934d12 /drivers/scsi | |
parent | 63f75cc8a7e6ce453e38a7b90cdcae83d63f1ea7 (diff) |
[SCSI] iscsi bugfixes: dont use GFP_KERNEL for sending errors
iscsi_tcp can send error events from soft irq context so we
cannot use GFP_KERNEL.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 7b9e8fa1a4e0..30a47c133091 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -634,13 +634,13 @@ mempool_zone_get_skb(struct mempool_zone *zone) | |||
634 | } | 634 | } |
635 | 635 | ||
636 | static int | 636 | static int |
637 | iscsi_broadcast_skb(struct mempool_zone *zone, struct sk_buff *skb) | 637 | iscsi_broadcast_skb(struct mempool_zone *zone, struct sk_buff *skb, gfp_t gfp) |
638 | { | 638 | { |
639 | unsigned long flags; | 639 | unsigned long flags; |
640 | int rc; | 640 | int rc; |
641 | 641 | ||
642 | skb_get(skb); | 642 | skb_get(skb); |
643 | rc = netlink_broadcast(nls, skb, 0, 1, GFP_KERNEL); | 643 | rc = netlink_broadcast(nls, skb, 0, 1, gfp); |
644 | if (rc < 0) { | 644 | if (rc < 0) { |
645 | mempool_free(skb, zone->pool); | 645 | mempool_free(skb, zone->pool); |
646 | printk(KERN_ERR "iscsi: can not broadcast skb (%d)\n", rc); | 646 | printk(KERN_ERR "iscsi: can not broadcast skb (%d)\n", rc); |
@@ -749,7 +749,7 @@ void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) | |||
749 | ev->r.connerror.cid = conn->cid; | 749 | ev->r.connerror.cid = conn->cid; |
750 | ev->r.connerror.sid = iscsi_conn_get_sid(conn); | 750 | ev->r.connerror.sid = iscsi_conn_get_sid(conn); |
751 | 751 | ||
752 | iscsi_broadcast_skb(conn->z_error, skb); | 752 | iscsi_broadcast_skb(conn->z_error, skb, GFP_ATOMIC); |
753 | 753 | ||
754 | dev_printk(KERN_INFO, &conn->dev, "iscsi: detected conn error (%d)\n", | 754 | dev_printk(KERN_INFO, &conn->dev, "iscsi: detected conn error (%d)\n", |
755 | error); | 755 | error); |
@@ -895,7 +895,7 @@ int iscsi_if_destroy_session_done(struct iscsi_cls_conn *conn) | |||
895 | * this will occur if the daemon is not up, so we just warn | 895 | * this will occur if the daemon is not up, so we just warn |
896 | * the user and when the daemon is restarted it will handle it | 896 | * the user and when the daemon is restarted it will handle it |
897 | */ | 897 | */ |
898 | rc = iscsi_broadcast_skb(conn->z_pdu, skb); | 898 | rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); |
899 | if (rc < 0) | 899 | if (rc < 0) |
900 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " | 900 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " |
901 | "session destruction event. Check iscsi daemon\n"); | 901 | "session destruction event. Check iscsi daemon\n"); |
@@ -958,7 +958,7 @@ int iscsi_if_create_session_done(struct iscsi_cls_conn *conn) | |||
958 | * this will occur if the daemon is not up, so we just warn | 958 | * this will occur if the daemon is not up, so we just warn |
959 | * the user and when the daemon is restarted it will handle it | 959 | * the user and when the daemon is restarted it will handle it |
960 | */ | 960 | */ |
961 | rc = iscsi_broadcast_skb(conn->z_pdu, skb); | 961 | rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); |
962 | if (rc < 0) | 962 | if (rc < 0) |
963 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " | 963 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " |
964 | "session creation event. Check iscsi daemon\n"); | 964 | "session creation event. Check iscsi daemon\n"); |