[PATCH] [SCSI] esas2r: unlock on error in esas2r_nvram_read_direct()

2019-10-22 Thread Dan Carpenter
This error path is missing an unlock. Fixes: 26780d9e12ed ("[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver") Signed-off-by: Dan Carpenter --- drivers/scsi/esas2r/esas2r_flash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/esas2r/esas2r_

[PATCH] scsi: csiostor: Don't enable IRQs too early

2019-10-19 Thread Dan Carpenter
These are called with IRQs disabled from csio_mgmt_tmo_handler() so we can't call spin_unlock_irq() or it will enable IRQs prematurely. Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver") Signed-off-by: Dan Carpenter --- drivers/scsi/csiostor/cs

[PATCH] scsi: mpt3sas: Clean up some indenting

2019-10-04 Thread Dan Carpenter
This line is indented too far so it's a bit confusing. Signed-off-by: Dan Carpenter --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 0c77f22

[bug report] scsi: lpfc: Adding ability to reset chip via pci bus reset

2019-08-29 Thread Dan Carpenter
ally be NULL? 1323 return -ENODEV; 1324 } 1325 1326 res = lpfc_check_pci_resettable(phba); 1327 if (res) 1328 return res; regards, dan carpenter

[bug report] scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.

2019-08-26 Thread Dan Carpenter
GFP_KERNEL, 4117 &lpfc_ncmd->dma_handle); 4118 if (!lpfc_ncmd->data) { regards, dan carpenter

[PATCH v2] scsi: mpt3sas: clean up a couple sizeof() uses

2019-07-25 Thread Dan Carpenter
atest style as well. Signed-off-by: Dan Carpenter --- v2: Update the style to the 21st Century drivers/scsi/mpt3sas/mpt3sas_ctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index d4ecfbb

Re: [PATCH] scsi: mpt3sas: clean up a sizeof()

2019-06-26 Thread Dan Carpenter
On Wed, Jun 26, 2019 at 07:22:30AM -0700, James Bottomley wrote: > On Wed, 2019-06-26 at 13:12 +0300, Dan Carpenter wrote: > > This patch is just a cleanup and doesn't change run time because both > > sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and > &g

[PATCH] scsi: mpt3sas: clean up a sizeof()

2019-06-26 Thread Dan Carpenter
This patch is just a cleanup and doesn't change run time because both sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and paste error and the SCSI struct was intended. Signed-off-by: Dan Carpenter --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(

[bug report] [SCSI] esas2r: Directly call kernel functions for atomic bit operations

2019-06-24 Thread Dan Carpenter
^^ Same for these. But the code is really old and no one has noticed the bug... 862 863 /* Uncached Area */ 864 high = (u8 *)*uncached_area; 865 regards, dan carpenter

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Dan Carpenter
n linear way may see a chained sg, which > is like a link pointer, then may cause trouble for driver. > So from a user perspective it results in an Oops? It would be really cool if you had the copy of the Oops btw so people could grep the git history for it. (You need to resend with the improved commit message). regards, dan carpenter

[PATCH] scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous()

2019-05-29 Thread Dan Carpenter
We need to drop the "ctrl_info->sync_request_sem" lock before returning. Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver") Signed-off-by: Dan Carpenter --- drivers/scsi/smartpqi/smartpqi_init.c | 6 -- 1 file changed, 4 insertions(+), 2 del

Re: [PATCH] scsi: qedi: remove memset/memcpy to nfunc and use func instead

2019-05-10 Thread Dan Carpenter
It took me a while to figure out that this is almost the same as Colin's qedf patch but for qedi. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH][V3] scsi: cxgbi: remove redundant __kfree_skb call on skb and free cst->atid

2019-04-12 Thread Dan Carpenter
Looks good to me. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH][V2] scsi: cxgbi: remove redundant __kfree_skb call on skb and free cst->atid

