Brian King | 28 Jul 22:28 2014
Picon

[PATCH 2/5] kexec: Export kexec_in_progress


Export kexec_in_progress for use by device drivers and other modules
to optimize kexec boot.

Signed-off-by: Brian King <brking <at> linux.vnet.ibm.com>
---

 kernel/kexec.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN kernel/kexec.c~kexec_export_in_prog kernel/kexec.c
--- linux/kernel/kexec.c~kexec_export_in_prog	2014-07-23 17:05:24.851887935 -0500
+++ linux-bjking1/kernel/kexec.c	2014-07-23 17:05:24.856887970 -0500
 <at>  <at>  -1716,3 +1716,5  <at>  <at>  int kernel_kexec(void)
 	mutex_unlock(&kexec_mutex);
 	return error;
 }
+
+EXPORT_SYMBOL_GPL(kexec_in_progress);
_

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Brian King | 28 Jul 22:28 2014
Picon

[PATCH 1/5] ipr: Add support for async scanning to speed up boot


Switch device scanning logic in the ipr driver to use
the async scan API. This speeds up boot times, particularly
on large systems.

Signed-off-by: Brian King <brking <at> linux.vnet.ibm.com>
---

 drivers/scsi/ipr.c |   88 +++++++++++++++++++++++++----------------------------
 drivers/scsi/ipr.h |    4 --
 2 files changed, 44 insertions(+), 48 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_async_scanning_boot drivers/scsi/ipr.c
--- linux/drivers/scsi/ipr.c~ipr_async_scanning_boot	2014-06-12 10:17:39.000000000 -0500
+++ linux-bjking1/drivers/scsi/ipr.c	2014-07-23 15:52:04.056004810 -0500
 <at>  <at>  -1426,16 +1426,14  <at>  <at>  static void ipr_handle_config_change(str
 		if (res->sdev) {
 			res->del_from_ml = 1;
 			res->res_handle = IPR_INVALID_RES_HANDLE;
-			if (ioa_cfg->allow_ml_add_del)
-				schedule_work(&ioa_cfg->work_q);
+			schedule_work(&ioa_cfg->work_q);
 		} else {
 			ipr_clear_res_target(res);
 			list_move_tail(&res->queue, &ioa_cfg->free_res_q);
 		}
 	} else if (!res->sdev || res->del_from_ml) {
 		res->add_to_ml = 1;
-		if (ioa_cfg->allow_ml_add_del)
-			schedule_work(&ioa_cfg->work_q);
(Continue reading)

Maurizio Lombardi | 28 Jul 14:55 2014
Picon

[PATCH] qla4xxx: check the return value of dma_alloc_coherent()

the qla4xxx_alloc_fw_dump() calls dma_alloc_coherent() but does not
check its return value.

Signed-off-by: Maurizio Lombardi <mlombard <at> redhat.com>
---
 drivers/scsi/qla4xxx/ql4_init.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 6f12f85..4180d6d 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
 <at>  <at>  -334,6 +334,12  <at>  <at>  void qla4xxx_alloc_fw_dump(struct scsi_qla_host *ha)
 	/* Allocate memory for saving the template */
 	md_tmp = dma_alloc_coherent(&ha->pdev->dev, ha->fw_dump_tmplt_size,
 				    &md_tmp_dma, GFP_KERNEL);
+	if (!md_tmp) {
+		ql4_printk(KERN_INFO, ha,
+			   "scsi%ld: Failed to allocate DMA memory\n",
+			   ha->host_no);
+		return;
+	}

 	/* Request template */
 	status =  qla4xxx_get_minidump_template(ha, md_tmp_dma);
--

-- 
Maurizio Lombardi

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
(Continue reading)

Rickard Strandqvist | 27 Jul 17:12 2014
Picon

[PATCH] scsi: bfa: bfa_fcbuild.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And use the sizeof on the to string rather than strlen on the from string.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/scsi/bfa/bfa_fcbuild.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcbuild.c b/drivers/scsi/bfa/bfa_fcbuild.c
index dce787f..9294c14 100644
--- a/drivers/scsi/bfa/bfa_fcbuild.c
+++ b/drivers/scsi/bfa/bfa_fcbuild.c
 <at>  <at>  -1249,8 +1249,8  <at>  <at>  fc_rspnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id,
 	memset(rspnid, 0, sizeof(struct fcgs_rspnid_req_s));

 	rspnid->dap = s_id;
-	rspnid->spn_len = (u8) strlen((char *)name);
-	strncpy((char *)rspnid->spn, (char *)name, rspnid->spn_len);
+	strlcpy((char *)rspnid->spn, (char *)name, sizeof(rspnid->spn));
+	rspnid->spn_len = (u8) strlen((char *)rspnid->spn);

 	return sizeof(struct fcgs_rspnid_req_s) + sizeof(struct ct_hdr_s);
 }
 <at>  <at>  -1270,8 +1270,8  <at>  <at>  fc_rsnn_nn_build(struct fchs_s *fchs, void *pyld, u32 s_id,
 	memset(rsnn_nn, 0, sizeof(struct fcgs_rsnn_nn_req_s));

 	rsnn_nn->node_name = node_name;
-	rsnn_nn->snn_len = (u8) strlen((char *)name);
-	strncpy((char *)rsnn_nn->snn, (char *)name, rsnn_nn->snn_len);
+	strlcpy((char *)rsnn_nn->snn, (char *)name, sizeof(rsnn_nn->snn));
(Continue reading)

Rickard Strandqvist | 27 Jul 17:11 2014
Picon

[PATCH] scsi: 3w-9xxx.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And use the sizeof on the to string rather than strlen on the from string.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/scsi/3w-9xxx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 0a73253..f4d2331 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
 <at>  <at>  -621,7 +621,8  <at>  <at>  static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
 	}

 	/* Load rest of compatibility struct */
