Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8addf0c7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
  The fixes are mostly correct value initialisations, avoiding NULL
  derefs and some uninitialised pointer avoidance.

  All the patches have been incubated in -next for a few days.  The
  final patch (use the scsi data buffer length to extract transfer size)
  has been rebased to add a cc to stable, but only the commit message
  has changed"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] use the scsi data buffer length to extract transfer size
  virtio-scsi: fix various bad behavior on aborted requests
  virtio-scsi: avoid cancelling uninitialized work items
  ibmvscsi: Add memory barriers for send / receive
  ibmvscsi: Abort init sequence during error recovery
  qla2xxx: Fix sparse warning in qla_target.c.
  bnx2fc: Improve stats update mechanism
  bnx2fc: do not scan uninitialized lists in case of error.
  fc: ensure scan_work isn't active when freeing fc_rport
  pm8001: Fix potential null pointer dereference and memory leak.
  MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
  be2iscsi: remove potential junk pointer free
  be2iscsi: add an missing goto in error path
  scsi_error: set DID_TIME_OUT correctly
  scsi_error: fix invalid setting of host byte
parents 110e4308 77ae174d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -5530,10 +5530,11 @@ S: Maintained
F:	arch/arm/mach-lpc32xx/

LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
M:	Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
M:	Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
M:	support@lsi.com
L:	DL-MPTFusionLinux@lsi.com
M:	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
M:	Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
M:	Sreekanth Reddy <sreekanth.reddy@avagotech.com>
M:	Abhijit Mahajan <abhijit.mahajan@avagotech.com>
L:	MPT-FusionLinux.pdl@avagotech.com
L:	linux-scsi@vger.kernel.org
W:	http://www.lsilogic.com/support
S:	Supported
+2 −0
Original line number Diff line number Diff line
@@ -4198,6 +4198,8 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
		kfree(phba->ep_array);
		phba->ep_array = NULL;
		ret = -ENOMEM;

		goto free_memory;
	}

	for (i = 0; i < phba->params.cxns_per_ctrl; i++) {
+1 −3
Original line number Diff line number Diff line
@@ -1008,10 +1008,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
		BE2_IPV6 : BE2_IPV4 ;

	rc = mgmt_get_if_info(phba, ip_type, &if_info);
	if (rc) {
		kfree(if_info);
	if (rc)
		return rc;
	}

	if (boot_proto == ISCSI_BOOTPROTO_DHCP) {
		if (if_info->dhcp_state) {
+4 −12
Original line number Diff line number Diff line
@@ -516,23 +516,17 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
	skb_pull(skb, sizeof(struct fcoe_hdr));
	fr_len = skb->len - sizeof(struct fcoe_crc_eof);

	stats = per_cpu_ptr(lport->stats, get_cpu());
	stats->RxFrames++;
	stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;

	fp = (struct fc_frame *)skb;
	fc_frame_init(fp);
	fr_dev(fp) = lport;
	fr_sof(fp) = hp->fcoe_sof;
	if (skb_copy_bits(skb, fr_len, &crc_eof, sizeof(crc_eof))) {
		put_cpu();
		kfree_skb(skb);
		return;
	}
	fr_eof(fp) = crc_eof.fcoe_eof;
	fr_crc(fp) = crc_eof.fcoe_crc32;
	if (pskb_trim(skb, fr_len)) {
		put_cpu();
		kfree_skb(skb);
		return;
	}
@@ -544,7 +538,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
		port = lport_priv(vn_port);
		if (!ether_addr_equal(port->data_src_addr, dest_mac)) {
			BNX2FC_HBA_DBG(lport, "fpma mismatch\n");
			put_cpu();
			kfree_skb(skb);
			return;
		}
@@ -552,7 +545,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
	if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA &&
	    fh->fh_type == FC_TYPE_FCP) {
		/* Drop FCP data. We dont this in L2 path */
		put_cpu();
		kfree_skb(skb);
		return;
	}
@@ -562,7 +554,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
		case ELS_LOGO:
			if (ntoh24(fh->fh_s_id) == FC_FID_FLOGI) {
				/* drop non-FIP LOGO */
				put_cpu();
				kfree_skb(skb);
				return;
			}
@@ -572,22 +563,23 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)

	if (fh->fh_r_ctl == FC_RCTL_BA_ABTS) {
		/* Drop incoming ABTS */
		put_cpu();
		kfree_skb(skb);
		return;
	}

	stats = per_cpu_ptr(lport->stats, smp_processor_id());
	stats->RxFrames++;
	stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;

	if (le32_to_cpu(fr_crc(fp)) !=
			~crc32(~0, skb->data, fr_len)) {
		if (stats->InvalidCRCCount < 5)
			printk(KERN_WARNING PFX "dropping frame with "
			       "CRC error\n");
		stats->InvalidCRCCount++;
		put_cpu();
		kfree_skb(skb);
		return;
	}
	put_cpu();
	fc_exch_recv(lport, fp);
}

+2 −0
Original line number Diff line number Diff line
@@ -282,6 +282,8 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba)
				       arr_sz, GFP_KERNEL);
	if (!cmgr->free_list_lock) {
		printk(KERN_ERR PFX "failed to alloc free_list_lock\n");
		kfree(cmgr->free_list);
		cmgr->free_list = NULL;
		goto mem_err;
	}

Loading