2019-04-10 Thread Dan Carpenter
-EINVAL; > } > cxgbi_sock_set_flag(csk, CTPF_HAS_ATID); > cxgbi_sock_get(csk); ^^^ Don't we need to a put for this as well? > > skb = alloc_wr(sizeof(struct cpl_act_open_req), 0, GFP_KERNEL); > - if (!skb) > - goto rel_resource; > + if (!skb) { > + cxgb3_free_atid(t3dev, csk->atid); > + return -ENOMEM; > + } regards, dan carpenter

Re: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-04-09 Thread Dan Carpenter
ize, int groupsize, > if (j) > lx--; > } > - if (!ascii) > + if (!flags & HEXDUMP_ASCII) ^^ This is a precedence bug. It should be if (!(flags & HEXDUMP_ASCII)). > goto nil; > regards, dan carpenter

Re: [PATCH] scsi: cxgbi: remove redundant __kfree_skb call on skb

2019-04-09 Thread Dan Carpenter
resource; > > + return -ENOMEM; > > I would expect a cxgb3_free_atid(csk->atid) here. Did i miss something ? > Yeah. I don't see that cxgb3_free_atid() drops the cxgbi_sock_get() reference so we would want to do a put for that as well I think. regards, dan carpenter

[bug report] scsi: qedf: Wait for upload and link down processing during soft ctx reset

2019-03-29 Thread Dan Carpenter
} 812 rcu_read_unlock(); 813 return false; 814 815 } regards, dan carpenter

Re: [PATCH] Fix for a small typo

2019-03-12 Thread Dan Carpenter
On Tue, Mar 12, 2019 at 04:50:07PM +0530, Milan P. Gandhi wrote: > On 3/12/19 4:46 PM, Dan Carpenter wrote: > > 1) Subject > > 2) No patch description. (What type did you fix?) > > 3) CC list. > > > > Hi Dan, Julia, > > Thanks for pointing it out. > L

Re: [PATCH] Fix for a small typo

2019-03-12 Thread Dan Carpenter
1) Subject 2) No patch description. (What type did you fix?) 3) CC list. regards, dan carpenter

Re: [PATCH] Minor fix for comment section

2019-03-12 Thread Dan Carpenter
vers/scsi/qla2xxx/qla_bsg.c The subject needs to be updated as well because it doesn't have the subsystem prefix. Use git log --oneline drivers/scsi/qla2xxx/qla_bsg.c to see what people are using as the prefix for that file. Update those two issues, and resend. regards, dan carpenter

[PATCH] scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()

2019-03-06 Thread Dan Carpenter
y. Fixes: 56de8357049c ("scsi: lpfc: fix calls to dma_set_mask_and_coherent()") Signed-off-by: Dan Carpenter --- drivers/scsi/lpfc/lpfc_init.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c

[bug report] scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues

2019-02-19 Thread Dan Carpenter
if (cpu < LPFC_CHECK_CPU_CNT) 3674 phba->sli4_hba.hdwq[idx].cpucheck_cmpl_io[cpu]++; New unchecked dereference. Although possibly the LPFC_CHECK_SCSI_IO condition implies it is non-NULL? 3675 } 3676 #endif regards, dan carpenter

[bug report] scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu

2019-02-19 Thread Dan Carpenter
ci_function_reset(phba); 11129 11130 /* Free RAS DMA memory */ 11131 if (phba->ras_fwlog.ras_enabled) 11132 lpfc_sli4_ras_dma_free(phba); 11133 11134 /* Stop the SLI4 device port */ --> 11135 phba->pport->work_port_events = 0; ^ Unchecked dereference. 11136 } regards, dan carpenter

[PATCH] scsi: qla2xxx: check for kstrtol() failure

2019-02-19 Thread Dan Carpenter
quot;) Signed-off-by: Dan Carpenter --- drivers/scsi/qla2xxx/qla_attr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 2eb1ae721a7d..f928c4d3a1ef 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/q

[bug report] scsi: qla2xxx: Check for FW started flag before aborting

