[kbuild] [linux-next:master 11987/12912] net/netfilter/nf_conntrack_core.c:2068 __nf_conntrack_update() error: uninitialized symbol 'ctinfo'.
CC: kbuild-...@lists.01.org TO: Pablo Neira Ayuso CC: Florian Westphal tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8 commit: ee04805ff54a63ffd90bc6749ebfe73473734ddb [11987/12912] netfilter: conntrack: make conntrack userspace helpers work again :: branch date: 16 hours ago :: commit date: 32 hours ago config: i386-randconfig-m021-20200527 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter New smatch warnings: net/netfilter/nf_conntrack_core.c:2068 __nf_conntrack_update() error: uninitialized symbol 'ctinfo'. net/netfilter/nf_conntrack_core.c:2117 nf_confirm_cthelper() warn: unsigned 'protoff' is never less than zero. Old smatch warnings: net/netfilter/nf_conntrack_core.c:1314 early_drop() error: uninitialized symbol 'bucket'. # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee04805ff54a63ffd90bc6749ebfe73473734ddb git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout ee04805ff54a63ffd90bc6749ebfe73473734ddb vim +/ctinfo +2068 net/netfilter/nf_conntrack_core.c 9fb9cbb1082d6b3 Yasuyuki Kozakai 2005-11-09 2018 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2019 static int __nf_conntrack_update(struct net *net, struct sk_buff *skb, ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2020 struct nf_conn *ct) 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2021 { 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2022 struct nf_conntrack_tuple_hash *h; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2023 struct nf_conntrack_tuple tuple; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2024 enum ip_conntrack_info ctinfo; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2025 struct nf_nat_hook *nat_hook; 6816d931cab0090 Florian Westphal 2018-06-29 2026 unsigned int status; 6816d931cab0090 Florian Westphal 2018-06-29 2027 int dataoff; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2028 u16 l3num; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2029 u8 l4num; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2030 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2031 l3num = nf_ct_l3num(ct); 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2032 6816d931cab0090 Florian Westphal 2018-06-29 2033 dataoff = get_l4proto(skb, skb_network_offset(skb), l3num, &l4num); 6816d931cab0090 Florian Westphal 2018-06-29 2034 if (dataoff <= 0) 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2035 return -1; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2036 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2037 if (!nf_ct_get_tuple(skb, skb_network_offset(skb), dataoff, l3num, 303e0c5589592e4 Florian Westphal 2019-01-15 2038 l4num, net, &tuple)) 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2039 return -1; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2040 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2041 if (ct->status & IPS_SRC_NAT) { 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2042 memcpy(tuple.src.u3.all, 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2043 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.all, 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2044 sizeof(tuple.src.u3.all)); 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2045 tuple.src.u.all = 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2046 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.all; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2047 } 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2048 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2049 if (ct->status & IPS_DST_NAT) { 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2050 memcpy(tuple.dst.u3.all, 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2051 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3.all, 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2052 sizeof(tuple.dst.u3.all)); 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2053 tuple.dst.u.all = 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2054 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u.all; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2055 } 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2056 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2057 h = nf_conntrack_find_get(net, nf_ct_zone(ct), &tuple); 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2058 if (!h) 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2059 return 0; 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2060 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2061 /* Store status bits of the connt
[kbuild] [linux-next:master 11987/12912] net/netfilter/nf_conntrack_core.c:2117:6-13: WARNING: Unsigned expression compared with zero: protoff < 0
CC: kbuild-...@lists.01.org TO: Pablo Neira Ayuso CC: Florian Westphal tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8 commit: ee04805ff54a63ffd90bc6749ebfe73473734ddb [11987/12912] netfilter: conntrack: make conntrack userspace helpers work again :: branch date: 13 hours ago :: commit date: 29 hours ago config: microblaze-randconfig-c022-20200526 (attached as .config) compiler: microblaze-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Julia Lawall coccinelle warnings: (new ones prefixed by >>) >> net/netfilter/nf_conntrack_core.c:2117:6-13: WARNING: Unsigned expression >> compared with zero: protoff < 0 # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee04805ff54a63ffd90bc6749ebfe73473734ddb git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout ee04805ff54a63ffd90bc6749ebfe73473734ddb vim +2117 net/netfilter/nf_conntrack_core.c 368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2086 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2087 /* This packet is coming from userspace via nf_queue, complete the packet ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2088 * processing after the helper invocation in nf_confirm(). ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2089 */ ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2090 static int nf_confirm_cthelper(struct sk_buff *skb, struct nf_conn *ct, ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2091 enum ip_conntrack_info ctinfo) ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2092 { ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2093 const struct nf_conntrack_helper *helper; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2094 const struct nf_conn_help *help; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2095 unsigned int protoff; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2096 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2097 help = nfct_help(ct); ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2098 if (!help) ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2099 return 0; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2100 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2101 helper = rcu_dereference(help->helper); ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2102 if (!(helper->flags & NF_CT_HELPER_F_USERSPACE)) ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2103 return 0; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2104 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2105 switch (nf_ct_l3num(ct)) { ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2106 case NFPROTO_IPV4: ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2107 protoff = skb_network_offset(skb) + ip_hdrlen(skb); ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2108 break; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2109 #if IS_ENABLED(CONFIG_IPV6) ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2110 case NFPROTO_IPV6: { ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2111 __be16 frag_off; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2112 u8 pnum; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2113 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2114 pnum = ipv6_hdr(skb)->nexthdr; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2115 protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &pnum, ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2116 &frag_off); ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 @2117 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2118 return 0; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2119 break; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2120 } ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2121 #endif ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2122 default: ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2123 return 0; ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2124 } ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2125 ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2126 if (test_bit(IPS_SEQ_ADJUST_BIT, &ct->status) && ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2127 !nf_is_loopback_packet(skb)) { ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2128 if (!nf_ct_seq_adjust(skb, ct, ctinfo, protoff)) { ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2129 NF_CT_STAT_INC_ATOMIC(nf_ct_net(ct), drop); ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2130 return -1; ee04805ff54a63f Pablo Neira Ayuso 2020-0
[kbuild] [linux-next:master 10689/12912] drivers/infiniband/hw/hfi1/netdev_rx.c:335 hfi1_netdev_free() error: use free_netdev() here instead of kfree(dd->dummy_netdev)
CC: kbuild-...@lists.01.org TO: Grzegorz Andrejczuk CC: Jason Gunthorpe CC: Mike Marciniszyn CC: Dennis Dalessandro CC: Sadanand Warrier CC: Kaike Wan tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8 commit: 370caa5b5880cd988645735c2d5d1d597c258e39 [10689/12912] IB/hfi1: Add rx functions for dummy netdev :: branch date: 7 hours ago :: commit date: 5 days ago config: x86_64-randconfig-m001-20200526 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/infiniband/hw/hfi1/netdev_rx.c:335 hfi1_netdev_free() error: use free_netdev() here instead of kfree(dd->dummy_netdev) # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=370caa5b5880cd988645735c2d5d1d597c258e39 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout 370caa5b5880cd988645735c2d5d1d597c258e39 vim +335 drivers/infiniband/hw/hfi1/netdev_rx.c 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 327 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 328 void hfi1_netdev_free(struct hfi1_devdata *dd) 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 329 { 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 330 struct hfi1_netdev_priv *priv; 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 331 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 332 if (dd->dummy_netdev) { 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 333 priv = hfi1_netdev_priv(dd->dummy_netdev); 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 334 dd_dev_info(dd, "hfi1 netdev freed\n"); 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 @335 kfree(dd->dummy_netdev); 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 336 dd->dummy_netdev = NULL; 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 337 } 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 338 } 370caa5b5880cd9 Grzegorz Andrejczuk 2020-05-11 339 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [linux-next:master 12558/12912] net/ipv4/tcp_ipv4.c:576 tcp_v4_err() error: uninitialized symbol 'skb'.
CC: kbuild-...@lists.01.org TO: Eric Dumazet CC: "Maciej Żenczykowski" tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8 commit: 45af29ca761c275e350cca659856bc56f1035ef9 [12558/12912] tcp: allow traceroute -Mtcp for unpriv users :: branch date: 6 hours ago :: commit date: 16 hours ago config: i386-randconfig-m021-20200526 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: net/ipv4/tcp_ipv4.c:576 tcp_v4_err() error: uninitialized symbol 'skb'. # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=45af29ca761c275e350cca659856bc56f1035ef9 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout 45af29ca761c275e350cca659856bc56f1035ef9 vim +/skb +576 net/ipv4/tcp_ipv4.c 26e3736090e103 Eric Dumazet 2015-03-22 405 ^1da177e4c3f41 Linus Torvalds2005-04-16 406 /* ^1da177e4c3f41 Linus Torvalds2005-04-16 407 * This routine is called by the ICMP module when it gets some ^1da177e4c3f41 Linus Torvalds2005-04-16 408 * sort of error condition. If err < 0 then the socket should ^1da177e4c3f41 Linus Torvalds2005-04-16 409 * be closed and the error returned to the user. If err > 0 ^1da177e4c3f41 Linus Torvalds2005-04-16 410 * it's just the icmp type << 8 | icmp code. After adjustment ^1da177e4c3f41 Linus Torvalds2005-04-16 411 * header points to the first 8 bytes of the tcp header. We need ^1da177e4c3f41 Linus Torvalds2005-04-16 412 * to find the appropriate port. ^1da177e4c3f41 Linus Torvalds2005-04-16 413 * ^1da177e4c3f41 Linus Torvalds2005-04-16 414 * The locking strategy used here is very "optimistic". When ^1da177e4c3f41 Linus Torvalds2005-04-16 415 * someone else accesses the socket the ICMP is just dropped ^1da177e4c3f41 Linus Torvalds2005-04-16 416 * and for some paths there is no check at all. ^1da177e4c3f41 Linus Torvalds2005-04-16 417 * A more general error queue to queue errors for later handling ^1da177e4c3f41 Linus Torvalds2005-04-16 418 * is probably better. ^1da177e4c3f41 Linus Torvalds2005-04-16 419 * ^1da177e4c3f41 Linus Torvalds2005-04-16 420 */ ^1da177e4c3f41 Linus Torvalds2005-04-16 421 32bbd8793f24b0 Stefano Brivio2018-11-08 422 int tcp_v4_err(struct sk_buff *icmp_skb, u32 info) ^1da177e4c3f41 Linus Torvalds2005-04-16 423 { b71d1d426d263b Eric Dumazet 2011-04-22 424const struct iphdr *iph = (const struct iphdr *)icmp_skb->data; 4d1a2d9ec1c17d Damian Lukowski 2009-08-26 425struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); f1ecd5d9e73666 Damian Lukowski 2009-08-26 426struct inet_connection_sock *icsk; ^1da177e4c3f41 Linus Torvalds2005-04-16 427struct tcp_sock *tp; ^1da177e4c3f41 Linus Torvalds2005-04-16 428struct inet_sock *inet; 4d1a2d9ec1c17d Damian Lukowski 2009-08-26 429const int type = icmp_hdr(icmp_skb)->type; 4d1a2d9ec1c17d Damian Lukowski 2009-08-26 430const int code = icmp_hdr(icmp_skb)->code; ^1da177e4c3f41 Linus Torvalds2005-04-16 431struct sock *sk; f1ecd5d9e73666 Damian Lukowski 2009-08-26 432struct sk_buff *skb; 0a672f74131dd6 Yuchung Cheng 2014-05-11 433struct request_sock *fastopen; 9a568de4818dea Eric Dumazet 2017-05-16 434u32 seq, snd_una; 9a568de4818dea Eric Dumazet 2017-05-16 435s32 remaining; 9a568de4818dea Eric Dumazet 2017-05-16 436u32 delta_us; ^1da177e4c3f41 Linus Torvalds2005-04-16 437int err; 4d1a2d9ec1c17d Damian Lukowski 2009-08-26 438struct net *net = dev_net(icmp_skb->dev); ^1da177e4c3f41 Linus Torvalds2005-04-16 439 26e3736090e103 Eric Dumazet 2015-03-22 440sk = __inet_lookup_established(net, &tcp_hashinfo, iph->daddr, 26e3736090e103 Eric Dumazet 2015-03-22 441 th->dest, iph->saddr, ntohs(th->source), 3fa6f616a7a4d0 David Ahern 2017-08-07 442 inet_iif(icmp_skb), 0); ^1da177e4c3f41 Linus Torvalds2005-04-16 443if (!sk) { 5d3848bc33b7d1 Eric Dumazet 2016-04-27 444 __ICMP_INC_STATS(net, ICMP_MIB_INERRORS); 32bbd8793f24b0 Stefano Brivio2018-11-08 445return -ENOENT; ^1da177e4c3f41 Linus Torvalds2005-04-16 446} ^1da177e4c3f41 Linus Torvalds2005-04-16 447if (sk->sk_state == TCP_TIME_WAIT) { 9469c7b4aa210c YOSHIFUJI Hideaki 2006-10-10 448 inet_twsk_put(inet_twsk(sk)); 32bb
[kbuild] net/dsa/tag_8021q.c:109 dsa_8021q_restore_pvid() error: uninitialized symbol 'pvid'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 9cb1fd0efd195590b828b9b865421ad345a4a145 commit: c80ed84e76886487703bf04b38ce10e92e2d6e26 net: dsa: tag_8021q: Fix dsa_8021q_restore_pvid for an absent pvid date: 6 months ago config: x86_64-randconfig-m001-20200526 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: net/dsa/tag_8021q.c:109 dsa_8021q_restore_pvid() error: uninitialized symbol 'pvid'. # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c80ed84e76886487703bf04b38ce10e92e2d6e26 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git remote update linus git checkout c80ed84e76886487703bf04b38ce10e92e2d6e26 vim +/pvid +109 net/dsa/tag_8021q.c 5f33183b7fdfeb Vladimir Oltean 2019-08-30 96 static int dsa_8021q_restore_pvid(struct dsa_switch *ds, int port) 5f33183b7fdfeb Vladimir Oltean 2019-08-30 97 { 5f33183b7fdfeb Vladimir Oltean 2019-08-30 98 struct bridge_vlan_info vinfo; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 99 struct net_device *slave; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 100 u16 pvid; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 101 int err; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 102 5f33183b7fdfeb Vladimir Oltean 2019-08-30 103 if (!dsa_is_user_port(ds, port)) 5f33183b7fdfeb Vladimir Oltean 2019-08-30 104 return 0; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 105 5f33183b7fdfeb Vladimir Oltean 2019-08-30 106 slave = ds->ports[port].slave; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 107 5f33183b7fdfeb Vladimir Oltean 2019-08-30 108 err = br_vlan_get_pvid(slave, &pvid); c80ed84e768864 Vladimir Oltean 2019-11-16 @109 if (!pvid || err < 0) I don't know why this warning is only showing up now in May 2020... Anyway, we could solve the problem by checking for errors first: if (err < 0 || !pvid) { The UBSan tool can detect uninitialized values used at runtime so it might generate a splat as well. Other than that, obviously it is harmless. 5f33183b7fdfeb Vladimir Oltean 2019-08-30 110 /* There is no pvid on the bridge for this port, which is 5f33183b7fdfeb Vladimir Oltean 2019-08-30 111 * perfectly valid. Nothing to restore, bye-bye! 5f33183b7fdfeb Vladimir Oltean 2019-08-30 112 */ 5f33183b7fdfeb Vladimir Oltean 2019-08-30 113 return 0; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 114 5f33183b7fdfeb Vladimir Oltean 2019-08-30 115 err = br_vlan_get_info(slave, pvid, &vinfo); 5f33183b7fdfeb Vladimir Oltean 2019-08-30 116 if (err < 0) { 5f33183b7fdfeb Vladimir Oltean 2019-08-30 117 dev_err(ds->dev, "Couldn't determine PVID attributes\n"); 5f33183b7fdfeb Vladimir Oltean 2019-08-30 118 return err; 5f33183b7fdfeb Vladimir Oltean 2019-08-30 119 } 5f33183b7fdfeb Vladimir Oltean 2019-08-30 120 5f33183b7fdfeb Vladimir Oltean 2019-08-30 121 return dsa_port_vid_add(&ds->ports[port], pvid, vinfo.flags); 5f33183b7fdfeb Vladimir Oltean 2019-08-30 122 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [PATCH 1/2] nl80211: FILS discovery/bcast probe resp support
Hi Aloka, url: https://github.com/0day-ci/linux/commits/Aloka-Dixit/FILS-discovery-and-bcast-probe-resp-support/20200523-062228 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: x86_64-defconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter New smatch warnings: net/wireless/nl80211.c:4771 nl80211_parse_fd_bcastpresp() error: we previously assumed 'tmpl' could be null (see line 4766) # https://github.com/0day-ci/linux/commit/d7497e63c41decf82e86f11b0691e47e24b11122 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout d7497e63c41decf82e86f11b0691e47e24b11122 vim +/tmpl +4771 net/wireless/nl80211.c d7497e63c41dec Aloka Dixit 2020-05-22 4738 static int nl80211_parse_fd_bcastpresp(struct genl_info *info, d7497e63c41dec Aloka Dixit 2020-05-22 4739 struct cfg80211_ap_settings *params) d7497e63c41dec Aloka Dixit 2020-05-22 4740 { d7497e63c41dec Aloka Dixit 2020-05-22 4741struct nlattr *tmpl; d7497e63c41dec Aloka Dixit 2020-05-22 4742struct nlattr *tb[NL80211_FD_BCASTPRESP_ATTR_MAX + 1]; d7497e63c41dec Aloka Dixit 2020-05-22 4743int ret; d7497e63c41dec Aloka Dixit 2020-05-22 4744struct cfg80211_beacon_data *beacon = ¶ms->beacon; d7497e63c41dec Aloka Dixit 2020-05-22 4745struct cfg80211_fd_bcastpresp *cfg; d7497e63c41dec Aloka Dixit 2020-05-22 4746 d7497e63c41dec Aloka Dixit 2020-05-22 4747if (params->chandef.center_freq1 <= 5940 && d7497e63c41dec Aloka Dixit 2020-05-22 4748 params->chandef.center_freq1 >= 7105) d7497e63c41dec Aloka Dixit 2020-05-22 4749return -EOPNOTSUPP; d7497e63c41dec Aloka Dixit 2020-05-22 4750 d7497e63c41dec Aloka Dixit 2020-05-22 4751ret = nla_parse_nested(tb, NL80211_FD_BCASTPRESP_ATTR_MAX, d7497e63c41dec Aloka Dixit 2020-05-22 4752 info->attrs[NL80211_ATTR_FD_BCASTPRESP_CFG], d7497e63c41dec Aloka Dixit 2020-05-22 4753 fd_bcastpresp_policy, NULL); d7497e63c41dec Aloka Dixit 2020-05-22 4754if (ret) d7497e63c41dec Aloka Dixit 2020-05-22 4755return ret; d7497e63c41dec Aloka Dixit 2020-05-22 4756 d7497e63c41dec Aloka Dixit 2020-05-22 4757if (!tb[NL80211_FD_BCASTPRESP_ATTR_TYPE] || d7497e63c41dec Aloka Dixit 2020-05-22 4758 !tb[NL80211_FD_BCASTPRESP_ATTR_INT]) d7497e63c41dec Aloka Dixit 2020-05-22 4759return -EINVAL; d7497e63c41dec Aloka Dixit 2020-05-22 4760 d7497e63c41dec Aloka Dixit 2020-05-22 4761cfg = ¶ms->fd_bcastpresp; d7497e63c41dec Aloka Dixit 2020-05-22 4762cfg->type = nla_get_u8(tb[NL80211_FD_BCASTPRESP_ATTR_TYPE]); d7497e63c41dec Aloka Dixit 2020-05-22 4763cfg->interval = nla_get_u32(tb[NL80211_FD_BCASTPRESP_ATTR_INT]); d7497e63c41dec Aloka Dixit 2020-05-22 4764 d7497e63c41dec Aloka Dixit 2020-05-22 4765tmpl = tb[NL80211_FD_BCASTPRESP_ATTR_TMPL]; d7497e63c41dec Aloka Dixit 2020-05-22 @4766if (!tmpl && !beacon->fils_disc_len && !beacon->bcast_presp_len) Should the && be ||? d7497e63c41dec Aloka Dixit 2020-05-22 4767return -EINVAL; d7497e63c41dec Aloka Dixit 2020-05-22 4768 d7497e63c41dec Aloka Dixit 2020-05-22 4769if (cfg->type == CFG80211_TYPE_FILS_DISCOVERY) { d7497e63c41dec Aloka Dixit 2020-05-22 4770beacon->fils_disc = nla_data(tmpl); d7497e63c41dec Aloka Dixit 2020-05-22 @4771beacon->fils_disc_len = nla_len(tmpl); Unchecked dereference. d7497e63c41dec Aloka Dixit 2020-05-22 4772} else if (cfg->type == CFG80211_TYPE_BCAST_PROBE_RESP) { d7497e63c41dec Aloka Dixit 2020-05-22 4773beacon->bcast_presp = nla_data(tmpl); d7497e63c41dec Aloka Dixit 2020-05-22 4774beacon->bcast_presp_len = nla_len(tmpl); d7497e63c41dec Aloka Dixit 2020-05-22 4775} d7497e63c41dec Aloka Dixit 2020-05-22 4776 d7497e63c41dec Aloka Dixit 2020-05-22 4777return 0; d7497e63c41dec Aloka Dixit 2020-05-22 4778 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [djwong-xfs:repair-metadata-atomically 77/229] fs/xfs/scrub/rtsummary.c:75 xchk_setup_rtsummary() error: uninitialized symbol 'resblks'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-metadata-atomically head: d334005df02786c9f288f2c7060603e9680946b5 commit: 0d44a170037d3e6825d8ca4b52f3cf6019a40850 [77/229] xfs: online repair of realtime summaries config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: fs/xfs/scrub/rtsummary.c:75 xchk_setup_rtsummary() error: uninitialized symbol 'resblks'. # https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=0d44a170037d3e6825d8ca4b52f3cf6019a40850 git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git git remote update djwong-xfs git checkout 0d44a170037d3e6825d8ca4b52f3cf6019a40850 vim +/resblks +75 fs/xfs/scrub/rtsummary.c 7a9053f61cc608e Darrick J. Wong 2020-03-10 56 int d11bb52d9fe16ea Darrick J. Wong 2020-03-16 57 xchk_setup_rtsummary( d11bb52d9fe16ea Darrick J. Wong 2020-03-16 58 struct xfs_scrub *sc, d11bb52d9fe16ea Darrick J. Wong 2020-03-16 59 struct xfs_inode *ip) 7a9053f61cc608e Darrick J. Wong 2020-03-10 60 { d11bb52d9fe16ea Darrick J. Wong 2020-03-16 61 struct xfs_mount *mp = sc->mp; 0d44a170037d3e6 Darrick J. Wong 2020-03-12 62 unsigned long long resblks; ^^^ d11bb52d9fe16ea Darrick J. Wong 2020-03-16 63 int error; d11bb52d9fe16ea Darrick J. Wong 2020-03-16 64 0d44a170037d3e6 Darrick J. Wong 2020-03-12 65 /* 0d44a170037d3e6 Darrick J. Wong 2020-03-12 66 * If we're doing a repair, we reserve 2x the summary blocks: once for 0d44a170037d3e6 Darrick J. Wong 2020-03-12 67 * the new summary contents and again for the bmbt blocks and the 0d44a170037d3e6 Darrick J. Wong 2020-03-12 68 * remapping operation. 0d44a170037d3e6 Darrick J. Wong 2020-03-12 69 */ 0d44a170037d3e6 Darrick J. Wong 2020-03-12 70 if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) { 0d44a170037d3e6 Darrick J. Wong 2020-03-12 71 resblks = XFS_B_TO_FSB(sc->mp, sc->mp->m_rsumsize) * 2; ^^ 0d44a170037d3e6 Darrick J. Wong 2020-03-12 72 if (resblks > UINT_MAX) 0d44a170037d3e6 Darrick J. Wong 2020-03-12 73 return -EOPNOTSUPP; 0d44a170037d3e6 Darrick J. Wong 2020-03-12 74 } 0d44a170037d3e6 Darrick J. Wong 2020-03-12 @75 error = xchk_trans_alloc(sc, resblks); ^^^ Uninitialized on else path. d11bb52d9fe16ea Darrick J. Wong 2020-03-16 76 if (error) d11bb52d9fe16ea Darrick J. Wong 2020-03-16 77 return error; d11bb52d9fe16ea Darrick J. Wong 2020-03-16 78 d11bb52d9fe16ea Darrick J. Wong 2020-03-16 79 /* Allocate a memory buffer for the summary comparison. */ d11bb52d9fe16ea Darrick J. Wong 2020-03-16 80 sc->buf = kmem_alloc_large(sc->mp->m_sb.sb_blocksize, KM_MAYFAIL); d11bb52d9fe16ea Darrick J. Wong 2020-03-16 81 if (!sc->buf) d11bb52d9fe16ea Darrick J. Wong 2020-03-16 82 return -ENOMEM; 7a9053f61cc608e Darrick J. Wong 2020-03-10 83 7a9053f61cc608e Darrick J. Wong 2020-03-10 84 /* d11bb52d9fe16ea Darrick J. Wong 2020-03-16 85 * Locking order requires us to take the rtbitmap first. We must be d11bb52d9fe16ea Darrick J. Wong 2020-03-16 86 * careful to unlock it ourselves when we are done with the rtbitmap d11bb52d9fe16ea Darrick J. Wong 2020-03-16 87 * file since the scrub infrastructure won't do that for us. 7a9053f61cc608e Darrick J. Wong 2020-03-10 88 */ d11bb52d9fe16ea Darrick J. Wong 2020-03-16 89 xfs_ilock(mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); d11bb52d9fe16ea Darrick J. Wong 2020-03-16 90 d11bb52d9fe16ea Darrick J. Wong 2020-03-16 91 /* ...and then we can lock the rtsummary inode. */ 7a9053f61cc608e Darrick J. Wong 2020-03-10 92 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM; d11bb52d9fe16ea Darrick J. Wong 2020-03-16 93 sc->ip = sc->mp->m_rsumip; 7a9053f61cc608e Darrick J. Wong 2020-03-10 94 xfs_ilock(sc->ip, sc->ilock_flags); 7a9053f61cc608e Darrick J. Wong 2020-03-10 95 d11bb52d9fe16ea Darrick J. Wong 2020-03-16 96 return 0; d11bb52d9fe16ea Darrick J. Wong 2020-03-16 97 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kb
[kbuild] [djwong-xfs:repair-metadata-atomically 206/229] fs/xfs/xfs_bmap_item.c:503 xfs_bui_item_recover() error: uninitialized symbol 'type'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-metadata-atomically head: d334005df02786c9f288f2c7060603e9680946b5 commit: ff363fee12a5518f3bcd0f904b46d737e811cf0b [206/229] xfs: clean up xfs_bui_item_recover config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: fs/xfs/xfs_bmap_item.c:503 xfs_bui_item_recover() error: uninitialized symbol 'type'. # https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=ff363fee12a5518f3bcd0f904b46d737e811cf0b git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git git remote update djwong-xfs git checkout ff363fee12a5518f3bcd0f904b46d737e811cf0b vim +/type +503 fs/xfs/xfs_bmap_item.c ba266f4f4c84ea Darrick J. Wong 2020-05-15 423 STATIC int c557f2b9dcf4ed Darrick J. Wong 2020-05-15 424 xfs_bui_item_recover( c557f2b9dcf4ed Darrick J. Wong 2020-05-15 425struct xfs_log_item *lip, aaddb7e46e876a Darrick J. Wong 2020-05-15 426struct xfs_defer_capture**dfcp) 77d61fe45e7205 Darrick J. Wong 2016-10-03 427 { c557f2b9dcf4ed Darrick J. Wong 2020-05-15 428struct xfs_bmbt_irec irec; c557f2b9dcf4ed Darrick J. Wong 2020-05-15 429struct xfs_bui_log_item *buip = BUI_ITEM(lip); c557f2b9dcf4ed Darrick J. Wong 2020-05-15 430struct xfs_trans *tp; c557f2b9dcf4ed Darrick J. Wong 2020-05-15 431struct xfs_inode *ip = NULL; aaddb7e46e876a Darrick J. Wong 2020-05-15 432struct xfs_mount *mp = lip->li_mountp; 77d61fe45e7205 Darrick J. Wong 2016-10-03 433struct xfs_map_extent *bmap; c557f2b9dcf4ed Darrick J. Wong 2020-05-15 434struct xfs_bud_log_item *budp; 77d61fe45e7205 Darrick J. Wong 2016-10-03 435xfs_fsblock_t startblock_fsb; 77d61fe45e7205 Darrick J. Wong 2016-10-03 436xfs_fsblock_t inode_fsb; e1a4e37cc7b665 Darrick J. Wong 2017-06-14 437xfs_filblks_t count; c557f2b9dcf4ed Darrick J. Wong 2020-05-15 438xfs_exntst_t state; 9f3afb57d5f1e7 Darrick J. Wong 2016-10-03 439enum xfs_bmap_intent_type type; ^ c557f2b9dcf4ed Darrick J. Wong 2020-05-15 440unsigned int bui_type; 9f3afb57d5f1e7 Darrick J. Wong 2016-10-03 441int whichfork; c557f2b9dcf4ed Darrick J. Wong 2020-05-15 442int error = 0; 77d61fe45e7205 Darrick J. Wong 2016-10-03 443 77d61fe45e7205 Darrick J. Wong 2016-10-03 444/* Only one mapping operation per BUI... */ ff363fee12a551 Darrick J. Wong 2020-05-21 445if (buip->bui_format.bui_nextents != XFS_BUI_MAX_FAST_EXTENTS) ff363fee12a551 Darrick J. Wong 2020-05-21 446goto garbage; 77d61fe45e7205 Darrick J. Wong 2016-10-03 447 77d61fe45e7205 Darrick J. Wong 2016-10-03 448/* 77d61fe45e7205 Darrick J. Wong 2016-10-03 449 * First check the validity of the extent described by the 77d61fe45e7205 Darrick J. Wong 2016-10-03 450 * BUI. If anything is bad, then toss the BUI. 77d61fe45e7205 Darrick J. Wong 2016-10-03 451 */ 77d61fe45e7205 Darrick J. Wong 2016-10-03 452bmap = &buip->bui_format.bui_extents[0]; 77d61fe45e7205 Darrick J. Wong 2016-10-03 453startblock_fsb = XFS_BB_TO_FSB(mp, 77d61fe45e7205 Darrick J. Wong 2016-10-03 454 XFS_FSB_TO_DADDR(mp, bmap->me_startblock)); 77d61fe45e7205 Darrick J. Wong 2016-10-03 455inode_fsb = XFS_BB_TO_FSB(mp, XFS_FSB_TO_DADDR(mp, 77d61fe45e7205 Darrick J. Wong 2016-10-03 456 XFS_INO_TO_FSB(mp, bmap->me_owner))); ff363fee12a551 Darrick J. Wong 2020-05-21 457state = (bmap->me_flags & XFS_BMAP_EXTENT_UNWRITTEN) ? ff363fee12a551 Darrick J. Wong 2020-05-21 458 XFS_EXT_UNWRITTEN : XFS_EXT_NORM; ff363fee12a551 Darrick J. Wong 2020-05-21 459whichfork = (bmap->me_flags & XFS_BMAP_EXTENT_ATTR_FORK) ? ff363fee12a551 Darrick J. Wong 2020-05-21 460 XFS_ATTR_FORK : XFS_DATA_FORK; ff363fee12a551 Darrick J. Wong 2020-05-21 461bui_type = bmap->me_flags & XFS_BMAP_EXTENT_TYPE_MASK; ff363fee12a551 Darrick J. Wong 2020-05-21 462switch (bui_type) { 77d61fe45e7205 Darrick J. Wong 2016-10-03 463case XFS_BMAP_MAP: 77d61fe45e7205 Darrick J. Wong 2016-10-03 464case XFS_BMAP_UNMAP: 77d61fe45e7205 Darrick J. Wong 2016-10-03 465b
[kbuild] Re: [PATCH] uio: disable lazy irq disable to avoid double fire
Hi Thommy, url: https://github.com/0day-ci/linux/commits/Thommy-Jakobsson/uio-disable-lazy-irq-disable-to-avoid-double-fire/20200521-225755 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git c9d7e3da1f3c4cf5dddfc5d7ce4d76d013aba1cc config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/uio/uio_pdrv_genirq.c:185 uio_pdrv_genirq_probe() warn: passing devm_ allocated variable to kfree. 'priv' # https://github.com/0day-ci/linux/commit/c6460d7bd1fb8e3ff5aa0c252c37bbfcb9245367 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout c6460d7bd1fb8e3ff5aa0c252c37bbfcb9245367 vim +/priv +185 drivers/uio/uio_pdrv_genirq.c c767db0ab4bc85 Magnus Damm2008-07-11 110 static int uio_pdrv_genirq_probe(struct platform_device *pdev) c767db0ab4bc85 Magnus Damm2008-07-11 111 { 08cb2e2148f763 Jingoo Han 2013-08-30 112 struct uio_info *uioinfo = dev_get_platdata(&pdev->dev); b0297622a9726b Daniel Mack2019-08-15 113 struct device_node *node = pdev->dev.of_node; c767db0ab4bc85 Magnus Damm2008-07-11 114 struct uio_pdrv_genirq_platdata *priv; c767db0ab4bc85 Magnus Damm2008-07-11 115 struct uio_mem *uiomem; c767db0ab4bc85 Magnus Damm2008-07-11 116 int ret = -EINVAL; c767db0ab4bc85 Magnus Damm2008-07-11 117 int i; c767db0ab4bc85 Magnus Damm2008-07-11 118 b0297622a9726b Daniel Mack2019-08-15 119 if (node) { b0297622a9726b Daniel Mack2019-08-15 120 const char *name; b0297622a9726b Daniel Mack2019-08-15 121 27760f86866331 Hans J. Koch 2011-07-07 122 /* alloc uioinfo for one device */ e6789cd3dfb553 Michal Simek 2013-09-12 123 uioinfo = devm_kzalloc(&pdev->dev, sizeof(*uioinfo), e6789cd3dfb553 Michal Simek 2013-09-12 124 GFP_KERNEL); 27760f86866331 Hans J. Koch 2011-07-07 125 if (!uioinfo) { 27760f86866331 Hans J. Koch 2011-07-07 126 dev_err(&pdev->dev, "unable to kmalloc\n"); e6789cd3dfb553 Michal Simek 2013-09-12 127 return -ENOMEM; 27760f86866331 Hans J. Koch 2011-07-07 128 } b0297622a9726b Daniel Mack2019-08-15 129 b0297622a9726b Daniel Mack2019-08-15 130 if (!of_property_read_string(node, "linux,uio-name", &name)) b0297622a9726b Daniel Mack2019-08-15 131 uioinfo->name = devm_kstrdup(&pdev->dev, name, GFP_KERNEL); b0297622a9726b Daniel Mack2019-08-15 132 else b0297622a9726b Daniel Mack2019-08-15 133 uioinfo->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, b0297622a9726b Daniel Mack2019-08-15 134 "%pOFn", node); b0297622a9726b Daniel Mack2019-08-15 135 27760f86866331 Hans J. Koch 2011-07-07 136 uioinfo->version = "devicetree"; 27760f86866331 Hans J. Koch 2011-07-07 137 /* Multiple IRQs are not supported */ 27760f86866331 Hans J. Koch 2011-07-07 138 } 27760f86866331 Hans J. Koch 2011-07-07 139 c767db0ab4bc85 Magnus Damm2008-07-11 140 if (!uioinfo || !uioinfo->name || !uioinfo->version) { c767db0ab4bc85 Magnus Damm2008-07-11 141 dev_err(&pdev->dev, "missing platform_data\n"); e6789cd3dfb553 Michal Simek 2013-09-12 142 return ret; c767db0ab4bc85 Magnus Damm2008-07-11 143 } c767db0ab4bc85 Magnus Damm2008-07-11 144 e543ae896626a5 Mike Frysinger 2008-10-29 145 if (uioinfo->handler || uioinfo->irqcontrol || e543ae896626a5 Mike Frysinger 2008-10-29 146 uioinfo->irq_flags & IRQF_SHARED) { c767db0ab4bc85 Magnus Damm2008-07-11 147 dev_err(&pdev->dev, "interrupt configuration error\n"); e6789cd3dfb553 Michal Simek 2013-09-12 148 return ret; c767db0ab4bc85 Magnus Damm2008-07-11 149 } c767db0ab4bc85 Magnus Damm2008-07-11 150 e6789cd3dfb553 Michal Simek 2013-09-12 151 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); ^^^ c767db0ab4bc85 Magnus Damm2008-07-11 152 if (!priv) { c767db0ab4bc85 Magnus Damm2008-07-11 153 dev_err(&pdev->dev, "unable to kmalloc\n"); e6789cd3dfb553 Michal Simek 2013-09-12 154 return -ENOMEM; c767db
[kbuild] Re: [RFC PATCH net-next 4/4] net: dp83869: Add RGMII internal delay configuration
Hi Dan, url: https://github.com/0day-ci/linux/commits/Dan-Murphy/RGMII-Internal-delay-common-property/20200522-015509 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git de1b99ef2aa1e982c86b15853e013c6e3dbc1e7a config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter New smatch warnings: drivers/net/phy/dp83869.c:221 dp83869_of_init() error: buffer overflow 'dp83869_internal_delay' 16 <= 16 Old smatch warnings: drivers/net/phy/dp83869.c:231 dp83869_of_init() error: buffer overflow 'dp83869_internal_delay' 16 <= 16 # https://github.com/0day-ci/linux/commit/c27cb3ace00f1b89679d6542f9ee2eb8faa76112 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout c27cb3ace00f1b89679d6542f9ee2eb8faa76112 vim +/dp83869_internal_delay +221 drivers/net/phy/dp83869.c 01db923e83779b Dan Murphy 2019-11-13 174 static int dp83869_of_init(struct phy_device *phydev) 01db923e83779b Dan Murphy 2019-11-13 175 { 01db923e83779b Dan Murphy 2019-11-13 176 struct dp83869_private *dp83869 = phydev->priv; 01db923e83779b Dan Murphy 2019-11-13 177 struct device *dev = &phydev->mdio.dev; 01db923e83779b Dan Murphy 2019-11-13 178 struct device_node *of_node = dev->of_node; c27cb3ace00f1b Dan Murphy 2020-05-21 179 int delay_size = ARRAY_SIZE(dp83869_internal_delay); 01db923e83779b Dan Murphy 2019-11-13 180 int ret; 01db923e83779b Dan Murphy 2019-11-13 181 01db923e83779b Dan Murphy 2019-11-13 182 if (!of_node) 01db923e83779b Dan Murphy 2019-11-13 183 return -ENODEV; 01db923e83779b Dan Murphy 2019-11-13 184 01db923e83779b Dan Murphy 2019-11-13 185 dp83869->io_impedance = -EINVAL; 01db923e83779b Dan Murphy 2019-11-13 186 01db923e83779b Dan Murphy 2019-11-13 187 /* Optional configuration */ 01db923e83779b Dan Murphy 2019-11-13 188 ret = of_property_read_u32(of_node, "ti,clk-output-sel", 01db923e83779b Dan Murphy 2019-11-13 189 &dp83869->clk_output_sel); 01db923e83779b Dan Murphy 2019-11-13 190 if (ret || dp83869->clk_output_sel > DP83869_CLK_O_SEL_REF_CLK) 01db923e83779b Dan Murphy 2019-11-13 191 dp83869->clk_output_sel = DP83869_CLK_O_SEL_REF_CLK; 01db923e83779b Dan Murphy 2019-11-13 192 01db923e83779b Dan Murphy 2019-11-13 193 ret = of_property_read_u32(of_node, "ti,op-mode", &dp83869->mode); 01db923e83779b Dan Murphy 2019-11-13 194 if (ret == 0) { 01db923e83779b Dan Murphy 2019-11-13 195 if (dp83869->mode < DP83869_RGMII_COPPER_ETHERNET || 01db923e83779b Dan Murphy 2019-11-13 196 dp83869->mode > DP83869_SGMII_COPPER_ETHERNET) 01db923e83779b Dan Murphy 2019-11-13 197 return -EINVAL; 01db923e83779b Dan Murphy 2019-11-13 198 } 01db923e83779b Dan Murphy 2019-11-13 199 01db923e83779b Dan Murphy 2019-11-13 200 if (of_property_read_bool(of_node, "ti,max-output-impedance")) 01db923e83779b Dan Murphy 2019-11-13 201 dp83869->io_impedance = DP83869_IO_MUX_CFG_IO_IMPEDANCE_MAX; 01db923e83779b Dan Murphy 2019-11-13 202 else if (of_property_read_bool(of_node, "ti,min-output-impedance")) 01db923e83779b Dan Murphy 2019-11-13 203 dp83869->io_impedance = DP83869_IO_MUX_CFG_IO_IMPEDANCE_MIN; 01db923e83779b Dan Murphy 2019-11-13 204 01db923e83779b Dan Murphy 2019-11-13 205 if (of_property_read_bool(of_node, "enet-phy-lane-swap")) 01db923e83779b Dan Murphy 2019-11-13 206 dp83869->port_mirroring = DP83869_PORT_MIRRORING_EN; 01db923e83779b Dan Murphy 2019-11-13 207 else 01db923e83779b Dan Murphy 2019-11-13 208 dp83869->port_mirroring = DP83869_PORT_MIRRORING_DIS; 01db923e83779b Dan Murphy 2019-11-13 209 01db923e83779b Dan Murphy 2019-11-13 210 if (of_property_read_u32(of_node, "rx-fifo-depth", 01db923e83779b Dan Murphy 2019-11-13 211 &dp83869->rx_fifo_depth)) 01db923e83779b Dan Murphy 2019-11-13 212 dp83869->rx_fifo_depth = DP83869_PHYCR_FIFO_DEPTH_4_B_NIB; 01db923e83779b Dan Murphy 2019-11-13 213 01db923e83779b Dan Murphy 2019-11-13 214 if (of_property_read_u32(of_node, "tx-fifo-depth", 01db923e83779b Dan Murphy 2019-11-13 215 &dp83869->tx_fifo_depth)) 01db923e83779b Dan Murphy 2019-11-13 216 dp83869->tx_fifo_depth = DP83869_PHYCR_FIFO_DEPTH_4_B_NIB; 01db923e83779b Dan Murphy 2019-11-13 217 c27cb3ace00f1b Dan Murphy 2020-05-21 218 dp83869->rx_id_delay = DP83869_RGMII_CLK_DELAY_INV; c27cb3ace00f1b Dan Murphy 2020-05-21 219 ret = of_property_read_u