From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [saeed:net-next 14/98] net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
Date: Tue, 05 Jan 2021 15:18:40 +0300 [thread overview]
Message-ID: <20210105121840.GC2809@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3523 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git net-next
head: 5d0f806c7608fe61c73b31b28411ebb94b962ebf
commit: d1521c0603f22c6702c63c9354e80cd94d6c7dc6 [14/98] net: ipv6: Validate GSO SKB before finish IPv6 processing
config: x86_64-randconfig-m001-20201229 (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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
Old smatch warnings:
net/ipv6/ip6_output.c:158 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
net/ipv6/ip6_output.c:291 ip6_xmit() error: we previously assumed 'np' could be null (see line 285)
vim +/ret +154 net/ipv6/ip6_output.c
d1521c0603f22c6 Aya Levin 2020-12-16 128 static int
d1521c0603f22c6 Aya Levin 2020-12-16 129 ip6_finish_output_gso_slowpath_drop(struct net *net, struct sock *sk,
d1521c0603f22c6 Aya Levin 2020-12-16 130 struct sk_buff *skb, unsigned int mtu)
d1521c0603f22c6 Aya Levin 2020-12-16 131 {
d1521c0603f22c6 Aya Levin 2020-12-16 132 struct sk_buff *segs, *nskb;
d1521c0603f22c6 Aya Levin 2020-12-16 133 netdev_features_t features;
d1521c0603f22c6 Aya Levin 2020-12-16 134 int ret;
^^^^^^^
d1521c0603f22c6 Aya Levin 2020-12-16 135
d1521c0603f22c6 Aya Levin 2020-12-16 136 /* Please see corresponding comment in ip_finish_output_gso
d1521c0603f22c6 Aya Levin 2020-12-16 137 * describing the cases where GSO segment length exceeds the
d1521c0603f22c6 Aya Levin 2020-12-16 138 * egress MTU.
d1521c0603f22c6 Aya Levin 2020-12-16 139 */
d1521c0603f22c6 Aya Levin 2020-12-16 140 features = netif_skb_features(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 141 segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
d1521c0603f22c6 Aya Levin 2020-12-16 142 if (IS_ERR_OR_NULL(segs)) {
d1521c0603f22c6 Aya Levin 2020-12-16 143 kfree_skb(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 144 return -ENOMEM;
d1521c0603f22c6 Aya Levin 2020-12-16 145 }
d1521c0603f22c6 Aya Levin 2020-12-16 146
d1521c0603f22c6 Aya Levin 2020-12-16 147 consume_skb(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 148
d1521c0603f22c6 Aya Levin 2020-12-16 149 skb_list_walk_safe(segs, segs, nskb) {
d1521c0603f22c6 Aya Levin 2020-12-16 150 int err;
d1521c0603f22c6 Aya Levin 2020-12-16 151
d1521c0603f22c6 Aya Levin 2020-12-16 152 skb_mark_not_on_list(segs);
d1521c0603f22c6 Aya Levin 2020-12-16 153 err = ip6_fragment(net, sk, segs, ip6_finish_output2);
d1521c0603f22c6 Aya Levin 2020-12-16 @154 if (err && ret == 0)
^^^^^^^^
"ret" is uninitialized for the first error.
d1521c0603f22c6 Aya Levin 2020-12-16 155 ret = err;
d1521c0603f22c6 Aya Levin 2020-12-16 156 }
d1521c0603f22c6 Aya Levin 2020-12-16 157
d1521c0603f22c6 Aya Levin 2020-12-16 158 return ret;
d1521c0603f22c6 Aya Levin 2020-12-16 159 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39282 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [saeed:net-next 14/98] net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
Date: Tue, 05 Jan 2021 15:18:40 +0300 [thread overview]
Message-ID: <20210105121840.GC2809@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3523 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git net-next
head: 5d0f806c7608fe61c73b31b28411ebb94b962ebf
commit: d1521c0603f22c6702c63c9354e80cd94d6c7dc6 [14/98] net: ipv6: Validate GSO SKB before finish IPv6 processing
config: x86_64-randconfig-m001-20201229 (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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
Old smatch warnings:
net/ipv6/ip6_output.c:158 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret'.
net/ipv6/ip6_output.c:291 ip6_xmit() error: we previously assumed 'np' could be null (see line 285)
vim +/ret +154 net/ipv6/ip6_output.c
d1521c0603f22c6 Aya Levin 2020-12-16 128 static int
d1521c0603f22c6 Aya Levin 2020-12-16 129 ip6_finish_output_gso_slowpath_drop(struct net *net, struct sock *sk,
d1521c0603f22c6 Aya Levin 2020-12-16 130 struct sk_buff *skb, unsigned int mtu)
d1521c0603f22c6 Aya Levin 2020-12-16 131 {
d1521c0603f22c6 Aya Levin 2020-12-16 132 struct sk_buff *segs, *nskb;
d1521c0603f22c6 Aya Levin 2020-12-16 133 netdev_features_t features;
d1521c0603f22c6 Aya Levin 2020-12-16 134 int ret;
^^^^^^^
d1521c0603f22c6 Aya Levin 2020-12-16 135
d1521c0603f22c6 Aya Levin 2020-12-16 136 /* Please see corresponding comment in ip_finish_output_gso
d1521c0603f22c6 Aya Levin 2020-12-16 137 * describing the cases where GSO segment length exceeds the
d1521c0603f22c6 Aya Levin 2020-12-16 138 * egress MTU.
d1521c0603f22c6 Aya Levin 2020-12-16 139 */
d1521c0603f22c6 Aya Levin 2020-12-16 140 features = netif_skb_features(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 141 segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
d1521c0603f22c6 Aya Levin 2020-12-16 142 if (IS_ERR_OR_NULL(segs)) {
d1521c0603f22c6 Aya Levin 2020-12-16 143 kfree_skb(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 144 return -ENOMEM;
d1521c0603f22c6 Aya Levin 2020-12-16 145 }
d1521c0603f22c6 Aya Levin 2020-12-16 146
d1521c0603f22c6 Aya Levin 2020-12-16 147 consume_skb(skb);
d1521c0603f22c6 Aya Levin 2020-12-16 148
d1521c0603f22c6 Aya Levin 2020-12-16 149 skb_list_walk_safe(segs, segs, nskb) {
d1521c0603f22c6 Aya Levin 2020-12-16 150 int err;
d1521c0603f22c6 Aya Levin 2020-12-16 151
d1521c0603f22c6 Aya Levin 2020-12-16 152 skb_mark_not_on_list(segs);
d1521c0603f22c6 Aya Levin 2020-12-16 153 err = ip6_fragment(net, sk, segs, ip6_finish_output2);
d1521c0603f22c6 Aya Levin 2020-12-16 @154 if (err && ret == 0)
^^^^^^^^
"ret" is uninitialized for the first error.
d1521c0603f22c6 Aya Levin 2020-12-16 155 ret = err;
d1521c0603f22c6 Aya Levin 2020-12-16 156 }
d1521c0603f22c6 Aya Levin 2020-12-16 157
d1521c0603f22c6 Aya Levin 2020-12-16 158 return ret;
d1521c0603f22c6 Aya Levin 2020-12-16 159 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39282 bytes --]
next reply other threads:[~2021-01-05 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 12:18 Dan Carpenter [this message]
2021-01-05 12:18 ` [saeed:net-next 14/98] net/ipv6/ip6_output.c:154 ip6_finish_output_gso_slowpath_drop() error: uninitialized symbol 'ret' Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2020-12-29 9:55 kernel test robot
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=20210105121840.GC2809@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.