2019-02-19 Thread Dan Carpenter
rval = ha->isp_ops->abort_command(sp); 197 198 ql_dbg(ql_dbg_io, fcport->vha, 0x212b, 199 "%s: %s command for sp=%p, handle=%x on fcport=%p rval=%x\n", 200 __func__, (rval != QLA_SUCCESS) ? "Failed to abort" : "Aborted", 201 sp, sp->handle, fcport, rval); 202 } regards, dan carpenter

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-18 Thread Dan Carpenter
On Mon, Feb 18, 2019 at 07:32:05AM -0800, James Bottomley wrote: > On Mon, 2019-02-18 at 12:37 +0300, Dan Carpenter wrote: > > On Sat, Feb 16, 2019 at 05:27:16PM +0100, Walter Harms wrote: > > > Am 16.02.2019 15:44, schrieb Colin King: > > > > From: Colin Ian King &

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-18 Thread Dan Carpenter
phy_addr <<= 16; > That would be a behavior change but it also might be a bugfix? Why doesn't the code just do: phy_addr = ((dma_addr_t)m_sg->baseaddr_h << 32) | m_sg->baseaddr_l; (Probably they broke it up into two shifts to silence a GCC warning that the shift was wrong because of the missing cast?) regards, dan carpenter

Re: [PATCH 3/4] bfa: fix calls to dma_set_mask_and_coherent()

2019-02-17 Thread Dan Carpenter
Hi Hannes, url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-fixup-dma_set_mask_and_coherent-calls/20190214-044535 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next smatch warnings: drivers/scsi/bfa/bfad.c:805 bfad_pci_init() error: uninitialized s

