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

Commit 66dbbd72 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "The most important one is the bfa fix because it's easy to oops the
  kernel with this driver (this includes the commit that corrects the
  compiler warning in the original), a regression in the new timespec
  conversion in aacraid and a regression in the Fibre Channel ELS
  handling patch.

  The other three are a theoretical problem with termination in the
  vendor/host matching code and a use after free in lpfc.

  The additional patches are a fix for an I/O hang in the mq code under
  certain circumstances and a rare oops in some debugging code"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: core: Fix a scsi_show_rq() NULL pointer dereference
  scsi: MAINTAINERS: change FCoE list to linux-scsi
  scsi: libsas: fix length error in sas_smp_handler()
  scsi: bfa: fix type conversion warning
  scsi: core: run queue if SCSI device queue isn't ready and queue is idle
  scsi: scsi_devinfo: cleanly zero-pad devinfo strings
  scsi: scsi_devinfo: handle non-terminated strings
  scsi: bfa: fix access to bfad_im_port_s
  scsi: aacraid: address UBSAN warning regression
  scsi: libfc: fix ELS request handling
  scsi: lpfc: Use after free in lpfc_rq_buf_free()
parents 07a20ed1 14e3062f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5431,7 +5431,7 @@ F: drivers/media/tuners/fc2580*

FCOE SUBSYSTEM (libfc, libfcoe, fcoe)
M:	Johannes Thumshirn <jth@kernel.org>
L:	fcoe-devel@open-fcoe.org
L:	linux-scsi@vger.kernel.org
W:	www.Open-FCoE.org
S:	Supported
F:	drivers/scsi/libfc/
+6 −2
Original line number Diff line number Diff line
@@ -2482,8 +2482,8 @@ int aac_command_thread(void *data)
			/* Synchronize our watches */
			if (((NSEC_PER_SEC - (NSEC_PER_SEC / HZ)) > now.tv_nsec)
			 && (now.tv_nsec > (NSEC_PER_SEC / HZ)))
				difference = (((NSEC_PER_SEC - now.tv_nsec) * HZ)
				  + NSEC_PER_SEC / 2) / NSEC_PER_SEC;
				difference = HZ + HZ / 2 -
					     now.tv_nsec / (NSEC_PER_SEC / HZ);
			else {
				if (now.tv_nsec > NSEC_PER_SEC / 2)
					++now.tv_sec;
@@ -2507,6 +2507,10 @@ int aac_command_thread(void *data)
		if (kthread_should_stop())
			break;

		/*
		 * we probably want usleep_range() here instead of the
		 * jiffies computation
		 */
		schedule_timeout(difference);

		if (kthread_should_stop())
+4 −2
Original line number Diff line number Diff line
@@ -3135,7 +3135,8 @@ bfad_im_bsg_vendor_request(struct bsg_job *job)
	struct fc_bsg_request *bsg_request = job->request;
	struct fc_bsg_reply *bsg_reply = job->reply;
	uint32_t vendor_cmd = bsg_request->rqst_data.h_vendor.vendor_cmd[0];
	struct bfad_im_port_s *im_port = shost_priv(fc_bsg_to_shost(job));
	struct Scsi_Host *shost = fc_bsg_to_shost(job);
	struct bfad_im_port_s *im_port = bfad_get_im_port(shost);
	struct bfad_s *bfad = im_port->bfad;
	void *payload_kbuf;
	int rc = -EINVAL;
@@ -3350,7 +3351,8 @@ int
bfad_im_bsg_els_ct_request(struct bsg_job *job)
{
	struct bfa_bsg_data *bsg_data;
	struct bfad_im_port_s *im_port = shost_priv(fc_bsg_to_shost(job));
	struct Scsi_Host *shost = fc_bsg_to_shost(job);
	struct bfad_im_port_s *im_port = bfad_get_im_port(shost);
	struct bfad_s *bfad = im_port->bfad;
	bfa_bsg_fcpt_t *bsg_fcpt;
	struct bfad_fcxp    *drv_fcxp;
+4 −2
Original line number Diff line number Diff line
@@ -546,6 +546,7 @@ int
bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
			struct device *dev)
{
	struct bfad_im_port_pointer *im_portp;
	int error = 1;

	mutex_lock(&bfad_mutex);
@@ -564,7 +565,8 @@ bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
		goto out_free_idr;
	}

	im_port->shost->hostdata[0] = (unsigned long)im_port;
	im_portp = shost_priv(im_port->shost);
	im_portp->p = im_port;
	im_port->shost->unique_id = im_port->idr_id;
	im_port->shost->this_id = -1;
	im_port->shost->max_id = MAX_FCP_TARGET;
@@ -748,7 +750,7 @@ bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)

	sht->sg_tablesize = bfad->cfg_data.io_max_sge;

	return scsi_host_alloc(sht, sizeof(unsigned long));
	return scsi_host_alloc(sht, sizeof(struct bfad_im_port_pointer));
}

void
+10 −0
Original line number Diff line number Diff line
@@ -69,6 +69,16 @@ struct bfad_im_port_s {
	struct fc_vport *fc_vport;
};

struct bfad_im_port_pointer {
	struct bfad_im_port_s *p;
};

static inline struct bfad_im_port_s *bfad_get_im_port(struct Scsi_Host *host)
{
	struct bfad_im_port_pointer *im_portp = shost_priv(host);
	return im_portp->p;
}

enum bfad_itnim_state {
	ITNIM_STATE_NONE,
	ITNIM_STATE_ONLINE,
Loading