Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2010-02-08 11:32:42 +0100
committerHannes Reinecke <hare@suse.de>2010-02-08 11:32:42 +0100
commit99d771e98cdb52d221f3af259b0273382c566da0 (patch)
tree5223329c99b033dd4c53fec47149572bf800f565
parentce25ae60cc11bb829e60a97386e8125e2c6e5a0e (diff)
- patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections:rpm-2.6.32.7-0.2
fcoe: Only rmmod fcoe.ko if there are no active connections (bnc#577529). - patches.suse/libfc-call-ddp-setup-for-FCP-reads-only: libfc: call ddp setup for only FCP reads to avoid accessing junk fsp pointer (bnc#577529). - patches.suse/libfc-don-t-assume-response-request-present: libfc: Don't assume response request present. (bnc#577529). - patches.suse/libfc-fix-e_d_tov-ns-ms-scaling: libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response (bnc#577529). - patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period: libfcoe: Send port LKA every FIP_VN_KA_PERIOD secs. (bnc#577529).
-rw-r--r--kernel-source.changes17
-rw-r--r--patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections87
-rw-r--r--patches.suse/libfc-call-ddp-setup-for-FCP-reads-only54
-rw-r--r--patches.suse/libfc-don-t-assume-response-request-present33
-rw-r--r--patches.suse/libfc-fix-e_d_tov-ns-ms-scaling33
-rw-r--r--patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period34
-rw-r--r--series.conf5
7 files changed, 263 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 2f55961f30..dd3aa076c0 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,21 @@
-------------------------------------------------------------------
+Mon Feb 8 11:32:35 CET 2010 - hare@suse.de
+
+- patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections:
+ fcoe: Only rmmod fcoe.ko if there are no active connections
+ (bnc#577529).
+- patches.suse/libfc-call-ddp-setup-for-FCP-reads-only: libfc:
+ call ddp setup for only FCP reads to avoid accessing junk fsp
+ pointer (bnc#577529).
+- patches.suse/libfc-don-t-assume-response-request-present:
+ libfc: Don't assume response request present. (bnc#577529).
+- patches.suse/libfc-fix-e_d_tov-ns-ms-scaling: libfc: Fix
+ e_d_tov ns -> ms scaling factor in PLOGI response (bnc#577529).
+- patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period:
+ libfcoe: Send port LKA every FIP_VN_KA_PERIOD
+ secs. (bnc#577529).
+
+-------------------------------------------------------------------
Mon Feb 8 10:43:02 CET 2010 - jbeulich@novell.com
- Update Xen patches (bnc#575199).
diff --git a/patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections b/patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections
new file mode 100644
index 0000000000..1bfdb0f250
--- /dev/null
+++ b/patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections
@@ -0,0 +1,87 @@
+Subject: fcoe: Only rmmod fcoe.ko if there are no active connections
+From: Rob Love <robert.w.love@intel.com>
+References: bnc#577529
+Patch-Mainline: 2.6.33
+
+Currently we're gracefully tearing down each active connection
+when fcoe.ko is removed. We shouldn't allow the user to destroy
+connections by removing the module. We should force the user to
+destroy each connection and then the module can be removed.
+
+This patch makes it so a refrerence count on the module is taken
+each time a fcoe_interface is created. The reference count
+is dropped when the fcoe_interface is destroyed. This makes it
+so that module_exit() doesn't get called unless all fcoe_interfaces
+have been destroyed.
+
+This patch leaves the removal of interfaces in the module_exit
+routine so that if the user does a 'rmmod -f' we'll clean everything
+up before removing the module.
+
+The module_put line was put before the out_putdev goto line because
+we should only be decrementing the reference count if a
+fcoe_interface is actually destroyed. If we can't find the netdev
+or the fcoe_interface then it's assumed that something else has
+destroyed the fcoe_interface and it would have decremented the
+reference count at that time.
+
+Signed-off-by: Robert Love <robert.w.love@intel.com>
+Acked-by: Hannes Reinecke <hare@suse.de>
+---
+
+ drivers/scsi/fcoe/fcoe.c | 18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
+
+
+diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
+index 10be9f3..2f47ae7 100644
+--- a/drivers/scsi/fcoe/fcoe.c
++++ b/drivers/scsi/fcoe/fcoe.c
+@@ -2009,6 +2009,8 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp)
+ fcoe_interface_cleanup(fcoe);
+ rtnl_unlock();
+ fcoe_if_destroy(fcoe->ctlr.lp);
++ module_put(THIS_MODULE);
++
+ out_putdev:
+ dev_put(netdev);
+ out_nodev:
+@@ -2059,6 +2061,11 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp)
+ }
+ #endif
+
++ if (!try_module_get(THIS_MODULE)) {
++ rc = -EINVAL;
++ goto out_nomod;
++ }
++
+ rtnl_lock();
+ netdev = fcoe_if_to_netdev(buffer);
+ if (!netdev) {
+@@ -2099,17 +2106,24 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp)
+ if (!fcoe_link_ok(lport))
+ fcoe_ctlr_link_up(&fcoe->ctlr);
+
+- rc = 0;
+-out_free:
+ /*
+ * Release from init in fcoe_interface_create(), on success lport
+ * should be holding a reference taken in fcoe_if_create().
+ */
+ fcoe_interface_put(fcoe);
++ dev_put(netdev);
++ rtnl_unlock();
++ mutex_unlock(&fcoe_config_mutex);
++
++ return 0;
++out_free:
++ fcoe_interface_put(fcoe);
+ out_putdev:
+ dev_put(netdev);
+ out_nodev:
+ rtnl_unlock();
++ module_put(THIS_MODULE);
++out_nomod:
+ mutex_unlock(&fcoe_config_mutex);
+ return rc;
+ }
diff --git a/patches.suse/libfc-call-ddp-setup-for-FCP-reads-only b/patches.suse/libfc-call-ddp-setup-for-FCP-reads-only
new file mode 100644
index 0000000000..04692fffa1
--- /dev/null
+++ b/patches.suse/libfc-call-ddp-setup-for-FCP-reads-only
@@ -0,0 +1,54 @@
+Subject: libfc: call ddp setup for only FCP reads to avoid accessing junk fsp pointer
+From: Vasu Dev <vasu.dev@intel.com>
+References: bnc#577529
+Patch-Mainline: 2.6.33
+
+Adds check to call fc_fcp_ddp_setup for only FCP read cmds to avoid
+accessing junk fsp pointer at least in ESX since non FCP frame had
+junk fsp value, though fsp is implicitly initialized to null
+by __alloc_skb but with this patch no more relying on fsp
+initialized to null value and hitting junk fsp ptr access.
+
+Removes fsp pointer checking in fc_fcp_ddp_setup as this is not
+needed any more since its only caller for FCP read will always
+have a valid fsp.
+
+Reported by: Frank Zhang <frank_1.zhang@intel.com>
+Reported by: Rob Love <robert.w.love@intel.com>
+Signed-off-by: Vasu Dev <vasu.dev@intel.com>
+Signed-off-by: Robert Love <robert.w.love@intel.com>
+Acked-by: Hannes Reinecke <hare@suse.de>
+---
+
+ drivers/scsi/libfc/fc_exch.c | 2 +-
+ drivers/scsi/libfc/fc_fcp.c | 3 ---
+ 2 files changed, 1 insertions(+), 4 deletions(-)
+
+
+diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
+index 19d711c..7f43647 100644
+--- a/drivers/scsi/libfc/fc_exch.c
++++ b/drivers/scsi/libfc/fc_exch.c
+@@ -1890,7 +1890,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport,
+ fc_exch_setup_hdr(ep, fp, ep->f_ctl);
+ sp->cnt++;
+
+- if (ep->xid <= lport->lro_xid)
++ if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD)
+ fc_fcp_ddp_setup(fr_fsp(fp), ep->xid);
+
+ if (unlikely(lport->tt.frame_send(lport, fp)))
+diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
+index 881d5df..6fde2fa 100644
+--- a/drivers/scsi/libfc/fc_fcp.c
++++ b/drivers/scsi/libfc/fc_fcp.c
+@@ -298,9 +298,6 @@ void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid)
+ {
+ struct fc_lport *lport;
+
+- if (!fsp)
+- return;
+-
+ lport = fsp->lp;
+ if ((fsp->req_flags & FC_SRB_READ) &&
+ (lport->lro_enabled) && (lport->tt.ddp_setup)) {
diff --git a/patches.suse/libfc-don-t-assume-response-request-present b/patches.suse/libfc-don-t-assume-response-request-present
new file mode 100644
index 0000000000..807d847aa7
--- /dev/null
+++ b/patches.suse/libfc-don-t-assume-response-request-present
@@ -0,0 +1,33 @@
+Subject: libfc: Don't assume response request present.
+From: Hugh Daschbach <hdasch@broadcom.com>
+References: bnc#577529
+Patch-Mainline: 2.6.33
+
+Fix NULL pointer dereference crash occurs in fc_lport_bsg_request()
+for bsg requests that do not contain a response request.
+Specifically, FC_BSG_HST_ADD_RPORT and FC_BSG_HST_DEL_RPORT bsg
+requests are not guaranteed to include a response request.
+
+Signed-off-by: Hugh Daschbach <hdasch@broadcom.com>
+Signed-off-by: Robert Love <robert.w.love@intel.com>
+Acked-by: Hannes Reinecke <hare@suse.de>
+---
+
+ drivers/scsi/libfc/fc_lport.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+
+diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
+index 0b16502..7ec8ce7 100644
+--- a/drivers/scsi/libfc/fc_lport.c
++++ b/drivers/scsi/libfc/fc_lport.c
+@@ -1800,7 +1800,8 @@ int fc_lport_bsg_request(struct fc_bsg_job *job)
+ u32 did;
+
+ job->reply->reply_payload_rcv_len = 0;
+- rsp->resid_len = job->reply_payload.payload_len;
++ if (rsp)
++ rsp->resid_len = job->reply_payload.payload_len;
+
+ mutex_lock(&lport->lp_mutex);
+
diff --git a/patches.suse/libfc-fix-e_d_tov-ns-ms-scaling b/patches.suse/libfc-fix-e_d_tov-ns-ms-scaling
new file mode 100644
index 0000000000..7595a83685
--- /dev/null
+++ b/patches.suse/libfc-fix-e_d_tov-ns-ms-scaling
@@ -0,0 +1,33 @@
+Subject: libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response
+From: Hugh Daschbach <hdasch@broadcom.com>
+References: bnc#577529
+Patch-Mainline: 2.6.33
+
+Both PLOGI and RTV response processing conditionally scale e_d_tov,
+but use different scaling factors. The scaling factor is correct in
+RTV response processing. Bring PLOGI e_d_tov scaling in line with RTV
+common service parameter inspection.
+
+Signed-off-by: Hugh Daschbach <hdasch@broadcom.com>
+Acked-by: Joe Eykholt <jeykholt@cisco.com>
+Signed-off-by: Robert Love <robert.w.love@intel.com>
+Acked-by: Hannes Reinecke <hare@suse.de>
+---
+
+ drivers/scsi/libfc/fc_rport.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+
+diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
+index 0230052..97923bb 100644
+--- a/drivers/scsi/libfc/fc_rport.c
++++ b/drivers/scsi/libfc/fc_rport.c
+@@ -623,7 +623,7 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp,
+
+ tov = ntohl(plp->fl_csp.sp_e_d_tov);
+ if (ntohs(plp->fl_csp.sp_features) & FC_SP_FT_EDTR)
+- tov /= 1000;
++ tov /= 1000000;
+ if (tov > rdata->e_d_tov)
+ rdata->e_d_tov = tov;
+ csp_seq = ntohs(plp->fl_csp.sp_tot_seq);
diff --git a/patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period b/patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period
new file mode 100644
index 0000000000..ab533a0de8
--- /dev/null
+++ b/patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period
@@ -0,0 +1,34 @@
+Subject: libfcoe: Send port LKA every FIP_VN_KA_PERIOD secs.
+From: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
+References: bnc#577529
+Patch-Mainline: 2.6.33
+
+libfcoe module doesnt send port keep alive every
+FIP_VN_KA_PERIOD due to improper assignment of timeout value.
+Update the port_ka_time appropriately by incrementing it by
+FIP_VN_KA_PERIOD in fcoe_ctlr_timeout(), so that the link_work
+is scheduled to send the port LKA.
+
+Signed-off-by: Bhanu Gollapudi <bprakash@broadcom.com>
+Acked-by: Joe Eykholt <jeykholt@cisco.com>
+Signed-off-by: Robert Love <robert.w.love@intel.com>
+Acked-by: Hannes Reinecke <hare@suse.de>
+---
+
+ drivers/scsi/fcoe/libfcoe.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+
+diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
+index 9823291..511cb6b 100644
+--- a/drivers/scsi/fcoe/libfcoe.c
++++ b/drivers/scsi/fcoe/libfcoe.c
+@@ -1187,7 +1187,7 @@ static void fcoe_ctlr_timeout(unsigned long arg)
+ next_timer = fip->ctlr_ka_time;
+
+ if (time_after_eq(jiffies, fip->port_ka_time)) {
+- fip->port_ka_time += jiffies +
++ fip->port_ka_time = jiffies +
+ msecs_to_jiffies(FIP_VN_KA_PERIOD);
+ fip->send_port_ka = 1;
+ }
diff --git a/series.conf b/series.conf
index 2b39300ad2..78cda32a32 100644
--- a/series.conf
+++ b/series.conf
@@ -861,6 +861,11 @@
patches.suse/libfc-fix-an-issue-of-pending-exch-es-after-i-f-destroyed-or-rmmod-fcoe.patch
patches.suse/libfcoe-do-not-pad-fip-keep-alive-to-full-frame-size.patch
patches.suse/libfc-fcoe-increase-els-and-ct-timeouts.patch
+ patches.suse/libfc-call-ddp-setup-for-FCP-reads-only
+ patches.suse/libfc-fix-e_d_tov-ns-ms-scaling
+ patches.suse/libfc-don-t-assume-response-request-present
+ patches.suse/libfcoe-send-port-lka-every-fip_vn_ka_period
+ patches.suse/fcoe-only-rmmod-fcoe-ko-if-no-active-connections
# qlge patches from 2.6.33 bnc#560420, fate#307130
patches.drivers/qlge-0001-Use-the-instance-of-net_device_stats-from-net_.patch