in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202408210655.dx8v5urw-...@intel.com/
New smatch warnings:
drivers/virtio/virtio_ring.c
/202404141343.iphko7zd-...@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https
)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202403221133.j66ouezh
true;
> > return soc_dev;
> >
> > out3:
> > @@ -246,6 +248,9 @@ const struct soc_device_attribute *soc_device_match(
> > if (!matches)
> > return NULL;
> >
> > + if (!soc_dev_attr_init_done && !early_soc_dev_attr)
>
> if (!soc_bus_type.p && !early_soc_dev_attr)
There is one place checking this already. We could wrap it in a helper
function:
static bool device_init_done(void)
{
return soc_bus_type.p ? true : false;
}
regards,
dan carpenter
On Thu, Apr 15, 2021 at 09:37:57AM +0100, Colin King wrote:
> 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
-20210406 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2069 axienet_probe() warn:
passing a
The copy_to_user() function returns the number of bytes that it wasn't
able to copy. We want to return -EFAULT to the user.
Fixes: fee6efce565d ("ionic: add hw timestamp support files")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/pensando/ionic/ionic_phc.c | 4 +++-
1
This loop will try to unmap enetc_unmap_tx_buff[-1] and crash.
Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/freescale/enetc/enetc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ne
/kernel/git/davem/net-next.git
cc0626c2aaed8e475efdd85fa374b497a7192e35
config: x86_64-randconfig-m001-20210406 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
If the "type_a->nfcid_len" is too large then it would lead to memory
corruption in pn533_target_found_type_a() when we do:
memcpy(nfc_tgt->nfcid1, tgt_type_a->nfcid_data, nfc_tgt->nfcid1_len);
Fixes: c3b1e1e8a76f ("NFC: Export NFCID1 from pn533&quo
t; binder_debug(BINDER_DEBUG_TRANSACTION,
> "failed fd fixup txn %d fd %d\n",
regards,
dan carpenter
ruct mlxsw_sp
> *mlxsw_sp,
> {
> u16 bucket_index = info->nh_res_bucket->bucket_index;
> struct netlink_ext_ack *extack = info->extack;
> - bool force = info->nh_res_bucket->force;
> + bool force;
> char ratr_pl_new[MLXSW_REG_RATR_LEN];
>
ing us to do that but it's never going to happen... :P
I do this for networking but it's a massive pain in the butt and I get
it wrong 20% of the time.
regards,
dan carpenter
(attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/ethtool/ioctl.c:2589 ethtool_set_fecparam() warn: bitwise AND condition is
false here
vim +2589
true;
9137
9138 return false;
9139 }
Another thing that's not clear to me is how pci_num_vf() relates to
this. I suspect that it is the same as hdev->num_vmdq_vport, but I
can't be sure.
regards,
dan carpenter
int qlge_adapter_down(struct qlge_adapter *qdev)
> qlge_tx_ring_clean(qdev);
>
> /* Call netif_napi_del() from common point.
> - */
> + */
This has already been fixed upstream. You should be working against
linux-next or staging-next.
https://lore.kernel.org/driverdev-devel/
rc = -EOPNOTSUPP;
> goto out;
Yep. The goto out is a do nothing goto and "forgot the error code" is
the traditional bug introduced by do nothing gotos.
Reviewed-by: Dan Carpenter
regards,
dan carpenter
The MPTCP_PUSH_PENDING define is 6 and these tests should be testing if
BIT(6) is set.
Fixes: c2e6048fa1cf ("mptcp: fix race in release_cb")
Signed-off-by: Dan Carpenter
---
net/mptcp/protocol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/protoc
The value of "lmac_id" can be controlled by the user and if it is larger
then the number of bits in long then it reads outside the bitmap.
The highest valid value is less than MAX_LMAC_PER_CGX (4).
Fixes: 91c6945ea1f9 ("octeontx2-af: cn10k: Add RPM MAC support")
Signed-o
On Mon, Mar 01, 2021 at 12:12:34PM +0200, Eran Ben Elisha wrote:
>
>
> On 2/19/2021 11:57 AM, Dan Carpenter wrote:
> > The value of "sec" comes from the user. Negative values will lead to
> > shift wrapping inside the perout_conf_real_time() function a
On Fri, Feb 19, 2021 at 11:46:23AM +0100, Michael Walle wrote:
> Am 2021-02-19 11:10, schrieb Dan Carpenter:
> > The comments to phy_select_page() say that "phy_restore_page() must
> > always be called after this, irrespective of success or failure of this
> >
s: 32ab60e53920 ("net: phy: icplus: add MDI/MDIX support for IP101A/G")
Fixes: f9bc51e6cce2 ("net: phy: icplus: fix paged register access")
Signed-off-by: Dan Carpenter
---
v2: fix a couple other instances I missed in v1
drivers/net/phy/icplus.c | 9 +
1 file changed, 5
on mode support")
Signed-off-by: Dan Carpenter
---
Saeed, I think this goes through your git tree and you will send a pull
request to the networking?
>From static analysis. Not tested.
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
This code does not allocate enough memory for the NUL terminator so it
ends up putting it one character beyond the end of the buffer.
Fixes: 8756828a8148 ("octeontx2-af: Add NPA aura and pool contexts to debugfs")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/marvell/oc
t;phydev" variables can possibly be in &selected state and print a
warning.
The code is below.
regards,
dan carpenter
#include "smatch.h"
#include "smatch_slist.h"
static int my_id;
STATE(selected);
static sval_t err_min = { .type = &int_ctype, .value = -4095 }
On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote:
> Smatch warns that there is a locking issue in this function:
>
> drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin()
> warn: inconsistent returns '&phydev->mdio.bus->mdio_lock'.
> Locked on
rt the incorrect fix.
Fixes: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in
otx2_get_fecparam()")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/
say we have to call
phy_restore_page() even if the call to phy_select_page() fails.
Fixes: f9bc51e6cce2 ("net: phy: icplus: fix paged register access")
Signed-off-by: Dan Carpenter
---
drivers/net/phy/icplus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/
quot;octeontx2-pf: cn10k: Add mbox support for CN10K")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
b/drivers/net/ethe
copy_to_user(&ifr->ifr_hwaddr, &sa, sizeof(sa)))
1096 ret = -EFAULT;
1097 tap_put_tap_dev(tap);
1098 rtnl_unlock();
1099 return ret;
1100
regards,
dan carpenter
g" then
you end up wasting maintainer time and developer time. That's like an
ambiguous thing, right? We try to avoid ambiguity and be mechanical and
predictable.
We won't apply patches which fix checkpatch warnings if the result is
worse looking code. This might seem like an ambiguous judgement call to
newbies but it is actually 100% predictable to oldbies. :P
Anyway the v2 v3 stuff is supposed to be below the --- cut off so please
fix that and resend.
regards,
dan carpenter
On Mon, Feb 15, 2021 at 08:04:11AM -0700, David Ahern wrote:
> On 2/15/21 5:03 AM, Dan Carpenter wrote:
> > Hi Arjun,
> >
> > url:
> > https://github.com/0day-ci/linux/commits/Arjun-Roy/tcp-Sanitize-CMSG-flags-and-reserved-args-in-tcp_zerocopy_receive/20210212-052
by itself. And I removed the FEC_MAX_INDEX define and used
ARRAY_SIZE(fec) instead.
Fixes: d0cf9503e908 ("octeontx2-pf: ethtool fec mode support")
Signed-off-by: Dan Carpenter
---
.../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c| 9 +
1 file changed, 5 insertions(+),
On Mon, Feb 15, 2021 at 03:19:31PM +0200, Vladimir Oltean wrote:
> Hi Dan,
>
> On Mon, Feb 15, 2021 at 04:00:04PM +0300, Dan Carpenter wrote:
> > db->index is less than db->num_ports which 32 or less but sometimes it
> > comes from the device tree so who knows.
>
.config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/dsa/tag_ocelot.c:59 ocelot_xmit() warn: should '(((1))) << (dp->index)' be
a 64 bit type?
n
-m001-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/ipv4/tcp.c:4158 do_tcp_getsockopt() warn: check for integer overflow 'len&
On Mon, Sep 28, 2020 at 06:31:04PM +, Ariel Levkovich wrote:
> On Sep 28, 2020, at 13:42, Dan Carpenter wrote:
> >
> > The mlx5_tc_ct_init() function doesn't return error pointers it returns
> > NULL. Also we need to set the error codes on this path.
> >
On Wed, Feb 10, 2021 at 01:48:20PM +0200, Leon Romanovsky wrote:
> On Wed, Feb 10, 2021 at 11:51:51AM +0300, Dan Carpenter wrote:
> > Hello Vlad Buslov,
> >
> > The patch 84ae9c1f29c0: "net/mlx5e: E-Switch, Maintain vhca_id to
> > vport_num mapping" from Sep 23
The mlx5_chains_get_table() function doesn't return NULL, it returns
error pointers so we need to fix this condition.
Fixes: 34ca65352ddf ("net/mlx5: E-Switch, Indirect table infrastructure")
Signed-off-by: Dan Carpenter
---
This applies to net-next but it might actually go thro
-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2188 qede_get_per_coalesce()
warn
Probe should return an error code if platform_get_irq_byname() fails
but it returns success instead.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
Reviewed-by: Vladimir Oltean
---
v3: rebase
drivers/net/ethernet/mscc/ocelot_vsc
g to
resource leaks and double frees.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
Reviewed-by: Vladimir Oltean
Tested-by: Vladimir Oltean
---
v2: Part of the commit was missing
v3: The first version introduced a bug which completel
ed process
because the cmd cannot complete.
Sometimes it's hard to know what the affect of a bug is, but since
you're working in the subsystem then you probably have a better guess
than the rest of us so even a guess is useful.
regards,
dan carpenter
u
>
> BT_DBG("request for %s", hdev->name);
>
> - if (len <= sizeof(*cp) || cp->pattern_count == 0) {
> + if (len <= sizeof(*cp) || cp->pattern_count == 0 ||
> + len < sizeof(*cp) + cp->pattern_count *
> + sizeof(struct mgmt_adv_pattern)) {
> err = mgmt_cmd_status(sk, hdev->id,
> MGMT_OP_ADD_ADV_PATTERNS_MONITOR,
> MGMT_STATUS_INVALID_PARAMS);
>
I think this was already fixed on Jan 22 commit b4a221ea8a1f ("Bluetooth:
advmon offload MSFT add rssi support").
expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern);
if (len != expected_size) {
Now someone needs to backport it to stable.
regards,
dan carpenter
The "ring->addr = addr;" assignment is done a few lines later so we
can't use "ring->addr" yet. The correct dma_handle is "addr".
Fixes: 650d1603825d ("soc: qcom: ipa: the generic software interface")
Signed-off-by: Dan Carpenter
---
Smatch al
quot; pre-op instead of a post-op to avoid a buffer underflow.
The "if (!registered_ports[port])" condition was reversed leading to
resource leaks and double frees.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
---
v2: In v1
quot; pre-op instead of a post-op to avoid a buffer underflow.
The "if (!registered_ports[port])" condition was reversed leading to
resource leaks and double frees.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
---
drivers/n
mention our static checkers..
>
>
> Dan, do you think the concern from the above-quoted commit is still
> valid? Is this something that smatch flags these days? We're apparently
> paying a real performance price in networking for tying compiler's hands
> with -fno-delete-null-pointer-checks
If I had to guess why GCC doesn't warn about this I would say that
probably it's because a lot of macros have NULL checks built in. Most
static analysis tools have a warning about inconsistent NULL checks but
Smatch won't warn about it unless it can lead to a NULL dereference.
The fact that pointless NULL checks slow down the code has never
bothered anyone up to now.
regards,
dan carpenter
On Mon, Jan 25, 2021 at 04:18:07PM +, Vladimir Oltean wrote:
> Hi Dan,
>
> On Mon, Jan 25, 2021 at 11:42:03AM +0300, Dan Carpenter wrote:
> > diff --git a/drivers/net/ethernet/mscc/ocelot_net.c
> > b/drivers/net/ethernet/mscc/ocelot_net.c
> > index 9553eb3e441c..87
Probe should return an error code if platform_get_irq_byname() fails
but it returns success instead.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
---
v2: no change
drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 +++-
1 file
Oops. Please ignore this patch. Part of it is missing.
regards,
dan carpenter
Probe should return an error code if platform_get_irq_byname() fails
but it returns success instead.
Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 +++-
1 file changed, 3 insert
the git log.
> drivers/net/can/dev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
regards,
dan carpenter
482d2ce349 ("net: dsa: b53: Plug in VLAN support")
Signed-off-by: Dan Carpenter
---
drivers/net/dsa/b53/b53_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 288b5a5c3e0d..95c7fa171e35
52ea27 ("net: dsa: Mock-up driver")
Signed-off-by: Dan Carpenter
---
I'm not 100% sure where this is checked but the other code has comments
and assumptions that say that it is and Smatch says that it is. If I
had to guess, I would say that the check is in the nla policy.
[NL
58334e7537278793c86baa88b70c48b0d50b00ae
config: i386-randconfig-m021-20210108 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
net/core
s is an official proposal.
>
Feel free to ignore Markus... :/ We have asked him over and over to
stop sending these sort of advice but he refused and eventually he was
banned from the mailing lists. The rest of us can't see his messages to
you unless we're included personally in the CC list.
regards,
dan carpenter
9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/net/virtio_net.c:2669 virtnet_xsk_timeout() warn: test_bit() takes a
bit number
drivers/net/virtio_net.c:2899 virtnet_xsk_run() warn
Of course, Smatch didn't trigger any warnings in the wfx driver. I need
to try re-write this check to use the cross function database so
function pointers are handled.
regards,
dan carpenter
stack with DMA.
> >
> > You should never do that because some platforms do not support it, so no
> > driver should ever try to do that as they do not know what platform they
> > are running on.
>
> Yes, I have learned this rule the hard way.
>
> There is no better
This error path needs to disable the pci device before returning.
Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")
Signed-off-by: Dan Carpenter
---
drivers/atm/idt77252.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/idt77252.c b/d
Return -EINVAL if we can't find the correct device. Currently it
returns success.
Fixes: 13159183ec7a ("qlcnic: 83xx base driver")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/
On Tue, Dec 15, 2020 at 08:08:15PM +0100, Maxime Ripard wrote:
> On Tue, Dec 15, 2020 at 07:18:48PM +0100, Christophe JAILLET wrote:
> > Le 15/12/2020 à 12:37, Maxime Ripard a écrit :
> > > On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote:
> > > > On T
here is some resources leaks.
>
> Do you have a source to back that? It's not clear at all from the
> documentation for those functions, and couldn't find any user calling it
> from the ten-or-so random picks I took.
It looks like irq_create_of_mapping() needs to be fre
_switchdev_blocking_nb);
1284
1285 dev_info(&pdev->dev, "Ocelot switch probed\n");
1286
1287 out_put_ports:
1288 of_node_put(ports);
1289 return err;
1290 }
regards,
dan carpenter
On Thu, Dec 10, 2020 at 05:07:28PM +0200, Maxim Mikityanskiy wrote:
> On 2020-12-10 10:28, Dan Carpenter wrote:
> > Hi Maxim,
> >
> >
> > url:
> > https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/20201210-000703
> > base:
> >
: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/sched/sch_htb.c:1310 htb_dump_class_stats() error: we previously assumed
'cl->leaf.q' could be null (see line 130
> Signed-off-by: Enrico Weigelt
> > ---
> > drivers/accessibility/speakup/main.c | 1 -
>
>
>
> Yous subject line is odd, these are not "staging" drivers anymore, so
> why do you say they are there?
Also putting "drivers:" in the subject always seems superfluous.
regards,
dan carpenter
t makes the kfree_skb() a no-op.
Fixes: d25f2f71f653 ("crypto: chtls - Program the TLS session Key")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/chelsio/inline_cry
These debugfs never return NULL so all this code will never be run.
In the normal case, (and in this case particularly), the debugfs
functions are not supposed to be checked for errors so all this error
checking code can be safely deleted.
Signed-off-by: Dan Carpenter
---
.../marvell/octeontx2
ted-by: "kiyin(尹亮)"
Signed-off-by: Dan Carpenter
---
The first patch put a NUL terminator on the end of the string and this
patch returns an error instead. I don't have a strong preference, which
patch to go with.
net/x25/af_x25.c | 6 --
1 file changed, 4 insertions(+), 2
h (x) {
> case 0:
> ++x;
> default:
> ;
> }
Don't warn for this.
If adding a break statement changes the flow of the code then warn about
potentially missing break statements, but if it doesn't change anything
then don't warn about it.
regards,
dan carpenter
of a warning.
>
> FWIW, this series has found at least one bug so far:
> https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=kr...@mail.gmail.com/
This is a fallthrough to a return and not to a break. That should
trigger a warning. The fallthrough to a break should not generate a
warning.
The bug we're trying to fix is "missing break statement" but if the
result of the bug is "we hit a break statement" then now we're just
talking about style. GCC should limit itself to warning about
potentially buggy code.
regards,
dan carpenter
ate to remove the
> "default" case.
There are checkers which complain about that. (As a static checker
developer myself, I think complaining about missing default cases is a
waste of everyone's time).
regards,
dan carpenter
t->routes[1] =
> t->routes[2];
> + break;
> case 2:
> break;
> }
regards,
dan carpenter
o putting a NUL
terminator as the 16th character is safe and obviously preferable to
reading out of bounds.
Signed-off-by: "kiyin(尹亮)"
Signed-off-by: Dan Carpenter
---
net/x25/af_x25.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 0bb
There is a double free here because mlxsw_sp_nexthop6_group_create() and
mlxsw_sp_nexthop6_group_info_init() free "nh_grp". It should only be
freed in the create function.
Fixes: 7f7a417e6a11 ("mlxsw: spectrum_router: Split nexthop group configuration
to a different struct"
;
> > Too late.
> >
> > 214 return;
> > 215
> >
> > Fixes: 93f323b9 ("mptcp: add a new sysctl add_addr_timeout")
> > Reported-by: Dan Carpenter
> > Signed-off-by: Geliang Tang
>
all the software on it and an ethernet cable into your
house. I don't know what software the antennaes are using. Probably
Linux but with an out of tree kernel module is my guess.
regards,
dan carpenter
9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
net/core/filter.c:5395 bpf_ipv4_fib_lookup() error: uninitialized symbol 'mtu'.
vim +/mtu +5395 net/core/filter.c
87f5fc7e48d
-randconfig-m021-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/ipv4/inet_hashtables.c:570 inet_ehash_insert_chk_dup() error: uninitialized
This needs to unlock before returning.
Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions")
Signed-off-by: Dan Carpenter
---
net/core/devlink.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 03
These paths don't set the error codes. It's especially important in
devlink_nl_region_notify_build() where it leads to a NULL dereference in
the caller.
Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions")
Signed-off-by: Dan Carpenter
---
net
On Mon, Oct 26, 2020 at 11:18:16AM +0800, Yunsheng Lin wrote:
> On 2020/10/23 19:22, Dan Carpenter wrote:
> > Smatch complains that "ret" might be uninitialized if we don't enter
> > the loop. We do always enter the loop so it's a false positive, but
> > i
The copy_to/from_user() functions return the number of bytes which we
weren't able to copy but the ioctl should return -EFAULT if they fail.
Fixes: a127c5bbb6a8 ("vhost-vdpa: fix backend feature ioctls")
Signed-off-by: Dan Carpenter
---
drivers/vhost/vdpa.c | 10 +-
1
Smatch complains that "ret" might be uninitialized if we don't enter
the loop. We do always enter the loop so it's a false positive, but
it's cleaner to just return a literal zero and that silences the
warning as well.
Signed-off-by: Dan Carpenter
---
drivers/net/ether
old one,
> which would be the result of this patch.
>
Oh, wow. You're absolutely right. That's pretty subtle. Thanks for
catching it.
regards,
dan carpenter
> Best regards
> Karsten
>
> On 10/22/20 9:07 AM, Dan Carpenter wrote:
> > This frees "*s
This frees "*sp" before dereferencing it to get "len = (*sp)->len;".
Fixes: af69fb3a8ffa ("Add mISDN HFC multiport driver")
Signed-off-by: Dan Carpenter
---
drivers/isdn/hardware/mISDN/hfcmulti.c | 10 --
1 file changed, 4 insertions(+), 6 deleti
in the function but when there are
three or more allocations, then use gotos to unwind.
Ideally there would be a ql_deinit_device() function to mirror the
ql_init_device() function. The ql_init_device() is staging quality
code with leaks and bad label names. It should be re-written to free
things one step at a time instead of calling ql_release_all().
Anyway, let's not introduce new leaks at least.
regards,
dan carpenter
> dereference 'tmp_buf'
> > >227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL);
> > >228 ret = wfx_send_pds(wdev, tmp_buf, pds->size);
> > > ^^^
> > >229 kfree(tmp_
On Sat, Oct 10, 2020 at 04:18:11PM +0300, Dan Carpenter wrote:
> On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote:
> > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote:
> > > CAUTION: This email originated from outside of the organization. Do not
> &g
r_code == 5 ||
> + return 0;
> +
> + if (work->word2.snoip.err_code == 5 ||
> work->word2.snoip.err_code == 7) {
This line is indented to match the old code and it no longer matches.
(Please update the whitespace).
> /*
>* We received a packet with either an alignment error
regards,
dan carpenter
tly in the code. Don't introduce
indirection if you can help it.
> + int regs_num = (seg_header->seg_size - header_size) / sizeof(u32);
> + int err;
> +
regards,
dan carpenter
; + struct devlink *devlink;
> + struct qlge_devlink *ql_devlink;
> +
> + devlink = devlink_alloc(&qlge_devlink_ops, sizeof(struct qlge_devlink));
> + if (!devlink)
> + return -ENOMEM;
> + ql_devlink = devlink_priv(devlink);
>
> ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
>min(MAX_CPUS,
> @@ -4614,6 +4624,16 @@ static int qlge_probe(struct pci_dev *pdev,
> free_netdev(ndev);
> return err;
> }
> +
> + err = devlink_register(devlink, &pdev->dev);
> + if (err) {
> + goto devlink_free;
> + }
Checkpatch warning.
regards,
dan carpenter
t
ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl
'0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates'
Some of these are unpublished checks that I haven't published because
they are too
re as the previous comparison issue
> reported by zero day.
It was reported on Sep 25. I forward those zero day bot emails.
https://lore.kernel.org/lkml/20200925123858.GX18329@kadam/
regards,
dan carpenter
On Mon, Sep 28, 2020 at 06:31:04PM +, Ariel Levkovich wrote:
> On Sep 28, 2020, at 13:42, Dan Carpenter wrote:
> >
> > The mlx5_tc_ct_init() function doesn't return error pointers it returns
> > NULL. Also we need to set the error codes on this path.
> >
If "slow_attr" is NULL then this function will Oops.
Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
The mlx5_tc_ct_init() function doesn't return error pointers it returns
NULL. Also we need to set the error codes on this path.
Fixes: aedd133d17bc ("net/mlx5e: Support CT offload for tc nic flows")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/mellanox/mlx5/c
This code frees "shared_counter" and then dereferences on the next line
to get the error code.
Fixes: 1edae2335adf ("net/mlx5e: CT: Use the same counter for both directions")
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +++
1 - 100 of 575 matches
Mail list logo