-	strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
+	strlcpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION,
+		sizeof(tw_dev->tw_compat_info.driver_version));
 	tw_dev->tw_compat_info.driver_srl_high = TW_CURRENT_DRIVER_SRL;
 	tw_dev->tw_compat_info.driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
 	tw_dev->tw_compat_info.driver_build_high = TW_CURRENT_DRIVER_BUILD;
--

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Rickard Strandqvist | 27 Jul 00:30 2014
Picon

[PATCH] scsi: scsi_tgt_if.c: Cleaning up missing null-terminate in conjunction with strncpy

If you are going to use memset before strncpy you must copy sizeof -1

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/scsi/scsi_tgt_if.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 6209110..7dc98eb 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
 <at>  <at>  -190,7 +190,7  <at>  <at>  int scsi_tgt_uspace_send_it_nexus_request(int host_no, u64 itn_id,
 	ev.p.it_nexus_req.itn_id = itn_id;
 	if (initiator_id)
 		strncpy(ev.p.it_nexus_req.initiator_id, initiator_id,
-			sizeof(ev.p.it_nexus_req.initiator_id));
+			sizeof(ev.p.it_nexus_req.initiator_id) - 1);

 	dprintk("%d %x %llx\n", host_no, function, (unsigned long long)itn_id);

--

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Laszlo T. | 26 Jul 21:59 2014
Picon

Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag

Hello,

First of all I've just subscribed the linux-scsi thread. I hope you
get my email the right way.

I have also problems with Jmicron JMS567 mobile rack.

I tried on different kernels:
3.15.5
3.16.rc6
the 'Invalid field in cdb' errors disappeared but still not ok.

I got the following errors when I ran a mkfs.ext4 command and then the
device disappeared.

Jul 26 19:54:37 debian kernel: [  118.060026] usb 8-3: new high-speed
USB device number 2 using ehci-pci
Jul 26 19:54:37 debian kernel: [  118.245208] usb 8-3: New USB device
found, idVendor=152d, idProduct=0567
Jul 26 19:54:37 debian kernel: [  118.245210] usb 8-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Jul 26 19:54:37 debian kernel: [  118.245212] usb 8-3: Product: USB to
ATA/ATAPI Bridge
Jul 26 19:54:37 debian kernel: [  118.245213] usb 8-3: Manufacturer: JMicron
Jul 26 19:54:37 debian kernel: [  118.245215] usb 8-3: SerialNumber:
74D781114413108
Jul 26 19:54:37 debian mtp-probe: checking bus 8, device 2:
"/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-3"
Jul 26 19:54:37 debian mtp-probe: bus: 8, device: 2 was not an MTP device
Jul 26 19:54:37 debian kernel: [  118.257932] usbcore: registered new
(Continue reading)

Christoph Hellwig | 26 Jul 18:17 2014
Picon

Re: [PATCH] scsi: break from queue depth adjusting loops when device found

On Sat, Jul 26, 2014 at 11:14:35AM -0500, Stephen Cameron wrote:
> Hmm, I forgot that that patch was in there, I wasn't trying to keep pushing
> it along.  From the previous discussion, I got the impression I was simply
> wrong, and that this patch wasn't needed, so I had meant to drop it, I just
> forgot to actually drop it.

It's more complicated - as Robert indicated you're tenically right, although
in practice it's not what the existing users expect.  If you have some
cycles for it I'd love to at lest get the per-LUN and per-target
ramp up/down in ASAP.  We can then start looking into doing it even
better based on the target response later on.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Rickard Strandqvist | 26 Jul 16:51 2014
Picon

[PATCH] scsi: bfa: bfad_bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/scsi/bfa/bfad_bsg.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 8994fb8..f229936 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
 <at>  <at>  -128,7 +128,7  <at>  <at>  bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd)

 	/* fill in driver attr info */
 	strcpy(iocmd->ioc_attr.driver_attr.driver, BFAD_DRIVER_NAME);
-	strncpy(iocmd->ioc_attr.driver_attr.driver_ver,
+	strlcpy(iocmd->ioc_attr.driver_attr.driver_ver,
 		BFAD_DRIVER_VERSION, BFA_VERSION_LEN);
 	strcpy(iocmd->ioc_attr.driver_attr.fw_ver,
 		iocmd->ioc_attr.adapter_attr.fw_ver);
 <at>  <at>  -316,7 +316,7  <at>  <at>  bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd)
 	iocmd->attr.port_type = port_attr.port_type;
 	iocmd->attr.loopback = port_attr.loopback;
 	iocmd->attr.authfail = port_attr.authfail;
-	strncpy(iocmd->attr.port_symname.symname,
+	strlcpy(iocmd->attr.port_symname.symname,
 		port_attr.port_cfg.sym_name.symname,
 		sizeof(port_attr.port_cfg.sym_name.symname));

--

-- 
(Continue reading)

Rickard Strandqvist | 26 Jul 16:07 2014
Picon

[PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 block/bsg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bsg.c b/block/bsg.c
index ff46add..b2688c5 100644
--- a/block/bsg.c
+++ b/block/bsg.c
 <at>  <at>  -790,7 +790,7  <at>  <at>  static struct bsg_device *bsg_add_device(struct inode *inode,
 	mutex_lock(&bsg_mutex);
 	hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));

-	strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1);
+	strlcpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name));
 	dprintk("bound to <%s>, max queue %d\n",
 		format_dev_t(buf, inode->i_rdev), bd->max_queue);

--

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Dr Vitor Gespar | 26 Jul 04:27 2014
Picon

Contact me for more details,

Hi friend. I want to transfer USD5.5Million into your account Contact me for 
more details.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane