Re: [PATCH] arcmsr: Fix a potential data corruption issue

2015-07-10 Thread Dan Carpenter
if it's necessary, but it seems reasonable to me. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: [SCSI] scsi_dh: Update EMC handler

2015-07-11 Thread Dan Carpenter
return sp_model; 261 } regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] mvsas: don't allow negative timeouts

2015-11-13 Thread Dan Carpenter
ng "val" to unsigned. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- Checkpatch has several complaints about this code but I left it as-is. diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 90fdf0e..675e7fa 100644 --- a/drivers/scsi/mvsas/mv_init.

[patch] cxlflash: a couple off by one bugs

2015-09-22 Thread Dan Carpenter
The "> MAX_CONTEXT" should be ">= MAX_CONTEXT". Otherwise we go one step beyond the end of the cfg->ctx_tbl[] array. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superp

[patch RESEND] atp870u: 64 bit bug in atp885_init()

2015-12-09 Thread Dan Carpenter
On 64 bit CPUs there is a memory corruption bug on probe(). It should be a u32 pointer instead of an unsigned long pointer or we write past the end of the setupdata[] array. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- Resen

[patch] hisi_sas: fix error codes in hisi_sas_task_prep()

2015-12-09 Thread Dan Carpenter
There were a couple cases where the error codes weren't set and also I changed the success return to "return 0;" which is the same as "return rc;" but more explicit. Fixes: 42e7a69368a5 ('hisi_sas: Add ssp command functio') Signed-off-by: Dan Carpenter <dan.carpen...@

Re: [patch RESEND] atp870u: 64 bit bug in atp885_init()

2015-12-09 Thread Dan Carpenter
alone." But these days we just fix it. It's easier to just fix everything instead of trying to decide which bugs are critical. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More maj

Re: [patch RESEND] atp870u: 64 bit bug in atp885_init()

2015-12-09 Thread Dan Carpenter
one will miss it. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/4] scsi: storvsc: Refactor the code in storvsc_channel_init()

2015-12-11 Thread Dan Carpenter
>operation = VSTOR_OPERATION_BEGIN_INITIALIZATION; > + ret = storvsc_execute_vstor_op(device, request, true); > + if (ret) > + goto cleanup; 10 lines earlier there is an explicit "return -ENODEV" so it's not as if writing explicit returns will kill you. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/4] scsi: storvsc: Properly support Fibre Channel devices

2015-12-11 Thread Dan Carpenter
coding causes bugs. It does not prevent them. It is a bad style if you believe in measuring, evidence and science. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: qla2xxx: ISP27xx add tests for incomplete template.

2015-12-15 Thread Dan Carpenter
89 790 if (buf) { 791 ql_log(ql_log_warn, vha, 0xd015, 792 "Firmware dump saved to temp buffer (%ld/%p)\n", 793 vha->host_no, vha->hw->fw_dump); 794 qla2x00_post_uevent_work(v

Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

2015-12-12 Thread Dan Carpenter
ure. 2) It puts a blank line between the allocation and the check for failure. It's like a new paragraph. The allocation and the check should be next to each other. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] qla2xxx: fix a timeout loop

2015-12-16 Thread Dan Carpenter
After the loop we test for "if (!retries) " as a failure, but actually the post-op here will end with retries set to -1. I have fixed this by using a pre-op instead. Fixes: 7ec0effd30bb ('[SCSI] qla2xxx: Add support for ISP8044.') Signed-off-by: Dan Carpenter <dan.carpen...@orac

Re: [PATCH V2 0/4] scsi: storvsc: Properly support FC hosts

2015-12-13 Thread Dan Carpenter
Thanks, K. Y. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch RESEND] atp870u: 64 bit bug in atp885_init()

2015-12-09 Thread Dan Carpenter
all atp885 related code, but maybe people are still using it with 32 bit kernels. Or someone could delete it, but I'm not brave enough to be the one to do it. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message

re: qla2xxx: Delete session if initiator is gone from FW

2015-12-22 Thread Dan Carpenter
_schedule_sess_for_deletion(cmd->sess, true); 3599 } 3600 break; 3601 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] SCSI-lpfc: Use a signed return type for two functions

2015-12-19 Thread Dan Carpenter
It returns zero or negative error codes. The callers expect int. The current code is harmless. It should return an int. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majo

Re: [patch] qla2xxx: fix a timeout loop

2015-12-17 Thread Dan Carpenter
On Wed, Dec 16, 2015 at 05:50:17PM -0500, Martin K. Petersen wrote: > >>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes: > > Dan> After the loop we test for "if (!retries) " as a failure, but > Dan> actually the post-op

[patch] bfa: clean up some bounds checking

2016-06-16 Thread Dan Carpenter
ead one space beyond the end of the buffer and then exit the loop. In the next loop, we increment once, read two characters beyond the end of the buffer and then exit. Then after the loop we put a NUL character two characters past the end of the buffer. Signed-off-by: Dan Carpenter <dan.

re: megaraid_sas: Task management support

2016-02-08 Thread Dan Carpenter
alignment(sdev->request_queue, 0x7); It looks like the code is correct but the patch just deleted a tab accidentally. 1790 mr_device_priv_data->is_tm_capable = 1791 raid->capability.tmCapable; 1792 } regards, dan carpenter -- To uns

re: [SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller

2016-01-29 Thread Dan Carpenter
copy_to_user((void *)buffer, 3381 kaddr, 3382 len % bsize_elem); 3383 3384 kunmap(page); 3385 3386 scatterlist[i].length = len % bsize_elem; 3387 } regards, dan carpenter -- To unsubscribe from th

re: lpfc: Modularize and cleanup FDMI code in driver

2016-02-01 Thread Dan Carpenter
sizeof(struct lpfc_name)); lpfc_name is an 8 byte union. 2549 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org

[patch] bfa: use strncpy() instead of memcpy()

2016-01-30 Thread Dan Carpenter
BFA_MFG_NAME is "QLogic" which is only 7 bytes, but we are copying 8 bytes. It's harmless because the badding byte is likely zero but it makes static checkers complain. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- Technically the memset() is not needed because st

re: [SCSI] bfa: Brocade BFA FC SCSI driver

2016-03-11 Thread Dan Carpenter
597 bfa_trc(port->fcs, rport->pwwn); 598 return NULL; 599 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info a

[patch] scsi_dh_alua: uninitialized variable in alua_check_vpd()

2016-03-11 Thread Dan Carpenter
The pg_updated variable is support to be set to zero at the start but it is uninitialized. Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/driver

Re: [patch] scsi_dh_alua: uninitialized variable in alua_check_vpd()

2016-03-11 Thread Dan Carpenter
On Fri, Mar 11, 2016 at 11:50:30AM +0100, Hannes Reinecke wrote: > On 03/11/2016 11:17 AM, Dan Carpenter wrote: > > The pg_updated variable is support to be set to zero at the start but > > it is uninitialized. > > > > Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'acces

[patch v2] scsi_dh_alua: uninitialized variable in alua_check_vpd()

2016-03-11 Thread Dan Carpenter
The pg_updated variable is support to be set to false at the start but it is uninitialized. Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/driver

re: [SCSI] pm80xx: Phy settings support for motherboard controller.

2016-04-13 Thread Dan Carpenter
65 pm8001_tag_free(pm8001_ha, tag); 4566 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH resend v2] [SCSI] bfa: fix bfa_fcb_itnim_alloc() error handling

2016-04-13 Thread Dan Carpenter
The caller assumes that "itnim" is NULL on error and non-NULL on success but really "itnim" is uninitialized on error. This function should just use normal error handling where it returns zero on success and negative on failure. Signed-off-by: Dan Carpenter <dan.carpen...@

re: [SCSI] qla2xxx: Enhancements to support ISPFx00.

2016-04-13 Thread Dan Carpenter
res = bsg_job->reply->result = DID_OK << 16; 2261 bsg_job->reply->reply_payload_rcv_len = 2262 bsg_job->reply_payload.payload_len; 2263 } 2264 sp->done(vha, sp, res);

[patch] tcm_loop: use after free on error

2016-03-02 Thread Dan Carpenter
We dereference "tl_nexus" to get the error code. Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to target_alloc_session') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop

re: fnic: Using rport->dd_data to check rport online instead of rport_lookup.

2016-04-01 Thread Dan Carpenter
457 if (rport) { ^ The patch adds a check but too late. Probably just delete the check? 458 struct fc_rport_libfc_priv *rp = rport->dd_data; 459 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-

re: libiscsi: Use scsi helper to set information descriptor

2016-04-13 Thread Dan Carpenter
ILLEGAL_REQUEST, 0x10, ascq); 856 scsi_set_sense_information(sc->sense_buffer, 857 SCSI_SENSE_BUFFERSIZE, 858 sector); 859 goto out

Re: libiscsi: Use scsi helper to set information descriptor

2016-04-13 Thread Dan Carpenter
not needed by no means)? It looks for if there is any possible way that it could be uninitialized so that would solve the problem. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] megaraid: add scsi_cmnd NULL check before use

2016-05-12 Thread Dan Carpenter
trust me." and instead of trusting people I really wish they would just show me the relevant code that prevents it from happening. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More maj

[patch 1/2] mpt3sas: add missing curly braces

2016-05-12 Thread Dan Carpenter
There are some missing curly braces on this if statement, so we end up printing when we shouldn't. Fixes: a470a51cd648 ('mpt3sas: Handle active cable exception event') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/driver

[patch 2/2] mpt3sas: clean up indenting a bit

2016-05-12 Thread Dan Carpenter
The indenting is slightly off in parts of this file so I have tidied it. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 6bff13e..34d6f996 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_s

Re: libiscsi: Use scsi helper to set information descriptor

2016-05-04 Thread Dan Carpenter
} 1151 } 1152 } 1153 1154 return 0; 1155 err: 1156 /* Not alot we can do here, return ambiguous guard error */ 1157 return 0x1; 1158 } regards, dan carpenter -- To unsubscribe from this list: send the line

[patch] [SCSI] aic94xx: silence a static checker warning

2016-05-02 Thread Dan Carpenter
"ddb" is a number between 0-64. It can't ever be >= 0x. But the static checker complains that since we're capping the upper bound, we may as well cap the lower bound and disallow negatives as well. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/d

re: aha1542: Stop using scsi_module.c

2016-05-03 Thread Dan Carpenter
return -ENODEV; 1018 1019 pnp_set_drvdata(pdev, sh); 1020 return 0; 1021 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] [SCSI] eata_pio: missing break statement

2016-05-04 Thread Dan Carpenter
This missing break statement bug predates git. It's a very minor thing, it means that we print a '?' instead of a 'z' in dmesg. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index ca8003f..4299fa4 100644 --- a/driver

[patch v2] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche pointed out that we should probably re-initialize it for every iteration through the retry loop. Signed-off-by: Dan Carpenter <dan.carpen.

Re: [patch] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
On Thu, Apr 14, 2016 at 08:45:18AM -0700, Bart Van Assche wrote: > On 04/14/2016 02:39 AM, Dan Carpenter wrote: > >It's possible to use "err" without initializing it. If it happens to be > >a 2 which is SCSI_DH_RETRY then that could cause a bug. > > > >Sig

[patch] bnx2i: silence uninitialized variable warnings

2016-04-14 Thread Dan Carpenter
Presumably it isn't possible to have empty lists here, but my static checker doesn't know that and complains that "ep" can be used uninitialized. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi

[patch] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi

[patch] target: Silence an uninitialized variable warning

2016-04-14 Thread Dan Carpenter
I'm getting a static checker warning: drivers/target/target_core_sbc.c:1150 sbc_parse_cdb() error: uninitialized variable 'size'. It looks like a possible bug but wouldn't it have shown up in testing? Anyway let's just silence it by setting size to zero. Signed-off-by: Dan Carpenter

[patch] scsi: ufs: silence uninitialized variable warning

2016-04-14 Thread Dan Carpenter
If ufshcd_dme_get() fails then "tx_lanes" can be uninitialized. I've initialized it to zero so that the rest of the function turns into a no-op in that situation. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/uf

[patch] hpsa: set the enclosure identifier to zero

2016-04-14 Thread Dan Carpenter
This has only called from show_sas_rphy_enclosure_identifier(). The caller expects that we set an identifier, otherwise it uses an unintialized variable. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5be944c..25aa219

Re: [PATCH] megaraid: add scsi_cmnd NULL check before use

2016-05-09 Thread Dan Carpenter
megaraid_sas_fusion.c:2318 complete_cmd_fusion() error: we previously assumed 'cmd_fusion->scmd' could be null (see line 2281) But that code was from 2010 so I never reported it to the original author or the list. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe li

Re: [PATCH] megaraid: add scsi_cmnd NULL check before use

2016-05-09 Thread Dan Carpenter
I've updated Smatch to catch these and I'm testing it now. We'll see how it goes. If my quick and dirty method doesn't has too many false positives then it's will take some months before I get around to doing it properly... Thanks for notifying me on this. regards, dan carpenter

Re: [PATCH] megaraid: add scsi_cmnd NULL check before use

2016-05-09 Thread Dan Carpenter
I'm confused what you are saying. According to Petros, these bugs are causing failures in real life, I was only added to the CC list because Smatch should have warned about them. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i

[patch] fcoe: use kfree_skb() to free an skb

2016-08-03 Thread Dan Carpenter
This should be doing kfree_skb() instead of kfree(). Fixes: 9a6cf881df02 ('fcoe: implement FIP VLAN responder') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index a569c65..dcf3653 100644 --- a/drivers/scs

[patch] qla2xxx: small cleanup in qla2x00_wait_for_hba_ready()

2016-08-03 Thread Dan Carpenter
The "if (test_bit(UNLOADING..." line was indented one tab more than it should have been. There was an extra parenthesis around the qla2x00_reset_active() function call. I lined up the conditions a bit so that it shows how they group together. Signed-off-by: Dan Carpenter &

[patch] ibmvfc: prevent a potential deadlock

2016-07-15 Thread Dan Carpenter
My static checker complains that we need to unlock on this path. Seems true. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index fc523c3..ab67ec4 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/driver

[patch] fnic: pci_dma_mapping_error() doesn't return an error code

2016-07-07 Thread Dan Carpenter
pci_dma_mapping_error() returns true on error and false on success. Fixes: fd6ddfa4c1dd ('fnic: check pci_map_single() return value') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 67669a9..f3a3331

[bug report] qla2xxx: Add framework for async fabric discovery

2017-02-06 Thread Dan Carpenter
quot;); 3923 kfree(fcport); 3924 fcport = NULL; 3925 } 3926 INIT_WORK(>del_work, qla24xx_delete_sess_fn); 3927 INIT_LIST_HEAD(>gnl_entry); 3928 INIT_LIST_HEAD(>list); 3929 3930 return fcport; 3931 } regards, dan carpenter

Re: [PATCH] scsi: aacraid: rcode is unsigned, so can never be less than zero

2017-02-07 Thread Dan Carpenter
luns->resp_flag == 2) { The original code is buggy. rcode should be an int. regards, dan carpenter

[patch] scsi: qedi: silence sprintf() overflow warning

2017-02-07 Thread Dan Carpenter
It could theoretically go up to 0x800 so we need space for 10 digits. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 5eda21d903e9..0dcf3b08230c 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/d

[bug report] scsi_dh_rdac: switch to scsi_execute_req_flags()

2017-02-07 Thread Dan Carpenter
->index, 556 (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying"); 557 regards, dan carpenter

[patch] aacraid: information leak in aac_send_raw_srb()

2017-02-07 Thread Dan Carpenter
The aac_srb_reply struct ends in a 2 byte hole so we end up leaking a bit of information to user space. Fixes: 423400e64d37 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/aacraid/commctrl.c b/driv

Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.

2017-01-22 Thread Dan Carpenter
(I'm a total newbie with this code so that's probably part of the confusion). Since you're resend the code anyway, could you just add this information to the commit message? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a m

[patch] scsi_dh_emc: return success in clariion_std_inquiry()

2017-02-21 Thread Dan Carpenter
We accidentally return an uninitialized variable on success. Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c in

[bug report] scsi: ufs-qcom: dump additional testbus registers

2017-02-13 Thread Dan Carpenter
__func__, host->testbus.select_minor); 1535 return false; 1536 } 1537 1538 return true; 1539 } regards, dan carpenter

Re: [bug report] scsi: aacraid: Added support for hotplug

2017-02-13 Thread Dan Carpenter
On Mon, Feb 13, 2017 at 07:39:15PM +, Raghava Aditya Renukunta wrote: > Hi Don, > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Monday, February 13, 2017 10:47 AM > > To: Raghava Aditya Renukunta > > &l

[bug report] megaraid_sas: Make PI enabled VD 8 byte DMA aligned

2017-02-14 Thread Dan Carpenter
[(instance->pd_seq_map_id - 1) & 1]; 1794 mr_device_priv_data->is_tm_capable = 1795 pd_sync->seq[pd_index].capability.tmCapable; 1796 } 1797 } regards, dan carpenter

[patch] scsi: megaraid_sas: array overflow in megasas_dump_frame()

2017-02-14 Thread Dan Carpenter
The "sz" variable is in terms of bytes, but we're treating the buffer as an array of __le32 so we have to divide by 4. Fixes: def0eab3af86 ("scsi: megaraid_sas: enhance debug logs in OCR context") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --g

[bug report] scsi: aacraid: Include HBA direct interface

2017-02-13 Thread Dan Carpenter
if (unlikely(fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) 774 return -ETIMEDOUT; 775 776 return 0; 777 } regards, dan carpenter

[bug report] scsi: aacraid: Added support for hotplug

2017-02-13 Thread Dan Carpenter
v->queues->queue[HostNormCmdQueue].lock; 2243 spin_unlock_irqrestore(t_lock, flags); Otherwise it is a double unlock bug. 2244 } regards, dan carpenter

Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.

2017-01-18 Thread Dan Carpenter
; fc_transport_template = fc_attach_transport(_transport_functions); > if (!fc_transport_template) > return -ENODEV; > - > - /* > - * Install Hyper-V specific timeout handler. > - */ > - fc_transport_template->eh_timed_out = storvsc_eh_timed_out;

Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.

2017-01-20 Thread Dan Carpenter
On Thu, Jan 19, 2017 at 12:55:27PM -0500, Cathy Avery wrote: > > > On 01/18/2017 06:15 PM, Dan Carpenter wrote: > >On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote: > >>Enable FC lightweight host option so that the luns exposed by > >>t

[bug report] scsi: aacraid: Reorder Adapter status check

2017-02-27 Thread Dan Carpenter
472 } Issue #2: The caller checks for if the return is greater than 2. It never is. We can remove this dead code. Issue #3: The caller passes "bled" to aac_send_iop_reset() which ignores it. What's up with that? Either it's a bug or we should delete

[bug report] scsi: lpfc: NVME Initiator: Base modifications

2017-02-27 Thread Dan Carpenter
spin_lock_irq(>ring_lock); 4610 __lpfc_dequeue_nport_iocbs(phba, ndlp, pring, dequeue_list); 4611 spin_unlock_irq(>ring_lock); spin_lock_irq() is not nestable. It should just be spin_lock(>ring_lock); and we leave the IRQs as-is (locked). 4612 } 4613 spin_unlock_irq(>hbalock); 4614 } regards, dan carpenter

[bug report] scsi: lpfc: NVME Target: Base modifications

2017-02-27 Thread Dan Carpenter
if (!dma_buf->iocbq) { ^^ Check. 651 kfree(dma_buf->context); 652 pci_pool_free(phba->lpfc_drb_pool, dma_buf->dbuf.virt, regards, dan carpenter

[bug report] scsi: lpfc: NVME Initiator: Merge into FC discovery

2017-02-27 Thread Dan Carpenter
ndlp->nlp_state); ^^^ Potential Oops. 1795 1796 /* No failure to an ABTS request. */ 1797 return 0; 1798 } regards, dan carpenter

[bug report] scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-02-27 Thread Dan Carpenter
si_host_put(vn_port->host); 1567 regards, dan carpenter

[bug report] scsi: lpfc: NVME Target: Receive buffer updates

2017-02-27 Thread Dan Carpenter
} 15192 15193 /* sanity check on queue memory */ 15194 if (!hrq || !drq || !cq) { ^^^ Too late. 15195 status = -ENODEV; 15196 goto out; regards, dan carpenter

Re: [patch] arcmsr: buffer overflow in arcmsr_iop_message_xfer()

2016-09-15 Thread Dan Carpenter
. I should have been more careful. v2 on the way. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch v2] arcmsr: buffer overflow in arcmsr_iop_message_xfer()

2016-09-15 Thread Dan Carpenter
We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Reported-by: Marco Grassi <marco@gmail.com> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Reviewed-by: Tomas Henzl <the...@redhat.com> diff --git a/drivers/scsi/arcmsr/arcmsr

[patch] arcmsr: buffer overflow in arcmsr_iop_message_xfer()

2016-09-15 Thread Dan Carpenter
We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Reported-by: Marco Grassi <marco@gmail.com> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 7

[bug report] smartpqi: initial commit of Microsemi smartpqi driver

2016-10-14 Thread Dan Carpenter
secs -= msecs_blocked; 3468 } 3469 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] xen-scsifront: Add a missing call to kfree

2016-11-25 Thread Dan Carpenter
t it looks so deliberate. What's going on with that? Could you send your follow on patch as a reply to the thread? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] scsi: libfc: Remove an unneeded condition

2016-11-24 Thread Dan Carpenter
We verified that resp_code is FC_SPP_RESP_ACK earlier so we don't need to check again here. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 110a707..c991f3b 100644 --- a/drivers/scsi/libfc/fc_rport.c

Re: [PATCH] bnx2fc: shift wrapping bug in bnx2fc_process_unsol_compl()

2016-11-28 Thread Dan Carpenter
use > such things yet. So keep the current style with casting. Ugh... No. This is not code to emulate. Use 1ULL << i. Even if we did the cast, you would only need one: if (err_warn_bit_map & ((u64)1 << i)) { regards, dan carpenter -- To unsu

[patch] scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()

2016-11-18 Thread Dan Carpenter
We accidentally allocate sizeof(u32) instead of sizeof(struct be_cmd_get_session_resp). Fixes: 50a4b824be9e ("scsi: be2iscsi: Fix to make boot discovery non-blocking") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drive

[bug report] scsi: hisi_sas: add internal abort to hisi_sas_abort_task()

2016-10-12 Thread Dan Carpenter
without checking. 849 850 hisi_sas_internal_task_abort(hisi_hba, device, 851 HISI_SAS_INT_ABT_CMD, tag); 852 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch] zfcp: spin_lock_irqsave() is not nestable

2016-10-13 Thread Dan Carpenter
On Thu, Oct 13, 2016 at 12:49:18PM +0200, Steffen Maier wrote: > Dan, many thanks for catching this! Sparse did not notice, is there > other tooling that would find such things? This was a Smatch warning. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubs

[patch] scsi: hisi_sas: shift vs compare typos

2016-11-29 Thread Dan Carpenter
There are some typos where we intended "<<" but have "<". Seems likely to cause a bunch of problems. Fixes: d3b688d3c69d ("scsi: hisi_sas: add v2 hw support for ECC and AXI bus fatal error") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>

[patch] scsi: dpt_i2o: double free if adpt_i2o_online_hba() fails

2016-12-16 Thread Dan Carpenter
There are two places where adpt_i2o_online_hba() is called. Both callers call adpt_i2o_delete_hba(pHba) if adpt_i2o_online_hba() fails and since we also free it here that causes a double free bug. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- This bug pre-dates git. diff

[bug report] ses: Fix problems with simple enclosures

2017-01-12 Thread Dan Carpenter
we? Shouldn't this be "return DRIVER_ERROR << 24;" like how scsi_execute_req() does it? I don't think the callers care. 118 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.k

[bug report] scsi: lpfc: Reinstate lpfc_soft_wwn parameter

2017-01-12 Thread Dan Carpenter
;cfg_soft_wwnn; 2163 2164 dev_printk(KERN_NOTICE, >pcidev->dev, 2165 "lpfc%d: Reinitializing to use soft_wwpn\n", phba->brd_no); 2166 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the b

[bug report] scsi: megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities

2017-01-13 Thread Dan Carpenter
261 for (j = 0; j < i; ++j) 5262 kfree(fusion->stream_detect_by_ld[j]); 5263 kfree(fusion->stream_detect_by_ld); 5264 fusion->stream_detect_by_ld =

[bug report] scsi: megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid Controllers

2017-01-12 Thread Dan Carpenter
49 } 2050 } else { Wow... You guys are probably already discussed this code, but I'm not on the linux-scsi list. Do we have a process issue where we are merging code that we shouldn't be? What's going on here? regards, dan carpenter -- To unsubscribe from this li

[bug report] scsi: megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing

2017-01-12 Thread Dan Carpenter
onsistent indenting drivers/scsi/megaraid/megaraid_sas_fusion.c:4060 megasas_reset_fusion() warn: inconsistent indenting regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] scsi: dpt_i2o: double free on error path

2016-11-30 Thread Dan Carpenter
() and left the new one. Fixes: 021e2927586d ("scsi: dpt_i2o: Add a missing call to kfree") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index f88b3d2..27c0dce 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt

Re: [PATCH] xen-scsifront: Add a missing call to kfree

2016-12-05 Thread Dan Carpenter
This issue was found with Hector. > > > > Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com> > > Nice catch. I think this will need some more work, I'll do a > follow-on patch. > The error handling is really weird. Could you send your follow on to this thread?

Re: [PATCH] xen-scsifront: Add a missing call to kfree

2016-12-06 Thread Dan Carpenter
Oops. Sorry for the noise. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[bug report] [SCSI] mpt3sas: add new driver supporting 12GB SAS

2017-01-04 Thread Dan Carpenter
pr_info("discovery_status(0x%08x)", 619 le32_to_cpu(event_data->DiscoveryStatus)); 620 pr_info("\n"); The indenting is messed up here and also this should be using pr_cont() because pr_info() will put a bunch of crap in the middle of

Re: [bug report] [SCSI] mpt3sas: add new driver supporting 12GB SAS

2017-01-04 Thread Dan Carpenter
Oops... This one is really old. I didn't look carefully at it before I hit send. Sorry about that. regards, dan carpenter On Wed, Jan 04, 2017 at 04:33:16PM +0300, Dan Carpenter wrote: > Hello Sreekanth Reddy, > > The patch f92363d12359: "[SCSI] mpt3sas: add new driver support

[PATCH] scsi: osd_uld: remove an unneeded NULL check

2017-03-23 Thread Dan Carpenter
We don't call the remove() function unless probe() succeeds so "oud" can't be NULL here. Plus, if it were NULL, we dereference it on the next line so it would crash anyway. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/scsi/osd/osd_uld.c b/

Re: [PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

2017-03-23 Thread Dan Carpenter
On Wed, Mar 22, 2017 at 07:42:08PM +, Colin Ian King wrote: > On 22/03/17 19:39, Dan Carpenter wrote: > > On Wed, Mar 22, 2017 at 02:01:37PM +, Colin King wrote: > >> From: Colin Ian King <colin.k...@canonical.com> > >> > >> Reading and writing t

<    1   2   3   4   5   >