From: Colin Ian King
The bit-masks used for the TXERRCH and RXERRCH (tx and rx error channels)
are incorrect and always lead to a zero result. The mask values are
currently the incorrect post-right shifted values, fix this by setting
them to the currect values.
(I double checked these against th
From: Colin Ian King
The variable err is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/microsoft/m
From: Colin Ian King
The size of the buffer than can be written to is currently incorrect, it is
always the size of the entire buffer even though the snprintf is writing
as position pos into the buffer. Fix this by setting the buffer size to be
the number of bytes left in the buffer, namely sizeo
From: Colin Ian King
The size of the buffer than can be written to is currently incorrect, it is
always the size of the entire buffer even though the snprintf is writing
as position pos into the buffer. Fix this by setting the buffer size to be
the number of bytes left in the buffer, namely sizeo
From: Colin Ian King
Currently the assignment of idx dereferences pointer sta before
sta is null checked, leading to a potential null pointer dereference.
Fix this by assigning idx when it is required after the null check on
pointer sta.
Addresses-Coverity: ("Dereference before null check")
Fixe
From: Colin Ian King
The increment of idx is indented one level too deeply, clean up the
code by removing the extraneous tab.
Signed-off-by: Colin Ian King
---
net/mac80211/rc80211_minstrel_ht.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rc80211_minstrel_h
From: Colin Ian King
There are spelling mistakes in netdev_dbg and netdev_dbg messages,
fix these.
Signed-off-by: Colin Ian King
---
drivers/net/can/usb/etas_es58x/es58x_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c
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
checking cf. Fix this by moving the statement into the following code
block that has a null cf check.
Addresses-Coverity: ("Dereference a
From: Colin Ian King
There is an assignment to *netdev that is can potentially be null but the
null check is checking netdev and not *netdev as intended. Fix this by
adding in the missing * operator.
Addresses-Coverity: ("Dereference before null check")
Fixes: 8537257874e9 ("can: etas_es58x: add
From: Colin Ian King
The comparison of the u32 variable queue with <= zero is always true
since an unsigned can never be negative. Replace the conditional
check with the boolean true to simplify the code. The while loop
will terminate because of the zero check on queue before queue is
decremente
From: Colin Ian King
The reset_prepare and reset_done calls have a null pointer check
on ae_dev however ae_dev is being dereferenced via the call to
ns3_is_phys_func with the ae->pdev argument. Fix this by performing
a null pointer check on ae_dev and hence short-circuiting the
dereference to ae_
From: Colin Ian King
The shifting of the u8 integers rq->caching by 26 bits to
the left will be promoted to a 32 bit signed int and then
sign-extended to a u64. In the event that rq->caching is
greater than 0x1f then all then all the upper 32 bits of
the u64 end up as also being set because of th
From: Colin Ian King
The shifting of the u8 integers f->fs.nat_lip[] by 24 bits to
the left will be promoted to a 32 bit signed int and then
sign-extended to a u64. In the event that the top bit of the u8
is set then all then all the upper 32 bits of the u64 end up as
also being set because of th
From: Colin Ian King
The for-loop iterates with a u16 loop counter idx and compares this
with the loop upper limit of q->flows_cnt that is a u32 type.
There is a potential infinite loop if q->flows_cnt is larger than
the u8 loop counter. Fix this by making the loop counter the same
type as q->flo
From: Colin Ian King
The for_each_tx_queue loop iterates with a u8 loop counter i and
compares this with the loop upper limit of bp->num_queues that
is an int type. There is a potential infinite loop if bp->num_queues
is larger than the u8 loop counter. Fix this by making the loop
counter the sa
From: Colin Ian King
The macro CN23XX_PEM_BAR1_INDEX_REG is being used to shift oct->pcie_port
(a u16) left 24 places. There are two subtle issues here, first the
shift gets promoted to an signed int and then sign extended to a u64.
If oct->pcie_port is 0x80 or more then the upper bits get sign e
From: Colin Ian King
The error check on err is always false as err is always 0 at the
port_found label. The code is redundant and can be removed.
Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 --
1 file changed, 2 del
From: Colin Ian King
The bit-wise and of the action field with MLX5_ACCEL_ESP_ACTION_DECRYPT
is incorrect as MLX5_ACCEL_ESP_ACTION_DECRYPT is zero and not intended
to be a bit-flag. Fix this by using the == operator as was originally
intended.
Addresses-Coverity: ("Logically dead code")
Fixes: 7
From: Colin Ian King
A for-loop is using a u8 loop counter that is being compared to
a u32 cmp_dcbcfg->numapp to check for the end of the loop. If
cmp_dcbcfg->numapp is larger than 255 then the counter j will wrap
around to zero and hence an infinite loop occurs. Fix this by making
counter j the
From: Colin Ian King
Currently the call to nf_log_register is returning an error code that
is not being assigned to ret and yet ret is being checked. Fix this by
adding in the missing assignment.
Addresses-Coverity: ("Logically dead code")
Fixes: 8d02e7da87a0 ("netfilter: nf_log_bridge: merge wi
From: Colin Ian King
The variable res is being initialized with a value that is
never read and it is being updated later with a new value.
The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/ieee802154/mac802154
From: Colin Ian King
The pointers adapter and phydev are being initialized with values that
are never read and are being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/ethern
From: Colin Ian King
The variable result is being assigned a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
net/mac80211/tx.c | 2 +-
1 file chan
From: Colin Ian King
Variable err is assigned -ENODEV followed by an error return path
via label error_out that does not access the variable and returns
with the -ENODEV error return code. The assignment to err is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by:
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
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/mellanox/
From: Colin Ian King
The variable id is being assigned a value that is never
read, the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
kernel/bpf/btf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/bpf/btf.c b/kerne
From: Colin Ian King
The pointer gpio is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/smsc/smc91x
From: Colin Ian King
Currently ETHTOOL_FEC_NONE_BIT is being used as a mask, however
this is zero and the mask should be using ETHTOOL_FEC_NONE instead.
Fix this.
Addresses-Coverity: ("Bitwise-and with zero")
Fixes: 42ce127d9864 ("ethtool: fec: sanitize ethtool_fecparam->fec")
Signed-off-by: Col
From: Colin Ian King
The call to br_vlan_replay_one is returning an error return value but
this is not being assigned to err and the following check on err is
currently always false because err was initialized to zero. Fix this
by assigning err.
Addresses-Coverity: ("'Constant' variable guards d
From: Colin Ian King
Currently the error return path when lfs fails to allocate is not free'ing
the memory allocated to buf. Fix this by adding the missing kfree.
Addresses-Coverity: ("Resource leak")
Fixes: f7884097141b ("octeontx2-af: Formatting debugfs entry rsrc_alloc.")
Signed-off-by: Colin
From: Colin Ian King
There is a spelling mistake in an error message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
b/drive
From: Colin Ian King
The calculation of offtune_val seems incorrect, the u16 value in
pi->tx_rx_cal_radio_saveregs[2] is being masked with 0xf0 and then
shifted 8 places right so that always ends up as a zero result. I
believe the intended shift was 4 bits to the right. Fix this.
[Note: not test
From: Colin Ian King
The pointer pfvf is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Fixes: 56bcef528bd8 ("octeontx2-af: Use npc_install_flow API for pr
From: Colin Ian King
There is a spelling mistake in an ath11k_warn message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c
b/drivers/net/wireless/ath/ath1
From: Colin Ian King
There are two spelling mistakes in a mlx5_core_info message. Fix them.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c
b
From: Colin Ian King
Currently in the switch statement case where type is
NL80211_IFTYPE_STATION there is a check to see if type
is not NL80211_IFTYPE_STATION. This check is always false
and is redundant dead code that can be removed.
Addresses-Coverity: ("Logically dead code")
Fixes: e0f9fdda8
From: Colin Ian King
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/vhost/scsi.c | 2 +-
1
From: Colin Ian King
Currently the expression ~nic_conf1 is always true because nic_conf1
is a u16 and according to 6.5.3.3 of the C standard the ~ operator
promotes the u16 to an integer before flipping all the bits. Thus
the top 16 bits of the integer result are all set so the expression
is alw
From: Colin Ian King
In the switch statement case where type is NL80211_IFTYPE_STATION
there is a check for type != NL80211_IFTYPE_STATION which is always
false and hence it is redundant dead code and can be removed.
Addresses-Coverity: ("Logically dead code")
Fixes: e0f9fdda81bd ("mt76: mt7921:
From: Colin Ian King
It appears that the call of ipv6_add_any for the destination address
is using ip6src instead of ip6dst, this looks like a copy-paste
coding error. Fix this by replacing ip6src with ip6dst.
Addresses-Coverity: ("Copy-paste error")
Fixes: efca91e89b67 ("i40e: Add flow director
From: Colin Ian King
The variable mfs_max is not initialized and is being compared to find
the maximum value. Fix this by initializing it to 0.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
Signed-off-by: Col
From: Colin Ian King
The documentation for the PHY update [1] states:
Loop 4 times with index i
If PHY Revision >= 3
Copy table[i] to coef[i]
Otherwise
Set coef[i] to 0
the copy of the table to coef is currently implemented the wrong way
around, table is being updated f
From: Colin Ian King
There is a spelling mistake in the text in array rpm_rx_stats_fields,
fix it.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx
From: Colin Ian King
There is a spelling mistake in some debug text, fix this.
Signed-off-by: Colin Ian King
---
drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
b/driver
From: Colin Ian King
Currently function hns3_reset_notify_uninit_enet is returning
the contents of the uninitialized variable ret. Fix this by
removing ret (since it is no longer used) and replace it with
a return of the literal value 0.
Addresses-Coverity: ("Uninitialized scalar variable")
Fix
From: Colin Ian King
The multiplication of the u32 variables tx_time and estimated_retx is
performed using a 32 bit multiplication and the result is stored in
a u64 result. This has a potential u32 overflow issue, so avoid this
by casting tx_time to a u64 to force a 64 bit multiply.
Addresses-Co
From: Colin Ian King
There is a spelling mistake in the function name alloc_channles_and_rings.
Fix this by renaming it to alloc_channels_and_rings.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 2 +-
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +-
From: Colin Ian King
There is a spelling mistake in a netdev_warn message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
b/driver
From: Colin Ian King
Currently the pointer 'reporter' is not being initialized and is
being read in a netdev_warn message. The pointer is not used
and is redundant, fix this by removing it and replacing the reference
to it with priv->reporter instead.
Addresses-Coverity: ("Uninitialized pointer
From: Colin Ian King
The null check of filp->f_path.dentry->d_iname is redundant because
it is an array of DNAME_INLINE_LEN chars and cannot be a null. Fix
this by removing the null check.
Addresses-Coverity: ("Array compared against 0")
Fixes: 04987ca1b9b6 ("net: hns3: add debugfs support for t
From: Colin Ian King
There is a spelling mistake in a netdev_warn message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
b/driver
From: Colin Ian King
The variable err is being assigned a value that is never read,
the same error number is being returned at the error return
path via label err1. Clean up the code by removing the assignment.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
net/netfilt
From: Colin Ian King
The variable rtstatu is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/wireless/realte
From: Colin Ian King
The variable phy_id is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/wireless/intel/i
From: Colin Ian King
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/wireless/marvell/li
From: Colin Ian King
There are two spelling mistakes in check_fail messages. Fix them.
Signed-off-by: Colin Ian King
---
tools/testing/selftests/net/forwarding/tc_chains.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/tc_chains.
From: Colin Ian King
Currently the error return paths don't kfree lmac and lmac->name
leading to some memory leaks. Fix this by adding two error return
paths that kfree these objects
Addresses-Coverity: ("Resource leak")
Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management")
From: Colin Ian King
Currently the check for an unmap PF error is always going to be false
because intr_val is a 32 bit int and is being bit-mask checked against
1ULL << 32. Fix this by making intr_val a u64 to match the type at it
is copied from, namely npa_event_context->npa_af_rvu_ge.
Addres
From: Colin Ian King
There is a spelling mistake in the Kconfig. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/ni/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ni/Kconfig b/drivers/net/ethernet/ni/Kconfig
index 01229190132d..d
From: Colin Ian King
There is a spelling mistake in the Kconfig help text. Fix it.
Signed-off-by: Colin Ian King
---
V2: remove another fix from the patch
---
drivers/net/wireless/microchip/wilc1000/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wirel
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/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dr
From: Colin Ian King
There are some spelling mistakes in the Kconfig. Fix these.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
b/driver
From: Colin Ian King
The || condition in hdev->fd_active_type != HCLGE_FD_ARFS_ACTIVE ||
hdev->fd_active_type != HCLGE_FD_RULE_NONE will always be true because
hdev->fd_active_type cannot be equal to two different values at the same
time. The expression is always true which is not correct. Fix t
From: Colin Ian King
The intention of the err_expr cleanup path is to iterate over the
allocated expr_array objects and free them, starting from i - 1 and
working down to the start of the array. Currently the loop counter
is being incremented instead of decremented and also the index i is
being u
From: Colin Ian King
Currently the null check on a newly allocated skb is missing and
this can lead to a null pointer dereference is the allocation fails.
Fix this by adding a null check and returning -ENOMEM.
Addresses-Coverity: ("Dereference null return")
Fixes: 43ed15e1ee01 ("ath11k: put hw t
From: Colin Ian King
There are two spelling mistakes in output messages. Fix these.
Signed-off-by: Colin Ian King
---
tools/testing/selftests/bpf/xdpxceiver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c
b/tools/testing/selft
From: Colin Ian King
There is a spelling mistake in the Kconfig help text. Fix it.
Signed-off-by: Colin Ian King
---
net/nfc/Kconfig | 2 +-
net/sched/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/nfc/Kconfig b/net/nfc/Kconfig
index 9b27599870e3..96b91674
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 long value
leads to a potential integer overflow. Fix this by using the BIT
macro to perform the shift to avoid the overflow.
Addresses-Coverity: ("Uninit
From: Colin Ian King
There is a spelling mistake in the Kconfig help text. Fix it.
Signed-off-by: Colin Ian King
---
drivers/net/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 4ee41924cdf1..260f9f46668b 100644
--- a/d
From: Colin Ian King
The pointer 'entry' is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/wireless/broadco
From: Colin Ian King
Currently the variable 'interval' is not initialized and is only set
to 1 when oex_stat->bt_418_hid_existi is true. Fix this by inintializing
variable interval to 0 (which I'm assuming is the intended default).
Addresses-Coverity: ("Uninitalized scalar variable")
Fixes: 5b2
From: Colin Ian King
The assignment to pointer vif is redundant as the assigned value
is never read, hence it can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/net/wireless/microchip/wilc1000/wlan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a
From: Colin Ian King
There is a spelling mistake in an error message. Fix it.
Signed-off-by: Colin Ian King
---
samples/bpf/xdpsock_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
index 0fee7f3aef3c..9553c7c47fc
From: Colin Ian King
There are spelling mistakes in two dev_err messages. Fix them.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletion
From: Colin Ian King
The call to pc_delete_flow can kfree the iter object, so the following
dev_err message that accesses iter->entry can accessmemory that has
just been kfree'd. Fix this by adding a temporary variable 'entry'
that has a copy of iter->entry and also use this when indexing into
t
From: Colin Ian King
Currently the variable err may be uninitialized if several of the if
statements are not executed in function nix_tx_vtag_decfg and a garbage
value in err is returned. Fix this by initialized ret at the start of
the function.
Addresses-Coverity: ("Uninitialized scalar variab
From: Colin Ian King
The shifting of the u16 result from ntohs(proto) by 16 bits to the
left will be promoted to a 32 bit signed int and then sign-extended
to a u64. In the event that the top bit of the return from ntohs(proto)
is set then all then all the upper 32 bits of a 64 bit long end up a
From: Colin Ian King
Don't populate the const array bws on the stack but instead it
static. Makes the object code smaller by 80 bytes:
Before:
textdata bss dec hex filename
85694 168651216 103775 1955f ./net/wireless/reg.o
After:
textdata bss dec
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
same location as pointer msk and msk is being null checked after
the sock_net call. Fix this by calling sock_net after the null
check on pointe
From: Colin Ian King
The left shift of u16 variable high is promoted to the type int and
then sign extended to a 64 bit u64 value. If the top bit of high is
set then the upper 32 bits of the result end up being set by the
sign extension. Fix this by explicitly casting the value in high to
a u64
From: Colin Ian King
The left shift of int 32 bit integer constant 1 is evaluated using
32 bit arithmetic and then assigned to a signed 64 bit variable. In
the case where time_ref->adapter->ts_used_bits is 32 or more this
can lead to an oveflow. Avoid this by shifting using the BIT_ULL macro
inst
From: Colin Ian King
An incorrect sizeof() is being used, sizeof(u64 *) is not correct,
it should be sizeof(*sq->sqb_ptrs).
Fixes: caa2da34fd25 ("octeontx2-pf: Initialize and config queues")
Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
Signed-off-by: Colin Ian King
---
drivers
From: Colin Ian King
The variable err is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
net/core/dev_ioctl.c | 2 +-
1
From: Colin Ian King
The for-loop iterates with a u8 loop counter and compares this
with the loop upper limit of request->n_ssids which is an int type.
There is a potential infinite loop if n_ssids is larger than the
u8 loop counter, so fix this by making the loop counter an int.
Addresses-Cover
From: Colin Ian King
Currently the check for *lenp < 0 is always true since the type is a size_t
and can never be negative. Fix this by casting it to ssize_t.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: c09f56b8f68d ("net/sunrpc: Fix return value for sysctl
sunrpc.transports")
Si
From: Colin Ian King
The position index in leq_seq_next is not updated when the next
entry is fetched an no more entries are available. This causes
seq_file to report the following error:
"seq_file: buggy .next function lec_seq_next [lec] did not update
position index"
Fix this by always updat
From: Colin Ian King
Two minor changes to the ioctl error handling.
Colin Ian King (2):
vsock: remove ratelimit unknown ioctl message
vsock: fix the error return when an invalid ioctl command is used
net/vmw_vsock/af_vsock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
2.27
From: Colin Ian King
Currently when an invalid ioctl command is used the error return
is -EINVAL. Fix this by returning the correct error -ENOIOCTLCMD.
Signed-off-by: Colin Ian King
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/
From: Colin Ian King
When exercising the kernel with stress-ng with some ioctl tests the
"Unknown ioctl" error message is spamming the kernel log at a high
rate. Remove this message.
Signed-off-by: Colin Ian King
---
net/vmw_vsock/af_vsock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/n
From: Colin Ian King
When exercising the kernel with stress-ng with some ioctl tests the
"Unknown ioctl" error message is spamming the kernel log at a high
rate. Rate limit this message to reduce the noise.
Signed-off-by: Colin Ian King
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 in
From: Colin Ian King
Don't populate the const array rate_table on the stack but instead it
static. Makes the object code smaller by 46 bytes.
Before:
textdata bss dec hex filename
298123824 192 338288424 drivers/net/dsa/bcm_sf2.o
After:
textdata bss
From: Colin Ian King
Don't populate the const array plen on the stack but instead it
static. Makes the object code smaller by 926 bytes.
Before:
textdata bss dec hex filename
265311943 64 285386f7a net/can/isotp.o
After:
textdata bss dec he
From: Colin Ian King
Currently the error exit path err_free kfree's attr. In the case where
flow and parse_attr failed to be allocated this return path will free
the uninitialized pointer attr, which is not correct. In the other
case where attr fails to allocate attr does not need to be freed. S
From: Colin Ian King
Currently the error return path when 'limits' fails to allocate
does not free the memory allocated for 'combinations'. Fix this
by adding a kfree before returning.
Addresses-Coverity: ("Resource leak")
Fixes: 2626c269702e ("ath11k: add interface_modes to hw_params")
Signed-o
From: Colin Ian King
Currently the comparisons of u16 integers value and sopass_val with
less than zero for error checking is always false because the values
are unsigned. Fix this by making these variables int. This does not
affect the shift and mask operations performed on these variables
Add
From: Colin Ian King
Currently pointer flow is being dereferenced before it is being
null checked. Fix this by adding a null check for flow and parse_attr
earlier. Also change the err_free path to explicitly return -ENOMEM
and remove the need for the err return variable.
Addresses-Coverity: ("D
From: Colin Ian King
Currently if an unsupported iftype is detected the error return path
does not free the cmd_skb leading to a resource leak. Fix this by
free'ing cmd_skb.
Addresses-Coverity: ("Resource leak")
Fixes: 805b28c05c8e ("qtnfmac: prepare for AP_VLAN interface type support")
Signed-o
From: Colin Ian King
A continue statement is indented incorrectly, add in the missing
tab.
Signed-off-by: Colin Ian King
---
lib/test_rhashtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c
index c5a6fef7b45d..76c607ee6db5
From: Colin Ian King
The variable err is being initialized with a value that is never read and
it is being updated later with a new value. The initialization is redundant
and can be removed. Also re-order variable declarations in reverse
Christmas tree ordering.
Addresses-Coverity: ("Unused val
From: Colin Ian King
The failed memory allocation check for dma_map->dma_pages is incorrect,
it is null checking dma_map and not dma_map->dma_pages. Fix this.
Addresses-Coverity: ("Logicall dead code")
Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings")
Signed-off-by: Colin Ian King
---
1 - 100 of 689 matches
Mail list logo