lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <46c1790a-0860-4907-894e-2d8ec4622147@stanley.mountain>
Date: Thu, 6 Mar 2025 12:49:04 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: netdev@...r.kernel.org
Subject: [bug report] net: airoha: Move DSA tag in DMA descriptor

Hello Lorenzo Bianconi,

Commit af3cf757d5c9 ("net: airoha: Move DSA tag in DMA descriptor")
from Feb 28, 2025 (linux-next), leads to the following Smatch static
checker warning:

	drivers/net/ethernet/airoha/airoha_eth.c:1722 airoha_get_dsa_tag()
	warn: 'dp' isn't an ERR_PTR

drivers/net/ethernet/airoha/airoha_eth.c
    1710 static u32 airoha_get_dsa_tag(struct sk_buff *skb, struct net_device *dev)
    1711 {
    1712 #if IS_ENABLED(CONFIG_NET_DSA)
    1713         struct ethhdr *ehdr;
    1714         struct dsa_port *dp;
    1715         u8 xmit_tpid;
    1716         u16 tag;
    1717 
    1718         if (!netdev_uses_dsa(dev))
    1719                 return 0;
    1720 
    1721         dp = dev->dsa_ptr;
--> 1722         if (IS_ERR(dp))

Why would this be an error pointer?  Is this supposed to be a check for
NULL?

    1723                 return 0;
    1724 
    1725         if (dp->tag_ops->proto != DSA_TAG_PROTO_MTK)
    1726                 return 0;
    1727 
    1728         if (skb_cow_head(skb, 0))
    1729                 return 0;
    1730 

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