re: phy: nxp-c45: add driver for tja1103

2021-04-20 Thread Colin Ian King
Hi, Static analysis with Coverity on linux-next has found a potential issue in drivers/net/phy/nxp-c45-tja11xx.c, function nxp_c45_get_phase_shift. The analysis by Coverity is as follows: 350 static u64 nxp_c45_get_phase_shift(u64 phase_offset_raw) 351 { 352/* The delay in degree phase is

Re: [PATCH][next] can: etas_es58x: Fix potential null pointer dereference on pointer cf

2021-04-15 Thread Colin Ian King
On 15/04/2021 10:03, Marc Kleine-Budde wrote: > On 15.04.2021 09:55:35, Colin King wrote: >> From: Colin Ian King >> >> The pointer cf is being null checked earlier in the code, however the >> update of the rx_bytes statistics is dereferencing cf without null >>

net: sxgbe: issue with incorrect masking / case values in switch statements

2021-04-09 Thread Colin Ian King
Hi, Static analysis with Coverity has found an issue with the sxgbe driver in drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c from the following commit: commit 1edb9ca69e8a7988900fc0283e10550b5592164d Author: Siva Reddy Date: Tue Mar 25 12:10:54 2014 -0700 net: sxgbe: add basic framework f

cnic: issue with double assignment to ictx->xstorm_st_context.common.flags

2021-04-09 Thread Colin Ian King
Hi, Analysis of linux with Coverity has detected an issue with the assignment of ictx->xstorm_st_context.common.fla in drivers/net/ethernet/broadcom/cnic.c in function cnic_setup_bnx2x_ctx. This was introduced a while back with the following commit: commit 619c5cb6885b936c44ae1422ef805b69c629148

Re: [PATCH][next] mlxsw: spectrum_router: remove redundant initialization of variable force

2021-04-09 Thread Colin Ian King
On 29/03/2021 08:13, Ido Schimmel wrote: > On Sat, Mar 27, 2021 at 10:33:34PM +, Colin King wrote: >> From: Colin Ian King >> >> The variable force is being initialized with a value that is >> never read and it is being updated later with a new value. The >>

Re: [PATCH net] net: mscc: ocelot: properly reject destination IP keys in VCAP IS1

2021-03-04 Thread Colin Ian King
ractice, due to > the fact that it operates on an uninitialized "match" variable. We must > first decode the keys from the flow rule. > > Fixes: 75944fda1dfe ("net: mscc: ocelot: offload ingress skbedit and vlan > actions to VCAP IS1") > Reported-by: Colin Ian Kin

net: mscc: ocelot: issue with uninitialized pointer read in ocelot_flower_parse_key

2021-03-04 Thread Colin Ian King
Hi, Static analysis with Coverity had detected an uninitialized pointer read in function ocelot_flower_parse_key in drivers/net/ethernet/mscc/ocelot_flower.c introduced by commit: commit 75944fda1dfe836fdd406bef6cb3cc8a80f7af83 Author: Xiaoliang Yang Date: Fri Oct 2 15:02:23 2020 +0300 ne

re: octeontx2-af: cn10k: MAC internal loopback support

2021-02-15 Thread Colin Ian King
Hi, Static analysis on linux-next today using Coverity found an issue in the following commit: commit 3ad3f8f93c81f81d6e28b2e286b03669cc1fb3b0 Author: Hariprasad Kelam Date: Thu Feb 11 21:28:34 2021 +0530 octeontx2-af: cn10k: MAC internal loopback support The analysis is as follows: 723

re: mt76: mt7921: add MCU support

2021-02-10 Thread Colin Ian King
Hi, Static analysis with Coverity on linux-next has found an issue with the following commit: commit 1c099ab44727c8e42fe4de4d91b53cec3ef02860 Author: Sean Wang Date: Thu Jan 28 03:33:39 2021 +0800 mt76: mt7921: add MCU support The analysis is as follows: 390 static void 391 mt7921_mcu_t

Potential invalid ~ operator in net/mac80211/cfg.c

2021-02-05 Thread Colin Ian King
Hi there, while working through a backlog of older static analysis reports from Coverity I found an interesting use of the ~ operator that looks incorrect to me in function ieee80211_set_bitrate_mask(): for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) { if (

Re: Potential invalid ~ operator in net/mac80211/cfg.c

2021-02-05 Thread Colin Ian King
On 05/02/2021 18:19, Colin Ian King wrote: > On 05/02/2021 18:05, Johannes Berg wrote: >> Hi Colin, >> >>> while working through a backlog of older static analysis reports from >>> Coverity >> >> So ... yeah. Every time I look at Coverity (not frequentl

Re: Potential invalid ~ operator in net/mac80211/cfg.c

2021-02-05 Thread Colin Ian King
On 05/02/2021 18:05, Johannes Berg wrote: > Hi Colin, > >> while working through a backlog of older static analysis reports from >> Coverity > > So ... yeah. Every time I look at Coverity (not frequently, I must > admit) I see the same thing, and get confused. > >> I found an interesting use of

re: GTP: add support for flow based tunneling API

2021-01-18 Thread Colin Ian King
Hi, Static analysis of today's linux-next using Coverity has found a potential memory leak issue in the following commit: commit 9ab7e76aefc97a9aa664accb59d6e8dc5e52514a Author: Pravin B Shelar Date: Sat Jan 9 23:00:21 2021 -0800 GTP: add support for flow based tunneling API The analysis

NAK: [PATCH] wilc1000: fix spelling mistake in Kconfig "devision" -> "division"

2020-12-16 Thread Colin Ian King
On 16/12/2020 11:54, Colin King wrote: > From: Colin Ian King > > There is a spelling mistake in the Kconfig help text. Fix it. > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/ni/Kconfig | 2 +- > drivers/net/wireless/microchip/wilc1000/K

Re: [PATCH][next] seg6: fix unintentional integer overflow on left shift

2020-12-07 Thread Colin Ian King
On 07/12/2020 19:59, Andrea Mayer wrote: > On Mon, 7 Dec 2020 14:45:03 + > Colin King wrote: > >> From: Colin Ian King >> >> Shifting the integer value 1 is evaluated using 32-bit arithmetic >> and then used in an expression that expects a unsigned l

Re: [PATCH][next] mptcp: fix a dereference of pointer before msk is null checked.

2020-11-11 Thread Colin Ian King
On 11/11/2020 18:49, Mat Martineau wrote: > On Mon, 9 Nov 2020, Colin King wrote: > >> From: Colin Ian King >> >> Currently the assignment of pointer net from the sock_net(sk) call >> is potentially dereferencing a null pointer sk. sk points to the >> sam

Re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
On 09/11/2020 13:59, Kurt Kanzenbach wrote: > Hi Colin, > > On Mon Nov 09 2020, Colin Ian King wrote: >> Hi >> >> Static analysis on linux-next with Coverity has detected a potential >> null pointer dereference issue on the following commit: >> >> co

re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
Hi Static analysis on linux-next with Coverity has detected a potential null pointer dereference issue on the following commit: commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 Author: Kamil Alkhouri Date: Tue Nov 3 08:10:58 2020 +0100 net: dsa: hellcreek: Add support for hardware timestam

re: net/mlx5: Refactor tc flow attributes structure

2020-09-28 Thread Colin Ian King
Hi, static analysis with Coverity has found a null pointer dereference issue with the following commit: commit c620b772152b8274031083bdb2e11c963e596c5c Author: Ariel Levkovich Date: Thu Apr 30 05:54:08 2020 +0300 net/mlx5: Refactor tc flow attributes structure The analysis is as follows:

re: ath11k: initialize wmi config based on hw_params

2020-08-19 Thread Colin Ian King
Hi, static analysis with Coverity has detected a duplicated assignment issue with the following commit: commit 2d4bcbed5b7d53e19fc158885e7340b464b64507 Author: Carl Huang Date: Mon Aug 17 13:31:51 2020 +0300 ath11k: initialize wmi config based on hw_params The analysis is as follows:

re: net: dsa: sja1105: use detected device id instead of DT one on mismatch

2020-08-06 Thread Colin Ian King
Hi, Static analysis with Coverity has detected a potential issue with the following commit: commit 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d Author: Vladimir Oltean Date: Mon Aug 3 19:48:23 2020 +0300 net: dsa: sja1105: use detected device id instead of DT one on mismatch The analysis is

ACK: [PATCH net] selftests/net: relax cpu affinity requirement in msg_zerocopy test

2020-08-05 Thread Colin Ian King
> interpreting the data. > > Fixes: 07b65c5b31ce ("test: add msg_zerocopy test") > Reported-by: Colin Ian King > Signed-off-by: Willem de Bruijn > --- > tools/testing/selftests/net/msg_zerocopy.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >

Re: [PATCH] selftests/net: skip msg_zerocopy test if we have less than 4 CPUs

2020-08-05 Thread Colin Ian King
On 05/08/2020 09:44, Willem de Bruijn wrote: > On Wed, Aug 5, 2020 at 10:22 AM Colin Ian King > wrote: >> >> On 05/08/2020 09:06, Willem de Bruijn wrote: >>> On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet wrote: >>>> >>>> >>>> >&

Re: [PATCH] selftests/net: skip msg_zerocopy test if we have less than 4 CPUs

2020-08-05 Thread Colin Ian King
On 05/08/2020 09:06, Willem de Bruijn wrote: > On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet wrote: >> >> >> >> On 8/4/20 5:30 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> The current test will exit with a failure if it cannot set a

Re: [PATCH][next] bpf: fix swapped arguments in calls to check_buffer_access

2020-07-28 Thread Colin Ian King
On 28/07/2020 11:43, Daniel Borkmann wrote: > On 7/27/20 11:39 PM, Yonghong Song wrote: >> On 7/27/20 10:54 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> There are a couple of arguments of the boolean flag zero_size_allowed >>> and the c

Re: [PATCH] sctp: remove redundant initialization of variable status

2020-07-24 Thread Colin Ian King
On 24/07/2020 13:55, Marcelo Ricardo Leitner wrote: > On Fri, Jul 24, 2020 at 01:17:53PM +0100, Colin King wrote: >> From: Colin Ian King >> >> The variable status is being initialized with a value that is never read >> and it is being updated later with a new va

re: net: phy: continue searching for C45 MMDs even if first returned ffff:ffff

2020-07-20 Thread Colin Ian King
Hi, Static analysis by Coverity has found a potential issue with the following commit in /drivers/net/phy/phy_device.c: commit bba238ed037c60242332dd1e4c5778af9eba4d9b Author: Vladimir Oltean Date: Sun Jul 12 19:48:15 2020 +0300 net: phy: continue searching for C45 MMDs even if first retu

Re: [PATCH] xprtrdma: fix incorrect header size calcations

2020-07-15 Thread Colin Ian King
Bah, $SUBJECT typo "calcations" -> "calculations". can that be fixed up when it's applied, or shall I send a V2? On 15/07/2020 17:26, Colin King wrote: > From: Colin Ian King > > Currently the header size calculations are using an assignment > operator in

Re: xprtrdma: Prevent inline overflow

2020-07-15 Thread Colin Ian King
On 15/07/2020 17:05, Chuck Lever wrote: > > >> On Jul 15, 2020, at 11:56 AM, Colin Ian King >> wrote: >> >> Hi, >> >> Static analysis with Coverity has found a potential issue with the >> header size calculations in sourc

re: xprtrdma: Prevent inline overflow

2020-07-15 Thread Colin Ian King
Hi, Static analysis with Coverity has found a potential issue with the header size calculations in source net/sunrpc/xprtrdma/rpc_rdma.c in functions rpcrdma_max_call_header_size and rpcrdma_max_reply_header_size. The commit in question is relatively old: commit 302d3deb20682a076e1ab551821cacfdc

Re: mvpp2: XDP TX support

2020-07-06 Thread Colin Ian King
On 06/07/2020 16:28, Matteo Croce wrote: > On Mon, 6 Jul 2020 14:59:22 +0100 > Colin Ian King wrote: > >> Hi, >> >> Static analysis with Coverity has found a potential issue in the >> following commit: >> >> commit c2d6fe6163de80d7f7cf400ee351f56d6cd

re: mvpp2: XDP TX support

2020-07-06 Thread Colin Ian King
Hi, Static analysis with Coverity has found a potential issue in the following commit: commit c2d6fe6163de80d7f7cf400ee351f56d6cdb7a5a Author: Matteo Croce Date: Thu Jul 2 16:12:43 2020 +0200 mvpp2: XDP TX support In source drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c in function mvp

re: rtw88: pci: define a mask for TX/RX BD indexes

2020-06-24 Thread Colin Ian King
Hi, static analysis with Coverity has detected a out of range write issue on the assigment rx_ring->buf[i] = skb in rtw_pci_init_rx_ring. The commit in question is: commit a5697a65ecd109ce7f8e3661b89a5dffae73b512 Author: Yan-Hsuan Chuang Date: Thu Mar 12 16:08:51 2020 +0800 rtw88: pci: de

re: mlxsw: spectrum: Adjust headroom buffers for 8x ports

2020-06-17 Thread Colin Ian King
Hi Static analysis with Coverity has detected an issue that relies on the machine endianness to work. The commit in question is: commit 60833d54d56c21e7538296eb2e00e104768fd047 Author: Ido Schimmel Date: Tue Jun 16 10:14:58 2020 +0300 mlxsw: spectrum: Adjust headroom buffers for 8x ports

Re: [PATCH][net-next] nexthop: fix incorrect allocation failure on nhg->spare

2020-05-28 Thread Colin Ian King
On 28/05/2020 16:55, Nikolay Aleksandrov wrote: > On 28/05/2020 18:53, Colin Ian King wrote: >> On 28/05/2020 15:55, Nikolay Aleksandrov wrote: >>> On 28/05/2020 17:53, Nikolay Aleksandrov wrote: >>>> On 28/05/2020 17:51, Colin King wrote: >>>>> Fro

Re: [PATCH][net-next] nexthop: fix incorrect allocation failure on nhg->spare

2020-05-28 Thread Colin Ian King
On 28/05/2020 15:55, Nikolay Aleksandrov wrote: > On 28/05/2020 17:53, Nikolay Aleksandrov wrote: >> On 28/05/2020 17:51, Colin King wrote: >>> From: Colin Ian King >>> >>> The allocation failure check for nhg->spare is currently checking >>> the p

re: netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks

2020-05-26 Thread Colin Ian King
Hi, Static analysis with Coverity has detected a potential issue with the commit in linux-next: commit 368982cd7d1bd41cd39049c794990aca3770db44 Author: Pablo Neira Ayuso Date: Wed May 23 09:17:24 2018 +0200 netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks Namely: 201

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Colin Ian King
On 09/05/2020 00:21, Joe Perches wrote: > On Fri, 2020-05-08 at 23:53 +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently the value for 'off' is computed using a multiplication and >> a couple of statements later off is being incremented by len an

re: e1000: Add support for the CE4100 reference platform

2020-05-01 Thread Colin Ian King
Hi, Static analysis with Coverity has detected an issue with setting the speed control on the e1000 driver. This was introduced back in 2011 with the following commit: commit 5377a4160bb65ee4dd11b4b1d081d86d56d92bff Author: Dirk Brandewie Date: Thu Jan 6 14:29:54 2011 + e1000: Add sup

Re: [PATCH] wimax/i2400m: fix calculation of index, remove sizeof

2019-08-23 Thread Colin Ian King
On 23/08/2019 12:23, Dan Carpenter wrote: > On Fri, Aug 23, 2019 at 09:52:30AM +0100, Colin King wrote: >> From: Colin Ian King >> >> The subtraction of the two pointers is automatically scaled by the >> size of the size of the object the pointers point to, so the di

bug report: iwlwifi: mvm: support mac80211 TXQs model

2019-02-20 Thread Colin Ian King
Hi, Static analysis by CoverityScan has detected an uninitialized variable error in drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c Variable used_hw_queues in iwl_mvm_mac_ctxt_init() is no longer being assigned an initial value, causing garbage to be found when calling find_first_zero_bit() on

Re: [PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed

2019-02-19 Thread Colin Ian King
On 19/02/2019 16:35, Michael S. Tsirkin wrote: > On Tue, Feb 19, 2019 at 01:57:13PM +, Colin King wrote: >> From: Colin Ian King >> >> Currently the loop that calls log_write_hva on each iovec is never >> executed because of an incorrect error check on the

phy speed setting issue: e1000: Add support for the CE4100 reference platform

2019-02-16 Thread Colin Ian King
Hi, Static analysis from CoverityScan has detected an issue with the speed setup with the control setting in the e1000 driver. Function e1000_config_mac_to_phy in /drivers/net/ethernet/intel/e1000/e1000_hw.c, CoverityScan reports: CID 140032 (#1 of 1): Operands don't affect result (CONSTANT_EXPR

net: sxgbe: issue with case statement in sxgbe_mtl_init

2019-02-13 Thread Colin Ian King
Hi, Static analysis with CoverityScan has detected two switch statements where all of the case statements are deadcode. The values being switched on are masked and these will never match any of the values being checked, so this clearly is an error. Function sxgbe_mtl_init, drivers/net/ethernet/s

Re: [PATCH] cw1200: fix indentation issues

2019-01-17 Thread Colin Ian King
On 17/01/2019 14:54, Kalle Valo wrote: > Colin King writes: > >> From: Colin Ian King >> >> There are two lines that have indentation issues, fix these. >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/wireless/st/cw1200/fwio.c

Re: [PATCH] fix a couple of indentation issues and remove assignment in if statements

2019-01-16 Thread Colin Ian King
Bah, forgot to fix up the subject line properly. V3. Coming. On 17/01/2019 00:33, Colin King wrote: > From: Colin Ian King > > There is an if statement and a return statement that are incorrectly > indented. Fix these. Also replace the assignment-in-if statements > to assignment

Re: [PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread Colin Ian King
On 24/12/2018 18:08, David Miller wrote: > From: Colin King > Date: Sat, 22 Dec 2018 16:58:41 + > >> @@ -777,10 +777,7 @@ static void cops_rx(struct net_device *dev) >> } >> >> /* Get response length. */ >> -if(lp->board==DAYNA) >> -pkt_len = inb(ioaddr) &

out of bounds read in drivers/net/wireless/ray_cs.c

2018-12-20 Thread Colin Ian King
Static analysis with CoverityScan picked up an out of bounds read issue that has been in the Raylink wireless LAN card driver since it appeared in the kernel: drivers/net/wireless/ray_cs.c: accessing org[3] is out of bounds, the array has just 3 elements. 959if (proto == htons(E

re: xfrm: policy: add inexact policy search tree infrastructure

2018-11-14 Thread Colin Ian King
Hi, Static analysis with CoverityScan found a potential issue with the commit: commit 6be3b0db6db82cf056a72cc18042048edd27f8ee Author: Florian Westphal Date: Wed Nov 7 23:00:37 2018 +0100 xfrm: policy: add inexact policy search tree infrastructure It seems that pointer pol is set to NULL

Re: ipmr, ip6mr: Unite dumproute flows

2018-10-17 Thread Colin Ian King
Hi, Static analysis on linux-next has picked up a potential bug with commit: commit 7b0db85737db3f4d76b2a412e4f19eae59b8b494 Author: Yuval Mintz Date: Wed Feb 28 23:29:39 2018 +0200 ipmr, ip6mr: Unite dumproute flows in function mr_table_dump(), s_e is and never seems to change, so the c

Re: [PATCH] net: caif: remove redundant null check on frontpkt

2018-09-14 Thread Colin Ian King
On 14/09/18 18:54, Sergei Shtylyov wrote: > Hello! > > On 09/14/2018 08:19 PM, Colin King wrote: > >> From: Colin Ian King >> >> It is impossible for frontpkt to be null at the point of the null >> check because it has been assigned from rearpkt and there is

Re: [PATCH 1/2] samples: bpf: ensure that we don't load over MAX_PROGS programs

2018-07-13 Thread Colin Ian King
On 13/07/18 16:11, Dan Carpenter wrote: > I can't see that we check prog_cnt to ensure it doesn't go over > MAX_PROGS. > > Signed-off-by: Dan Carpenter > > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c > index 89161c9ed466..904e775d1a44 100644 > --- a/samples/bpf/bpf_load.c > +++

Re: [PATCH] net/mlx4: fix spelling mistake: "Inrerface" -> "Interface"

2018-05-22 Thread Colin Ian King
On 22/05/18 16:21, Tariq Toukan wrote: > > > On 22/05/2018 11:37 AM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake in mlx4_dbg debug message >> >> Signed-off-by: Colin Ian King >> --- >>   drivers/net/ethernet

Re: [PATCH] mlxsw: spectrum_switchdev: remove duplicated check on multicast_enable

2018-04-24 Thread Colin Ian King
On 24/04/18 13:51, Ido Schimmel wrote: > On Tue, Apr 24, 2018 at 12:51:39PM +0100, Colin King wrote: >> From: Colin Ian King >> >> The check on bridge_port->bridge_device->multicast_enable is performed >> twice in two nested if statements. I can't see any r

NAK: [PATCH] qed: fix spelling mistake: "checksumed" -> "checksummed"

2018-03-29 Thread Colin Ian King
On 29/03/18 12:59, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in DP_INFO message text > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-18 Thread Colin Ian King
On 18/02/18 16:31, Joe Perches wrote: > On Sun, 2018-02-18 at 16:58 +0200, Andy Shevchenko wrote: >> On Fri, Feb 16, 2018 at 6:53 PM, Colin Ian King >> wrote: >>> On 16/02/18 16:51, Andy Shevchenko wrote: >>>> On Thu, Feb 15, 2018

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Colin Ian King
On 16/02/18 16:51, Andy Shevchenko wrote: > On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: >> From: Colin Ian King >> >> The checks to see if key->dst.s6_addr and key->src.s6_addr are null >> pointers are redundant because these are constant size arrays a

Re: [PATCH][next] bnxt_en: ensure len is ininitialized to zero

2018-01-16 Thread Colin Ian King
On 12/01/18 22:38, Andy Gospodarek wrote: > On Fri, Jan 12, 2018 at 10:11:17AM -0800, Michael Chan wrote: >> On Fri, Jan 12, 2018 at 9:46 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> In the case where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP t

Re: [PATCH][next] wcn36xx: remove redundant assignment to msg_body.min_ch_time

2017-12-29 Thread Colin Ian King
On 29/12/17 07:44, Loic Poulain wrote: > Hi Colin, Bjorn, > > On 26 December 2017 at 21:13, Bjorn Andersson > wrote: >> On Tue 19 Dec 09:04 PST 2017, Colin King wrote: >> >>> From: Colin Ian King >>> >>> msg_body.min_ch_time is being assign

Re: [PATCH] atm: lanai: use setup_timer instead of init_timer

2017-11-30 Thread Colin Ian King
On 30/11/17 14:23, David Miller wrote: > From: Colin King > Date: Fri, 24 Nov 2017 13:27:12 + > >> From: Colin Ian King >> >> Use setup_timer function instead of initializing timer with the >> function and data fields. >> >> Signed-off-by: Co

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 19:23, Wei Wang wrote: > On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: >> On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >>> From: Colin Ian King >>> >>> The use of the | operator always leads to true on the expression &g

NACK: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 18:55, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true on the expression > (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I > believe this is fixed by using & instead to just check the > RTF_CACHE en

Re: [PATCH] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Colin Ian King
On 22/09/17 12:50, Dan Carpenter wrote: > On Thu, Sep 21, 2017 at 11:01:58PM +0100, Colin King wrote: >> @@ -1837,12 +1838,13 @@ static void e1000_get_ethtool_stats(struct >> net_device *netdev, >> p = (char *)adapter + stat->stat_offset; >> break; >>

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Colin Ian King
On 22/09/17 11:03, Joe Perches wrote: > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: >> >> On Thu, 21 Sep 2017, Colin King wrote: >> >>> From: Colin Ian King >>> >>> Don't populate const array ac_to_fifo on the stack in an inlined &g

re: mac80211: avoid allocating TXQs that won't be used

2017-09-20 Thread Colin Ian King
Johannes, Static analysis with CoverityScan on linux-next today detected a null pointer dereference issue on commit: >From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 22 Jun 2017 12:20:29 +0200 Subject: [PATCH] mac80211: avoid allocating TXQs

Re: [PATCH][next][V2] bpf: test_maps: fix typo "conenct" -> "connect"

2017-08-30 Thread Colin Ian King
On 30/08/17 14:46, Daniel Borkmann wrote: > On 08/30/2017 01:47 PM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to typo in printf error message >> >> Signed-off-by: Colin Ian King > > For net-next; looks like there is also one in "fai

Re: [PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-24 Thread Colin Ian King
On 24/08/17 09:48, Aviad Krawczyk wrote: > On 8/23/2017 6:39 PM, Colin King wrote: >> From: Colin Ian King >> >> The comparison of hw_ioctxt.rx_buf_sz_idx == -1 is always false because >> rx_buf_sz_idx is a uint16_t. Fix this by explicitly casting -1 to uint16_t. >

Re: [PATCH] mlx5: ensure 0 is returned when vport is zero

2017-08-18 Thread Colin Ian King
On 18/08/17 16:25, Colin King wrote: > From: Colin Ian King > > Currently, if vport is zero then then an uninialized return status > in err is returned. Since the only return status at the end of the > function esw_add_uc_addr is zero for the current set of return paths > w

Re: [PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Colin Ian King
On 16/08/17 14:58, Leon Romanovsky wrote: > On Wed, Aug 16, 2017 at 02:42:50PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistakes in the mlx4 driver. >> >> Signed-off-by: Colin Ian King >> --- >> dri

Re: [PATCH] netfilter: fix indent on in statements

2017-08-15 Thread Colin Ian King
On 15/08/17 10:45, Sergei Shtylyov wrote: > Hello! > > On 8/15/2017 9:50 AM, Colin King wrote: > >> From: Colin Ian King >> >> The returns on some if statements are not indented correctly, > >s/in/if/ in the subject? Doh, fix resent. > >>

NACK: [PATCH] rtlwifi: btcoex: make function btc8723b2ant_dac_swing static

2017-08-12 Thread Colin Ian King
On 12/08/17 23:00, Colin King wrote: > From: Colin Ian King > > The function btc8723b2ant_dac_swing is local to the source and > does not need to be in global scope, so make it static. > > Cleans up sparse warning: > symbol 'btc8723b2ant_dac_swing' was no

Re: [PATCH] rt2x00: make const array glrt_table static

2017-07-12 Thread Colin Ian King
On 12/07/17 07:49, Stanislaw Gruszka wrote: > On Tue, Jul 11, 2017 at 12:47:33PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Don't populate array glrt_table on the stack but make it static. >> Makes the object code a smaller by over 670 bytes: >&

Re: [PATCH] net/mlx4: fix spelling mistake: "enforcment" -> "enforcement"

2017-06-27 Thread Colin Ian King
On 27/06/17 11:33, Tariq Toukan wrote: > > > On 27/06/2017 1:02 PM, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistake in mlx4_dbg debug message >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/etherne

Re: [PATCH] batman-adv: fix spelling mistake "ourselve" -> "ourself"

2017-06-26 Thread Colin Ian King
On 26/06/17 11:02, Sergei Shtylyov wrote: > On 6/26/2017 1:01 PM, Sergei Shtylyov wrote: > >>> From: Colin Ian King >>> >>> Trivial fix to spelling mistake in batadv_dbg debug message >>> >>> Signed-off-by: Colin Ian King >>> --- >

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin Ian King
ed to be setup correctly. >> >> Detected by CoverityScan, CID#1437563 ("Unitialized scalar variable") >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH][netdev-next] net: hns: make guid hns_dsaf_acpi_dsm_guid static

2017-06-13 Thread Colin Ian King
On 13/06/17 20:24, Andy Shevchenko wrote: > On Tue, Jun 13, 2017 at 8:56 PM, David Miller wrote: >> From: Colin King >> Date: Tue, 13 Jun 2017 14:03:21 +0100 >> >>> From: Colin Ian King >>> >>> The guid hns_dsaf_acpi_dsm_guid does not n

re: phy: cpcap-usb: Add CPCAP PMIC USB support

2017-06-05 Thread Colin Ian King
Hi Tony, While running static analysis on linux-next, CoverityScan picked up a NULL pointer deference on ddata->pins when calling pinctrl_lookup_state: 466ddata->pins = devm_pinctrl_get(ddata->dev); 1. Condition IS_ERR(ddata->pins), taking true branch. 467if (IS_ERR(ddata->pi

Re: [PATCH] net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

2017-06-03 Thread Colin Ian King
On 03/06/17 16:55, Andy Shevchenko wrote: > On Fri, Jun 2, 2017 at 5:58 PM, Colin King wrote: >> The current comparison of entry < 0 will never be true since entry is an >> unsigned integer. Cast entry to an int to ensure -ve error return values >> from the call to jumbo_frm are correctly being ca

Re: [PATCH] net: phy: marvell: make two functions static

2017-06-02 Thread Colin Ian King
On 02/06/17 15:00, Andrew Lunn wrote: > On Fri, Jun 02, 2017 at 12:14:24PM +0100, Colin King wrote: >> From: Colin Ian King >> >> functions m88e1510_get_temp_critical and m88e1510_get_temp_alarm can be >> made static as they not need to be in global scope. >

Re: [PATCH] ethernet: aquantia: remove redundant checks on error status

2017-05-11 Thread Colin Ian King
On 11/05/17 19:16, David Miller wrote: > From: Colin King > Date: Thu, 11 May 2017 18:29:29 +0100 > >> From: Colin Ian King >> >> The error status err is initialized as zero and then being checked >> several times to see if it is less than zero even when it has

Re: [PATCH] wlcore: fix spelling mistake in wl1271_warning 'iligal' -> 'illegal'

2017-04-03 Thread Colin Ian King
On 03/04/17 10:20, Joe Perches wrote: > On Mon, 2017-04-03 at 10:15 +0100, Colin King wrote: >> From: Colin Ian King >> >> trivial fix to spelling mistake in wl1271_warning error message >> >> Signed-off-by: Colin Ian King >> --- >> drivers/net/w

re: rxrpc: Fix deadlock between call creation and sendmsg/recvmsg

2017-03-02 Thread Colin Ian King
I think the following part of the patch is problematic: call = rxrpc_find_call_by_user_ID(rx, user_call_ID); if (!call) { + ret = -EBADSLT; if (cmd != RXRPC_CMD_SEND_DATA) - return -EBADSLT; + goto error_rel

Re: [PATCH][V2] rtlwifi: rtl8192de: ix spelling mistake: "althougth" -> "though"

2017-02-26 Thread Colin Ian King
On 26/02/17 18:52, Colin King wrote: > From: Colin Ian King > > trivial fix to spelling mistake in RT_TRACE message > > Signed-off-by: Colin Ian King > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) &

re: sched: check negative err value to safe one level of indent

2017-02-14 Thread Colin Ian King
Jiro, A recent static analysis run with CoverityScan identified a potential change in functionality with your recent commit "sched: check negative err value to safe one level of indent" that landed in linux-next. The original path for case RTM_DELTFILTER would always goto errout, but your commit

re: sfc: process RX event inner checksum flags

2017-02-10 Thread Colin Ian King
Hi there, not sure if this is a bug, or intentional, but CoverityScan picked up a mismatch in arguments when calling efx_ef10_handle_rx_event_error() with commit "sfc: process RX event inner checksum flags" that landed in linux-next: CID 1402067 (#1 of 1): Arguments in wrong order (SWAPPED_ARG

Re: mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-07 Thread Colin Ian King
Hi Jiri, mlxsw_sp_acl_tcam_chunk_create has an issue picked up by static analysis: 816struct mlxsw_sp_acl_tcam_chunk *chunk; 817int err; 818 CID 1400029 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)result_independent_of_operands: priority == 184467440

Re: [PATCH][net-next] net: bridge: remove redundant check to see if err is set

2017-02-07 Thread Colin Ian King
;vid - v->vid) > 0 && vlan_tunnel_id_isrange(v_end, v) > 0) num_tinfos += 2; else num_tinfos += 1; } On 07/02/17 11:30, Nikolay Aleksandrov wrote: > On 07/02/17 11:56, Colin King wrote: >> From: Col

RE: bridge: per vlan dst_metadata netlink support

2017-02-07 Thread Colin Ian King
Hi, Static analysis with CoverityScan on net/bridge/br_netlink_tunnel.c has picked up and issue where tb[] is being referenced but contains uninitialized data. 222 int br_parse_vlan_tunnel_info(struct nlattr *attr, 223 struct vtunnel_info *tinfo) 224 { 1. var_de

Re: [patch net-next] sfc: a couple off by one bugs

2017-02-01 Thread Colin Ian King
"sfc: insert catch-all filters for encapsulated >> traffic") >> Signed-off-by: Dan Carpenter > One of these was already fixed by Colin Ian King in > e9904990e8e70a51574e6ec6b872f3c705ec75f0 ("sfc: fix an off-by-one compare on > an > array size"). Ugh, I miss

Re: [patch net-next] sctp: fix some debug output

2017-01-24 Thread Colin Ian King
On 24/01/17 09:51, Dan Carpenter wrote: > On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote: >> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote: >>> We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so >>> it causes an off-by-one read overflow. >

Re: [PATCH] net: sctp: fix array overrun read on sctp_timer_tbl

2017-01-20 Thread Colin Ian King
On 20/01/17 13:10, Marcelo Ricardo Leitner wrote: > On Fri, Jan 20, 2017 at 01:01:57PM +, Colin King wrote: >> From: Colin Ian King >> >> The comparison on the timeout can lead to an array overrun >> read on sctp_timer_tbl because of an off-by-one error. Fix &g

Re: [PATCH] flow disector: check if arp_eth is null rather than arp

2017-01-13 Thread Colin Ian King
On 13/01/17 18:24, Eric Dumazet wrote: > On Fri, 2017-01-13 at 13:34 +, Colin King wrote: >> From: Colin Ian King >> >> arp is being checked instead of arp_eth to see if the call to >> __skb_header_pointer failed. Fix this by checking arp_eth is >> null inste

Re: [PATCH] [media] gp8psk: fix spelling mistake: "firmare" -> "firmware"

2016-12-29 Thread Colin Ian King
On 29/12/16 21:23, VDR User wrote: >> - err("firmare chunk size bigger than 64 bytes."); >> + err("firmware chunk size bigger than 64 bytes."); > > Yup. > >> -"HW don't support CMAC encrypiton, use software >> CMAC encrypiton\n"

Re: [PATCH][V2] qed: fix memory leak of a qed_spq_entry on error failure paths

2016-12-21 Thread Colin Ian King
On 21/12/16 13:29, Mintz, Yuval wrote: >> From: Colin Ian King >> >> A qed_spq_entry entry is allocated by qed_sp_init_request but is not kfree'd >> if an error occurs, causing a memory leak. Fix this by returning the >> previously >> allocated spq ent

Re: [PATCH] kcm: fix spelling mistake in Kconfig, "connectons"

2016-12-13 Thread Colin Ian King
On 13/12/16 17:30, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake "connectons" to "connections" in > Kconfig text. > > Signed-off-by: Colin Ian King > --- > net/kcm/Kconfig | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH] cxgb4: fix memory leak on txq_info

2016-11-25 Thread Colin Ian King
On 25/11/16 21:10, David Miller wrote: > From: Colin King > Date: Wed, 23 Nov 2016 11:02:44 + > >> From: Colin Ian King >> >> Currently if txq_info->uldtxq cannot be allocated then >> txq_info->txq is being kfree'd (which is redundant because it

re: amd-xgbe: Add support for MDIO attached PHYs

2016-11-15 Thread Colin Ian King
Hi, Commit: amd-xgbe: Add support for MDIO attached PHYs Use the phylib support in the kernel to communicate with and control an MDIO attached PHY. Use the hardware's MDIO communication mechanism to communicate with the PHY. +static int xgbe_clr_gpio(struct xgbe_prv_data *pdata, un

Re: [PATCH][V2] mlxsw: spectrum: remove redundant check if err is zero

2016-09-25 Thread Colin Ian King
On 24/09/16 22:08, Ido Schimmel wrote: > On Sat, Sep 24, 2016 at 06:03:38PM -0700, Colin King wrote: >> From: Colin Ian King >> >> There is an earlier check and return if err is non-zero, so >> the check to see if it is zero is redundant in every iteration >> of

Re: [PATCH] mwifiex: fix memory leak on regd when chan is zero

2016-09-15 Thread Colin Ian King
On 15/09/16 18:10, Kalle Valo wrote: > Colin King writes: > >> From: Colin Ian King >> >> When chan is zero mwifiex_create_custom_regdomain does not kfree >> regd and we have a memory leak. Fix this by freeing regd before >> the return. >> >> S

Re: [PATCH] ath10k: fix memory leak on caldata on error exit path

2016-09-03 Thread Colin Ian King
On 02/09/16 16:45, Valo, Kalle wrote: > Colin King writes: > >> From: Colin Ian King >> >> caldata is not being free'd on the error exit path, causing >> a memory leak. kfree it to fix the leak. >> >> Signed-off-by: Colin Ian King >> ---

  1   2   >