Re: [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id'

2019-02-14 Thread Dan Carpenter
27;m not a maintainer so it's not my place to approve things. regards, dan carpenter

Re: [PATCH] scsi: qla2xxx: remove redundant null check on pointer sess

2019-02-13 Thread Dan Carpenter
ha->tgt.tgt_ops->put_sess(sess); Several places do: sess = NULL; goto out_term2; We could remove the "sess = NULL;" because it's not required now. > spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); > out_term: > qlt_send_term_exchange(ha->base_qpair, NULL, &prm->tm_iocb2, 1, 0); regards, dan carpenter

[PATCH] scsi: lpfc: Fix error code if kcalloc() fails

2019-02-11 Thread Dan Carpenter
This should return -ENOMEM if kcalloc() fails, but it accidentally returns success instead. Fixes: 6a828b0f6192 ("scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues") Signed-off-by: Dan Carpenter --- drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1

[PATCH] scsi: 53c700: pass correct "dev" to dma_alloc_attrs()

2019-01-24 Thread Dan Carpenter
The "hostdata->dev" pointer is NULL here. We set "hostdata->dev = dev;" later in the function and we also use "hostdata->dev" when we call dma_free_attrs() in NCR_700_release(). This bug predates git version control. Signed-off-by: Dan Carpenter --- I

[PATCH] scsi: bnx2fc: Fix error handling in probe()

2019-01-24 Thread Dan Carpenter
driver") Signed-off-by: Dan Carpenter --- drivers/scsi/bnx2fc/bnx2fc_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 350257c13a5b..bc9f2a2365f4 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io

Re: [PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-21 Thread Dan Carpenter
On Thu, Jan 17, 2019 at 05:52:28PM +0800, Ching Huang wrote: > On Thu, 2019-01-17 at 12:16 +0300, Dan Carpenter wrote: > > On Thu, Jan 17, 2019 at 04:47:07PM +0800, Ching Huang wrote: > > > On Thu, 2019-01-17 at 10:59 +0300, Dan Carpenter wrote: > > > > On Thu, Ja

Re: [PATCH 2/3] megaraid_sas: Rework device add code in AEN path

2019-01-21 Thread Dan Carpenter
Hi Shivasharan, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Shivasharan-S/megaraid_sas-Rework-code-to-get-PD-and-LD-list/20190121-132655 New smatch warnings: drivers/scsi/megaraid/megaraid_sas_base.c:7919 megasas_update_device_list() error:

Re: [PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-17 Thread Dan Carpenter
On Thu, Jan 17, 2019 at 04:47:07PM +0800, Ching Huang wrote: > On Thu, 2019-01-17 at 10:59 +0300, Dan Carpenter wrote: > > On Thu, Jan 17, 2019 at 11:45:03AM +0800, Ching Huang wrote: > > > >From Ching Huang > > > > > > Fix suspend/resume of ACB_ADAPTER_T

Re: [PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-17 Thread Dan Carpenter
= 0; > + uint32_t i; > + for (i = 0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) { > + reg->post_qbuffer[i] = 0; > + reg->done_qbuffer[i] = 0; > + } Is this cause by patch 1 changing the zalloc to regular alloc?? If so then it should be folded into that patch instead of sent separately. regards, dan carpenter

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-27 Thread Dan Carpenter
If we really have other clear rules, then it should be encoded into get_maintainer.pl so that it's automatic. My other question is why do the linux-arm-ker...@lists.infradead.org people feel like they need to be CC'd about every driver??? I always remove them from the CC list unless it'

[PATCH] scsi: Fix a harmless double shift bug

2018-11-29 Thread Dan Carpenter
o not rely on blk-mq for double completions") Signed-off-by: Dan Carpenter --- include/scsi/scsi_cmnd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 3de905e205ce..d85e6befa26b 100644 --- a/include/scsi/scsi_cmnd

Re: [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload

2018-11-27 Thread Dan Carpenter
ck trace. To solve the problem > pvscsi_shutdown_intr has been moved out of pvscsi_release_resources. > > Signed-off-by: Cathy Avery > Reviewed-by: Ewan D. Milne That bug has been there since the driver was introduced in 2009. It's so amazing that no one has fixed it until now..

[PATCH] scsi: bnx2fc: Fix NULL dereference in error handling

2018-10-31 Thread Dan Carpenter
If "interface" is NULL then we can't release it and trying to will only lead to an Oops. Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface") Signed-off-by: Dan Carpenter --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- 1 file c

[bug report] SCSI/libiscsi: Add check_protection callback for transports

2018-10-24 Thread Dan Carpenter
case IB_SIG_BAD_APPTAG: 1149 return 0x2; 1150 } 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

Re: [PATCH] scsi: lpfc: Uninitialized variable in lpfc_debugfs_nodelist_data()

2018-10-22 Thread Dan Carpenter
On Mon, Oct 22, 2018 at 08:25:49AM +0100, James Bottomley wrote: > On Mon, 2018-10-22 at 09:50 +0300, Dan Carpenter wrote: > > There was a merge problem and we accidentally removed the "nrport" > > initialization. > > > > Fixes: 77c5bf5647b5 ("Merge branc

[PATCH] scsi: lpfc: Uninitialized variable in lpfc_debugfs_nodelist_data()

2018-10-21 Thread Dan Carpenter
There was a merge problem and we accidentally removed the "nrport" initialization. Fixes: 77c5bf5647b5 ("Merge branch 'misc' into for-next") Signed-off-by: Dan Carpenter --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 3/3] scsi: myrs: prevent negatives in disable_enclosure_messages_store()

2018-10-20 Thread Dan Carpenter
On Fri, Oct 19, 2018 at 12:19:09PM +0300, Dan Carpenter wrote: > We only want the value to be zero or one. > > It's not a big deal, but say we passed set value to INT_MIN, then > disable_enclosure_messages_show() would return that 12 bytes of "buf" > are initializ

[bug report] scsi: myrb: Add Mylex RAID controller (block interface)

2018-10-19 Thread Dan Carpenter
hw_sgl->sge_count = (u32)sg_dma_len(sgl); 1619 hw_sgl++; 1620 } 1621 } 1622 submit: 1623 spin_lock_irqsave(&cb->queue_lock, flags); regards, dan carpenter

[PATCH 3/3] scsi: myrs: prevent negatives in disable_enclosure_messages_store()

2018-10-19 Thread Dan Carpenter
fo leak warning when that happens. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter --- drivers/scsi/myrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 0

[PATCH 2/3] scsi: myrs: Fix the processor absent message in processor_show()

2018-10-19 Thread Dan Carpenter
If both processors are absent then it's supposed to print that, but instead we print that just the second processor is absent. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter --- drivers/scsi/myrs.c | 4 ++-- 1

[PATCH 1/3] scsi: myrs: Fix a logical vs bitwise bug

2018-10-19 Thread Dan Carpenter
The || was supposed to be |. The original code just sets ->result to 1. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter --- drivers/scsi/myrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[PATCH] scsi: qla2xxx: don't allow negative thresholds

2018-09-20 Thread Dan Carpenter
We shouldn't allow negative thresholds. I don't know what it would do but it can't be good. Fixes: 8b4673ba3a1b ("scsi: qla2xxx: Add support for ZIO6 interrupt threshold") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi

Re: [PATCH 4/6] qla2xxx_nvmet: Add FC-NVMe Target handling

2018-09-20 Thread Dan Carpenter
Hi Anil, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180916-090108 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next smatch warnings: drivers/scsi/qla2xxx/qla

[PATCH] scsi: qla2xxx: Fix an endian bug in fcpcmd_is_corrupted()

2018-09-08 Thread Dan Carpenter
We should first do the le16_to_cpu endian conversion and then apply the FCP_CMD_LENGTH_MASK mask. Fixes: 5f35509db179 ("qla2xxx: Terminate exchange if corrupted") Signed-off-by: Dan Carpenter --- I just happened to spot this when I was reviewing something unrelated. I don't have

[bug report] Linux-2.6.12-rc2

2018-08-28 Thread Dan Carpenter
/*flags*/0, &scb_data->sg_dmat) != 0) { 6461 goto error_exit; 6462 } regards, dan carpenter

