* [linux-next:master 4175/4668] net/dsa/tag_sja1105.c:564 sja1110_rcv() error: uninitialized symbol 'vid'.
@ 2021-08-02 14:19 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-08-02 14:19 UTC (permalink / raw)
To: kbuild, Vladimir Oltean; +Cc: lkp, kbuild-all, Linux Memory Management List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-02 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-02 14:19 [linux-next:master 4175/4668] net/dsa/tag_sja1105.c:564 sja1110_rcv() error: uninitialized symbol 'vid' Dan Carpenter
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).