From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4175/4668] net/dsa/tag_sja1105.c:564 sja1110_rcv() error: uninitialized symbol 'vid'.
Date: Mon, 2 Aug 2021 17:19:22 +0300 [thread overview]
Message-ID: <202107311906.ctW7fO5Y-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8d4b477da1a807199ca60e0829357ce7aa6758d5
commit: 04a1758348a87eb73b8a4554d0c227831e2bb33e [4175/4668] net: dsa: tag_sja1105: fix control packets on SJA1110 being received on an imprecise port
config: i386-randconfig-m021-20210730 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/dsa/tag_sja1105.c:564 sja1110_rcv() error: uninitialized symbol 'vid'.
vim +/vid +564 net/dsa/tag_sja1105.c
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 543 static struct sk_buff *sja1110_rcv(struct sk_buff *skb,
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 544 struct net_device *netdev,
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 545 struct packet_type *pt)
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 546 {
0fac6aa098edf9 Vladimir Oltean 2021-07-19 547 int source_port = -1, switch_id = -1;
884be12f85666c Vladimir Oltean 2021-07-26 548 u16 vid;
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 549
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 550 skb->offload_fwd_mark = 1;
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 551
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 552 if (sja1110_skb_has_inband_control_extension(skb)) {
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 553 skb = sja1110_rcv_inband_control_extension(skb, &source_port,
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 554 &switch_id);
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 555 if (!skb)
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 556 return NULL;
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 557 }
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 558
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 559 /* Packets with in-band control extensions might still have RX VLANs */
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 560 if (likely(sja1105_skb_has_tag_8021q(skb)))
04a1758348a87e Vladimir Oltean 2021-07-29 561 sja1105_vlan_rcv(skb, &source_port, &switch_id, &vid);
Not initialized on else path.
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 562
04a1758348a87e Vladimir Oltean 2021-07-29 563 if (source_port == -1 || switch_id == -1)
884be12f85666c Vladimir Oltean 2021-07-26 @564 skb->dev = dsa_find_designated_bridge_port_by_vid(netdev, vid);
^^^
884be12f85666c Vladimir Oltean 2021-07-26 565 else
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 566 skb->dev = dsa_master_find_slave(netdev, switch_id, source_port);
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 567 if (!skb->dev) {
884be12f85666c Vladimir Oltean 2021-07-26 568 netdev_warn(netdev, "Couldn't decode source port\n");
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 569 return NULL;
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 570 }
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 571
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 572 return skb;
4913b8ebf8a9c5 Vladimir Oltean 2021-06-11 573 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-08-02 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202107311906.ctW7fO5Y-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).