[PATCH] scsi: aacraid: fix a signednes bug

2018-08-27 Thread Dan Carpenter
The problem is that ->reset_state is a u8 but it can be set to -1 or -2 in aac_tmf_callback() and the error handling in aac_eh_target_reset() relies on it to be signed. Fixes: 0d643ff3c353 ("scsi: aacraid: use aac_tmf_callback for reset fib") Signed-off-by: Dan Carpenter diff --

[PATCH] scsi: lpfc: remove an unnecessary NULL check

2018-08-23 Thread Dan Carpenter
Smatch complains about this code: drivers/scsi/lpfc/lpfc_scsi.c:1053 lpfc_get_scsi_buf_s4() warn: variable dereferenced before check 'lpfc_cmd' (see line 1039) Fortunately the NULL check isn't required so I have removed it. Signed-off-by: Dan Carpenter diff --git a/dr

[PATCH v2] scsi: aic94xx: fix an error code in aic94xx_init()

2018-08-08 Thread Dan Carpenter
We accidentally return success instead of -ENOMEM on this error path. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Signed-off-by: Dan Carpenter --- v2: return -ENOMEM instead of -ENODEV diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_in

Re: [PATCH] scsi: aic94xx: fix an error code in aic94xx_init()

2018-08-08 Thread Dan Carpenter
On Wed, Aug 08, 2018 at 03:16:57PM +0100, John Garry wrote: > On 08/08/2018 12:56, Dan Carpenter wrote: > > We accidentally return success instead of -ENODEV on this error path. > > Sorry to nitpick, but - as I see - the only way for > sas_domain_attach_transport() to fail is i

[PATCH] scsi: aic94xx: fix an error code in aic94xx_init()

2018-08-08 Thread Dan Carpenter
We accidentally return success instead of -ENODEV on this error path. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 80e5b283fd81..cb8191afc1dc 100644 ---

[bug report] scsi: qla2xxx: Migrate NVME N2N handling into state machine

2018-08-07 Thread Dan Carpenter
.els_plogi.els_resp_pyld_dma); 2645 sp->free(sp); 2646 } 2647 e->u.iosb.sp = sp; Dereference without checking 2648 qla2x00_post_work(vha, e); 2649 } regards, dan carpenter

[bug report] scsi: libfc: Add lockdep annotations

2018-07-12 Thread Dan Carpenter
NAB; 1858 rjt_data.explan = ELS_EXPL_INSUF_RES; 1859 goto reject; 1860 } regards, dan carpenter

[PATCH] scsi: qedi: tidy up a size caculation

2018-06-28 Thread Dan Carpenter
doesn't change runtime, but this is the more idiomatic way to do it and makes the static checker happy. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cf274a79e77a..682f3ce31014 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/driv

