Re: [PATCH 1/1] dpt_i2o: delete unnecessary null test on array

2014-08-08 Thread walter harms
Am 06.08.2014 12:39, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Delete NULL test on array (always false). A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r@ type T; T [] e; position p; @@

Re: [patch] mpt2sas: issue reset is not uninitialized

2014-12-03 Thread walter harms
Am 03.12.2014 11:09, schrieb Dan Carpenter: The issue_reset variables were never set to zero. This bug was found with static analysis. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index

Re: [patch] target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()

2012-10-02 Thread walter harms
Am 02.10.2012 10:22, schrieb Dan Carpenter: Clang warns about this bug: drivers/target/iscsi/iscsi_target_erl0.c:52:45: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses] Signed-off-by: Dan Carpenter dan.carpen...@oracle.com ---

Re: [patch] target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()

2012-10-03 Thread walter harms
Am 02.10.2012 22:30, schrieb Nicholas A. Bellinger: On Tue, 2012-10-02 at 11:22 +0300, Dan Carpenter wrote: Clang warns about this bug: drivers/target/iscsi/iscsi_target_erl0.c:52:45: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]

Re: [patch] [SCSI] libosd: check for kzalloc() failure

2013-01-30 Thread walter harms
Am 30.01.2013 08:06, schrieb Dan Carpenter: There wasn't any error handling for this kzalloc(). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index c06b8e5..d8293f2 100644 ---

Re: [patch] [SCSI] libosd: check for kzalloc() failure

2013-01-30 Thread walter harms
Am 30.01.2013 10:51, schrieb Benny Halevy: On Wed, Jan 30, 2013 at 10:57 AM, walter harms wha...@bfs.de wrote: Am 30.01.2013 09:27, schrieb Dan Carpenter: On Wed, Jan 30, 2013 at 09:15:43AM +0100, walter harms wrote: Am 30.01.2013 08:06, schrieb Dan Carpenter: There wasn't any error

Re: [patch] [SCSI] libosd: check for kzalloc() failure

2013-01-30 Thread walter harms
Am 30.01.2013 14:40, schrieb Benny Halevy: On Wed, Jan 30, 2013 at 3:00 PM, walter harms wha...@bfs.de wrote: Am 30.01.2013 10:51, schrieb Benny Halevy: On Wed, Jan 30, 2013 at 10:57 AM, walter harms wha...@bfs.de wrote: Am 30.01.2013 09:27, schrieb Dan Carpenter: On Wed, Jan 30, 2013

Re: [patch] hpsa: fix an sprintf() overflow in the reset handler

2015-06-04 Thread walter harms
Am 04.06.2015 16:47, schrieb Dan Carpenter: 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

Re: [PATCH v2] aic7xxx: replace kmalloc/strcpy by kstrdup

2015-07-14 Thread walter harms
Am 14.07.2015 12:07, schrieb Hannes Reinecke: On 07/14/2015 12:02 PM, Christophe JAILLET wrote: This replaces kmalloc + strcpy by an equivalent call to kstrdup. Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr --- v2: remove useless curly braces

Re: [PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()

2015-12-12 Thread walter harms
Am 12.12.2015 15:45, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Sat, 12 Dec 2015 15:04:57 +0100 > > The variable "acceptor_values" and "proposer_values" were initialized > by null pointers and immediately assigned values from input parameters > by

Re: [patch] bfa: clean up some bounds checking

2016-06-16 Thread walter harms
Am 16.06.2016 12:44, schrieb Dan Carpenter: > This code is supposed to search ->adapter_hwpath[] and replace the > second colon with a NUL character. Unfortunately, the boundary checks > that ensure we don't go beyond the end of the buffer have a couple > problems. > > Imagine that the string

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

2017-02-07 Thread walter harms
Am 07.02.2017 14:01, schrieb Dan Carpenter: > The problem here is this: > > sprintf(host_buf, "qedi_ofld%d", qedi->shost->host_no); > > host_buf is 16 character so we only have 6 characters left for > ->host_no. But ->host_no is set in scsi_host_alloc(): > > index =

Re: [PATCH] scsi: pm8001: build in relevant functions and code on PM8001_USE_MSIX

2017-03-23 Thread walter harms
Am 22.03.2017 19:50, schrieb Colin King: > From: Colin Ian King > > Currently the misx and intx variables of the interrupt enable/disable > helper functions are built in no matter what the setting of the > macro PM8001_USE_MSIX. Clean this up by just building in the

Re: [PATCH] scsi: mpt3sas: Fix memory allocation failure test in 'mpt3sas_base_attach()'

2017-08-07 Thread walter harms
Am 07.08.2017 00:51, schrieb Christophe JAILLET: > In the lines above this test, 8 'kzalloc' are performed, but only 7 results > are tested. > > Add the missing one (i.e. '!ioc->port_enable_cmds.reply'). > > Signed-off-by: Christophe JAILLET > --- >

Re: [PATCH] scsi: aacraid: fix leak of data from stack back to userspace

2017-05-15 Thread walter harms
Am 15.05.2017 16:56, schrieb Colin King: > From: Colin Ian King > > The fields sense_data_size and sense_data are unitialized garbage from > the stack and are being copied back to userspace. Fix this leak of > stack information by ensuring they are zero'd. > >

Re: [PATCH RESEND] Eliminate extra 'out_free' label from fcoe_init function

2017-06-02 Thread walter harms
Am 02.06.2017 14:39, schrieb Milan P. Gandhi: > Simplify the check for return code of fcoe_if_init routine > in fcoe_init function such that we could eliminate need for > extra 'out_free' label and duplicate mutex_unlock statement. > > Signed-off-by: Milan P. Gandhi > --- >

Re: [PATCH 1/2] scsi: qedi: Fix a return value in case of error in 'qedi_alloc_global_queues'

2017-06-11 Thread walter harms
Am 11.06.2017 08:40, schrieb Christophe JAILLET: > We should return -ENOMEM in case of memory allocation error, as done > elsewhere in this function. > > Fixes: ace7f46ba5fde ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver > framework.") > Signed-off-by: Christophe JAILLET

Re: [PATCH 1/3] scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues'

2017-06-11 Thread walter harms
Am 11.06.2017 08:16, schrieb Christophe JAILLET: > We should return -ENOMEM in case of memory allocation error, as done > elsewhere in this function. > > Fixes: 61d8658b4a435 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver > framework.") > Signed-off-by: Christophe JAILLET

Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0

2017-12-15 Thread walter harms
Am 09.12.2017 01:34, schrieb Colin King: > From: Colin Ian King > > The check for secs being less than zero is redundant for two reasons. > Firstly, secs is unsigned so the check is always going to be false. > Secondly, if secs was signed the proceeding calculation of