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

2019-04-09 Thread walter harms
Am 09.04.2019 15:38, schrieb Colin King: > From: Colin Ian King > > The error return path via label rel_resource checks for a non-null > skb before free'ing it. However, skb is always null at this exit > path, so the null check and the free are redundant and can be removed. > Removing this al

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

2019-02-16 Thread Walter Harms
Am 16.02.2019 15:44, schrieb Colin King: > From: Colin Ian King > > Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being shifted by a > total of 32 bits; this always produces a 0 result. Fix this by casting > it to a dma_addr_t (a 64 bit unsigned int) before performing the shift. > > Det

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 secs is > never going to b

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 > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 8 +++

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 > --- > driv

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 > --- > drive

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 > --- > drivers/scsi/fcoe/f

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. > > Detected by CoverityScan, CID#14

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 > necessary helper function

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 = ida_simple_get

Re: [PATCH] scsi_dh_emc: fix uninitialized return value ret

2017-01-31 Thread walter harms
Am 31.01.2017 13:22, schrieb Colin King: > From: Colin Ian King > > ret is uninitialized on a successful execution of clarrion_std_inquiry > and a garbage return value is being returted. Fix this by setting ret > to zero on the success exit path. > > Found by CoverityScan, CID#1398889 ("Unini

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 h

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 separate statements. > Let us ex

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 >> --- >> v2: remove useless curly braces >> >> drivers/scsi/aic7xxx/aic79xx_osm.c | 6 ++

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 lay

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 > > diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c > b/drivers/scsi/mpt2sas/mpt2sas_base.c > index 58e4521..98bd546 10

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 > > 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/) > > // > @r@ > type T; > T [] e; > position p; > @@ > e ==@p NULL

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 wrote: >> >> >> Am 30.01.2013 10:51, schrieb Benny Halevy: >>> On Wed, Jan 30, 2013 at 10:57 AM, walter harms wrote: >>>> >>>> >>>> Am 3

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 wrote: >> >> >> Am 30.01.2013 09:27, schrieb Dan Carpenter: >>> On Wed, Jan 30, 2013 at 09:15:43AM +0100, walter harms wrote: >>>> >>>> >>>&

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

2013-01-30 Thread walter harms
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 handling for this kzalloc(). >>> >>> Signed-off-by:

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 > > diff --git a/drivers/scsi/osd/osd_initiator.c > b/drivers/scsi/osd/osd_initiator.c > index c06b8e5..d8293f2 100644 > --- a/drivers/scsi/osd/osd_initiator.c >

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 >> [-Wpare

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 > --- > Please review th