Re: [PATCH 2/3] tcmu: track nl commands

2018-06-23 Thread Dan Carpenter
Hi Mike, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Mike-Christie/tcmu-fix-hung-netlink-requests-during-restarts/20180622-115832 smatch warnings: drivers/target/target_core_user.c:301 tcmu_genl_cmd_done() warn: KERN_* level not at st

Re: qla2xxx and smatch warnings about uninitialized variables

2018-06-22 Thread Dan Carpenter
ings? > Or we could silence a lot of them by adding "qla8044_rd_reg_indirect 2" to the smatch_data/kernel.ignore_uninitialized_param file. regards, dan carpenter

[bug report] qedi: Add support for populating ethernet TLVs.

2018-06-22 Thread Dan Carpenter
;target[index].ipv6_addr.byte); 899 else 900 snprintf(tgt->ip_addr, IPV4_LEN, "%pI4\n", 901 block->target[index].ipv4_addr.byte); 902 } regards, dan carpenter

[bug report] csiostor:T5 Firmware fix and cleanup.

2018-06-20 Thread Dan Carpenter
cts which warning is printed. 2022 goto bye; 2023 regards, dan carpenter

Re: [PATCH] scsi: qlogicpti: Fix an error handling path in 'qpti_sbus_probe()'

2018-05-10 Thread Dan Carpenter
ot;) > > Fixes: 3d4253d9afab ("[SCSI] qlogicpti: Convert to new SBUS device > framework.") > Signed-off-by: Christophe JAILLET > --- > Please review carefully. This patch is proposed because it triggers one of > my coccinelle scripts. I'm not 100% sure if corre

[bug report] scsi: qlogicfas: move bus_reset to host_reset

2018-05-03 Thread Dan Carpenter
gicfas408_host_reset() doesn't take NULL pointers, it's just going to crash. 268 269 return 0; 270 } regards, dan carpenter

[PATCH] scsi: megaraid: silence a static checker bug

2018-05-03 Thread Dan Carpenter
If we had more than 32 megaraid cards then it would cause memory corruption. That's not likely, of course, but it's handy to enforce it and make the static checker happy. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 71

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-19 Thread Dan Carpenter
oc_seq_ops, sizeof(struct ccwdev_iter), > + NULL); > if (!entry) > return -ENOENT; > return 0; regards, dan carpenter

[PATCH v2] scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler()

2018-04-03 Thread Dan Carpenter
irmware so it's not going to overflow unless there is a firmware bug. Signed-off-by: Dan Carpenter --- v2: rebase, and re-write commit message diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 406e94312d4e..beb146b7c17c 100644 --- a/drivers/scsi/cxg

Re: [PATCH] scsi: cxgb4i: potential array overflow in t4_uld_rx_handler()

2018-03-28 Thread Dan Carpenter
On Wed, Mar 28, 2018 at 09:14:25PM +0530, Varun Prakash wrote: > On Wed, Mar 21, 2018 at 09:12:00PM -0400, Martin K. Petersen wrote: > > > > Varun: Please look at this. Thanks! > > > > > What happened to this one? > > > > > > regards, > > >

[PATCH] scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl

2018-03-21 Thread Dan Carpenter
Here is another use after free if we reset the card. The adpt_hba_reset() function frees "pHba" on error. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 3c667b23a801..359e0acfbc7c 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi

Re: [PATCH 1/2] scsi: dpt_i2o: use after free in adpt_release()

2018-03-20 Thread Dan Carpenter
Yeah. You're right. Thanks for catching that. regards, dan carpenter

[PATCH 2/2] scsi: dpt_i2o: use after free in __adpt_reset()

2018-03-19 Thread Dan Carpenter
In __adpt_reset() the problem is that adpt_hba_reset() frees "pHba" on error but we dereference it to print the name in the error message. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 3c667b23a801..ac2f40d9963b 100644 --- a/dr

[PATCH 1/2] scsi: dpt_i2o: use after free in adpt_release()

