VHOST_SCSI_MAX_TARGET (256) elements so
anything higher than 255 then it is invalid. I have made that the limit
now.
In vhost_scsi_send_evt() we mask away values higher than 255, but now
that the limit has changed, we don't need the mask.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Compile tested
*tmp_tddb;
+ struct ql4_tuple_ddb *fw_tddb = vzalloc(sizeof(*fw_tddb));
Don't do allocations in the initializers. Same for patches 3 and 4 as
well.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord
On Sat, Feb 07, 2015 at 11:11:03AM +0100, Julia Lawall wrote:
On Sat, 7 Feb 2015, Dan Carpenter wrote:
On Fri, Feb 06, 2015 at 11:15:13PM +0100, SF Markus Elfring wrote:
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 2a00fd3..a7ca479 100644
If hba_setup_cid_tbls() fails then this code should return an error code
but instead the current code returns zero (success).
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index f319340..fe59ae6 100644
If device_add() fails then it should return the error code but instead
the current code returns success.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ebf35cb6..75a0b55 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
If kthread_create() fails then this should return an error code but the
current code returns zero instead.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 3e6b866..586f72b 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi
= pmcraid_abort_cmd(cmd);
^^
This will Oops because cmd-scsi_cmd is NULL.
3861 spin_unlock_irqrestore(pinstance-host-host_lock,
lock_flags);
3862
3863 if (cancel_cmd) {
regards,
dan carpenter
to happen in
padding and thus the overflow is not harmful. But it costs us nothing
to fix this and it silences a static checker warning.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 251598e..a5d7464 100644
--- a/drivers/scsi
push the Smatch
change later this week. It requires the cross function database to
trigger this warning.
9039 return -ENOMEM;
9040 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord
This is harmless because we do the same thing either way but, from the
indenting, then it seems like lpfc_destroy_vport_work_array() was meant
to be inside the if statement.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
The static checker complains about some of the other indents
From the indenting, it looks like curly braces were intended here.
Fixes: dcd998ccdbf7 ('tcm_fc: Handle DDP/SW fc_frame_payload_get failures in
ft_recv_write_data')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
There are several missing curly braces so this function doesn't work as
intended.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 315d6d6..59c3492 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa
to use kbuff_arr[] again so we don't
need to set it to NULL.
I have deleted that line of code.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 890637f..834bfc0 100644
--- a/drivers/scsi
can't be NULL so we should probably just delete the check.
Anyway, I was looking at old csiostor bugs in my in box and this one
from last November is more serious.
On Wed, Apr 16, 2014 at 06:37:16PM +0300, Dan Carpenter wrote:
Naresh's email is dead.
regards,
dan carpenter
On Wed, Apr 16, 2014
m_sg-baseaddr_h is a u32. We shift it 32 bits before casting it to
dma_addr_t so the cast is too late.
Fixes: f0c568a478f0 ('[SCSI] mvumi: Add Marvell UMI driver')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 3e6b866
].dataptr,
isa_page_to_bus(sg_page(sg))
459 +
sg-offset);
460 any2scsi(cptr[i].datalen, sg-length);
461 };
regards,
dan carpenter
--
To unsubscribe from this list: send the line
have to get very unlucky for this to
deadlock.
Should I just change that to GFP_ATOMIC?
The other option is to do the allocation before taking the lock. That
looks do-able. You are the expert here by virtue of you touched to code
last. So you get to decide. :)
regards,
dan carpenter
On Fri, Apr 24, 2015 at 04:33:55PM -0700, K. Y. Srinivasan wrote:
Set the SRB flags correctly when there is no data transfer.
What are the user visible effects of this bug? We transfer bogus data?
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-scsi
.
9370 */
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
I almost accidentally sent this one again. I still think it's correct.
regards,
dan carpenter
On Mon, Jan 19, 2015 at 05:41:12PM +0300, Dan Carpenter wrote:
If device_add() fails then it should return the error code but instead
the current code returns success.
Signed-off-by: Dan Carpenter
We should return -ENOMEM if kzalloc() fails here instead of returning
success.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 2e66f34..622bdab 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers
are not printed. But just remove them. They
make the code uglier.
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
On Wed, Apr 08, 2015 at 02:38:32PM +0300, Dan Carpenter wrote:
1) We can't apply this patch on its own so this way of breaking up the
patches doesn't work.
The right thing is to do add an attach_ret().
static int do_attach(drv)
{
if (drv-attach_ret)
return drv
also see
your point. Hm...
Minor comment: No need to preserve the error code if there are lots
which we miss. We may as well hard code an error code. But that's a
minor thing. Does this actually simplify the driver code? That's the
more important thing.
regards,
dan carpenter
On Wed, Apr 08, 2015 at 05:20:10PM +0530, Sudip Mukherjee wrote:
On Wed, Apr 08, 2015 at 02:38:32PM +0300, Dan Carpenter wrote:
1) We can't apply this patch on its own so this way of breaking up the
patches doesn't work.
yes, if the first patch is reverted for any reason all the others need
:
4383 kfree(ioctl_data);
4384 kfree(desc);
4385 out:
4386 return err;
4387 }
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
The string cmd %d RESET FAILED, new lockup detected is not quite
large enough so the sprintf() will overflow. I have increased the size
of the buffer and also changed the sprintf calls to snprintf.
Fixes: 73153fe533bc ('hpsa: use block layer tag for command allocation')
Signed-off-by: Dan
be aware that Markus auto generates his patches and he
doesn't even do a cursory review.
I find it acceptable that some of my update suggestions do not fit
to your quality expectations at the moment. -- Markus Elfring
(https://lkml.org/lkml/2015/1/22/446)
regards,
dan carpenter
--
To unsubscribe
think.
But either way, we both agree that 48 is probably safe.
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
to post these three patches linux-scsi.
Is that correct?
Yes. That's right.
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
(beacon-lcb_type != LPFC_LCB_AMBER)) {
Also:
drivers/scsi/lpfc/lpfc_els.c:5261 lpfc_els_rcv_lcb()
warn: possible memory leak of 'lcb_context'
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord
, FAILURE);
2311 }
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
rdata-pnode = NULL;
Unchecked dereference.
3906 /* drop reference for earlier registeration */
3907 put_device(rport-dev);
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe
you take a look at the other goto cleanup; places in this
function and maybe add a comment, change it to something more clear like
return 0; or fix the error code?
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord
On Fri, May 29, 2015 at 01:29:14PM -0700, K. Y. Srinivasan wrote:
From: keith.ma...@microsoft.com keith.ma...@microsoft.com
Keith's name is wrong.
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
integer overflows.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
During my QC process, I realized that I sent a similar patch last year,
but never received a response.
http://permalink.gmane.org/gmane.linux.kernel.janitors/32590
Looking at both of them, I guess I prefer today's patch
port_sel is a u64 so the shifting should also be a 64 bit shift.
Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 0720d2f..f97421d 100644
We recently did some cleanup here and now the static checkers notice
that there is a missing error code when ioremap() fails. Let's set it
to -ENOMEM.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c
b/drivers/scsi/aic94xx/aic94xx_init.c
These casts are wrong and unnecessary. They annoy static checkers
because they imply we are planning to write sizeof(long) bytes to a
sizeof(u32) buffer which would corrupt memory.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi
On Mon, Aug 17, 2015 at 09:45:45PM -0700, Bart Van Assche wrote:
On 08/17/2015 07:36 AM, Dan Carpenter wrote:
These casts are wrong and unnecessary. They annoy static checkers
because they imply we are planning to write sizeof(long) bytes to a
sizeof(u32) buffer which would corrupt memory
Ping?
regards,
dan carpenter
On Fri, Jul 03, 2015 at 11:53:03AM +0300, Dan Carpenter wrote:
These are signed values the come from the user, we put a cap on the
upper bounds but not on the lower bounds.
We use karg.dataSgeOffset to calculate sz. We verify sz and
proceed as if that means
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
---
Someone reported in 2003 that probe has a NULL deref so maybe
object on that
id.
It's in Greg's char-misc-next tree. I like to have the commit id so I
can look at buggy patches.
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
The should be = or we read one element past the end of the array.
Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter')
diff --git a/drivers/scsi
);
}
Remove the curly braces. And below as well.
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
just check
for it and return NULL.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index fc73937..02b5f69 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1038,6 +1038,10 @@ kbuf_alloc
gned-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 6a8f958..a386036 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
if ((rc != 0) |
The indenting indicates that there are supposed to be some curly braces
here. Presumably it means we free something unintentionally leading to
a use after free.
Fixes: 3761cb4cf65e ('megaraid_sas: JBOD sequence number support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.
One line was indented more than the others.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
b/drivers/scsi/megaraid/megaraid_sas_base.c
index cc95372..829e9e9 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/driver
James, could you take a look at this? My patch was really incomplete
and even the bits that I wrote were buggy... :/ This might be easier
for someone who is familiar with the code and can say what the expected
ranges are etc.
regards,
dan carpenter
--
To unsubscribe from this list: send
The "len << 2" operation can have an integer overflow and leading to a
kernel crash. This is debugfs and thus root only so no one really
cares, but we should fix it anyway just to make the static checker
happy.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
dif
r instead of the
end of the buffer (desc_ptr + 4). Let's tighten that up as well.
Reported-by: "Berry Cheng 程君(成淼)" <chengmiao...@alibaba-inc.com>
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index dcb0d76..ff474c7 100
If thre aren't any components, then the component[0] is beyond the end
of the array.
Reported-by: "Berry Cheng 程君(成淼)" <chengmiao...@alibaba-inc.com>
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index f
Thanks Berry,
James, the first two issues are SCSI things. I'm sending patches for
them but I can't test them myself. Especially, I'm not positive that
[patch 2/2] ses: invalid free in ses_intf_remove_enclosure() is a
complete fix. Berry, would it be possible to test that one?
regards,
dan
We test that "type_ptr" is within the buffer but then we read from
"type_ptr[3]" so we could be reading beyond the end of the buffer.
Reported-by: "Berry Cheng 程君(成淼)" <chengmiao...@alibaba-inc.com>
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
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
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
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.
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
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
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...@
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
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
>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
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
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
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
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
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
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
_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
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
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
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.
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
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
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
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
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
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
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
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
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
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...@
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);
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
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-
ILLEGAL_REQUEST, 0x10,
ascq);
856 scsi_set_sense_information(sc->sense_buffer,
857
SCSI_SENSE_BUFFERSIZE,
858 sector);
859 goto out
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
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
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
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
}
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
"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
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
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
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.
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
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
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
1 - 100 of 407 matches
Mail list logo