2018-03-19 Thread Dan Carpenter
The scsi_host_put() function frees "pHba" and then we dereference it on the next line when we do "scsi_host_put(pHba->host);". Fixes: 38e09e3bb056 ("scsi: dpt_i2o: stop using scsi_unregister") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/dpt_i2o

Re: [PATCH] scsi: cxgb4i: potential array overflow in t4_uld_rx_handler()

2018-03-15 Thread Dan Carpenter
What happened to this one? regards, dan carpenter On Wed, Nov 29, 2017 at 02:42:20PM +0300, Dan Carpenter wrote: > The story is that Smatch marks skb->data as untrusted and so it > complains about this code: > > drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:2111 t4_uld_rx_handler(

[bug report] scsi: lpfc: Add WQ Full Logic for NVME Target

2018-03-07 Thread Dan Carpenter
xp, ctxp->sid, 917 ctxp->oxid); 918 else 919 lpfc_nvmet_sol_fcp_issue_abort(phba, ctxp, ctxp->sid, 920 ctxp->oxid); 921 spin_unlock_irqrestore(&ctxp->ctxlock, flags); 922 } regards, dan carpenter

Re: [0/8] target-iSCSI: Adjustments for several function implementations

2018-02-23 Thread Dan Carpenter
87796ac31b04e81ee95e155e9043132#n751 > > static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) > { > return &tfm->base; > } Yes. It's not a dereference, it's just doing pointer math to get the address. regards, dan carpenter

[PATCH 2/2] scsi: myrs: bitwise vs logical OR typo

2018-02-20 Thread Dan Carpenter
We accidentally used a logical || instead of a | so these bit masks are off. Fixes: 8a8606895947 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index eaa9d143a282..db3c84fc3a29 100644 ---

[PATCH 1/2] scsi: myrs: cleanup myrs_store_suppress_enclosure_messages()

2018-02-20 Thread Dan Carpenter
This code causes a static checker because we have an upper bound on "value" but not a lower bound. In other words "value" can be s32min-2. It's harmless but really it should just be bool. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/myrs.c b/drivers/scsi/

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

2018-02-14 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 Reviewed-by: Hannes Reinecke --- I was reviewing buffer overflow static checker warnings

[bug report] scsi: myrs: Add Mylex RAID controller (SCSI interface)

2018-02-13 Thread Dan Carpenter
^^^^ And I guess this is where we set cs->next_evseq. 2247 interval = 1; 2248 } 2249 } regards, dan carpenter

[PATCH] mptfusion: Add bounds check in mptctl_hp_targetinfo()

2018-01-25 Thread Dan Carpenter
My static checker complains about an out of bounds read: drivers/message/fusion/mptctl.c:2786 mptctl_hp_targetinfo() error: buffer overflow 'hd->sel_timeout' 255 <= u32max. It's true that we probably should have a bounds check here. Signed-off-by: Dan Carpenter

[PATCH] [SCSI] sym53c8xx_2: iterator underflow in sym_getsync()

2018-01-25 Thread Dan Carpenter
We wanted to exit the loop with "div" set to zero, but instead, if we don't hit the break then "div" is -1 when we finish the loop. It leads to an array underflow a few lines later. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b

[PATCH] scsi: storvsc: missing error code in storvsc_probe()

2018-01-16 Thread Dan Carpenter
We should set the error code if fc_remote_port_add() fails. Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3b3d1d050cac..40fc7a590e81 100644 --- a/drivers/scsi/sto

[bug report] scsi: qla2xxx: Fix NULL pointer access for fcport structure

2018-01-09 Thread Dan Carpenter
t->vha, &ea); ^^^ But there is an unchecked NULL dereference here. 131 break; 132 case SRB_LOGOUT_CMD: regards, dan carpenter

[bug report] scsi: qla2xxx: Fix memory leak in dual/target mode

2017-12-14 Thread Dan Carpenter
1 } 602 qla25xx_free_rsp_que(vha, rsp); ^^^ 603 604 return ret; regards, dan carpenter regards, dan carpenter

[bug report] scsi: lpfc: Correct driver deregistrations with host nvme transport

2017-12-14 Thread Dan Carpenter
/* Clear the XBUSY flag to prevent double completions. 971 * The nvme rport is getting unregistered and there is regards, dan carpenter

[bug report] scsi: arcmsr: Add a function to set date and time to firmware

2017-12-09 Thread Dan Carpenter
cs = secs - 86400 * days; 3682 if (secs < 0) { Not possible. 3683 days = days - 1; 3684 secs = secs + 86400; 3685 } 3686 j = days / 146097; regards, dan carpenter

[PATCH] scsi: cxgb4i: potential array overflow in t4_uld_rx_handler()

2017-11-29 Thread Dan Carpenter
a reasonable warning message. Let's address it by adding a sanity check to make sure "opc" is within bounds. Fixes: bbc02c7e9d34 ("cxgb4: Add register, message, and FW definitions") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers

Re: [PATCH 0/3] scsi: arcmsr: add driver module parameter - msi_enable, msix_enable

2017-11-24 Thread Dan Carpenter
an option called "msi_enable" which is used to disable MSI interrupts "if it does not work properly". Why is the current code not working properly? Is there a crash or a performance issue? What does the bug in the current code look like from a user perspective? Can you send us a dmesg from a failing system? regards, dan carpenter

Re: [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable

2017-11-23 Thread Dan Carpenter
tiful, but I can't actually apply this patch? Which tree is this written against? I'm using linux-next. regards, dan carpenter

Re: [PATCH 1/3] scsi: arcmsr: Add driver module parameter msi_enable

2017-11-23 Thread Dan Carpenter
nless you toggle the module param. It's a regression. > > + if (msi_enable == 1) > + pr_info("arcmsr%d: msi enabled\n", acb->host->host_no); This printk could be improved. Use dev_info(&pdev->dev, for a start. I know that the other prints don't use this, but we could use it one time then slowly add more users until more are using dev_info() than pr_info() and then someone will decide to clean up the old users. regards, dan carpenter

[PATCH] scsi: lpfc: Use after free in lpfc_rq_buf_free()

2017-11-22 Thread Dan Carpenter
The error message dereferences "rqb_entry" so we need to print it first and then free the buffer. Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/lpfc/lpfc_mem.c

Re: [PATCH 4/4] qla2xxx_nvmet: Add FC-NVMe Target handling

2017-11-13 Thread Dan Carpenter
[ Ha ha. The kbuild-bot automatically inserts complimentary things that "I love your patch." In fact, I have not looked at your patch at all, I'm just forwarding this email from a robot after glancing at the code. - dan carpenter ] Hi Anil, I love your patch! Perha

[PATCH 2/2] tcmu: Add a missing unlock on an error path

2017-11-08 Thread Dan Carpenter
We added a new error path here but we forgot to drop the lock first before returning. Fixes: 0d44374c1aae ("tcmu: fix double se_cmd completion") Signed-off-by: Dan Carpenter diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 07f2d95f7ae7..cc

[PATCH 1/2] tcmu: Fix some memory corruption

2017-11-08 Thread Dan Carpenter
"udev->nl_reply_supported" is an int but on 64 bit arches we are writing 8 bytes of data to it so it corrupts four bytes beyond the end of the struct. Fixes: b849b4567549 ("target: Add netlink command reply supported option for each device") Signed-off-by: Dan Carpenter

[patch 2/2] scsi: mpt3sas: remove a stray KERN_INFO

2017-11-08 Thread Dan Carpenter
pr_info() has a KERN_INFO already so the second KERN_INFO isn't needed. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 3a9438a1704e..b258f210120a 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers

[PATCH 1/2] scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event()

2017-11-08 Thread Dan Carpenter
as: Handle NVMe PCIe device related events generated from firmware.") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 3a9438a1704e..93b45e618edb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/

Re: [bug report] scsi: mpt3sas: Added support for nvme encapsulated request message.

2017-11-08 Thread Dan Carpenter
a 4 byte array, but it's clearly not. You're saying it's supposed to be a single dword array but why??? Is there something special and mandatory stored in the first 4 bytes? Why can't it just be a zero size array? It would help if there were at least a comment or something. regards, dan carpenter

  1   2   3   4   5   >