CC: [email protected]
In-Reply-To: 
<7af3da33a7aa540f7878cfcbf5076dcf61d201ef.1612393368.git.andreas.a.roese...@gmail.com>
References: 
<7af3da33a7aa540f7878cfcbf5076dcf61d201ef.1612393368.git.andreas.a.roese...@gmail.com>
TO: Andreas Roeseler <[email protected]>

Hi Andreas,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Andreas-Roeseler/add-support-for-RFC-8335-PROBE/20210204-072756
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
6626a0266566c5aea16178c5e6cd7fc4db3f2f56
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: i386-randconfig-m021-20210202 (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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
net/ipv4/icmp.c:1032 icmp_echo() error: uninitialized symbol 'dev'.

vim +/dev +1032 net/ipv4/icmp.c

^1da177e4c3f41 Linus Torvalds           2005-04-16   971  
^1da177e4c3f41 Linus Torvalds           2005-04-16   972  /*
^1da177e4c3f41 Linus Torvalds           2005-04-16   973   *    Handle 
ICMP_ECHO ("ping") requests.
^1da177e4c3f41 Linus Torvalds           2005-04-16   974   *
^1da177e4c3f41 Linus Torvalds           2005-04-16   975   *    RFC 1122: 
3.2.2.6 MUST have an echo server that answers ICMP echo
^1da177e4c3f41 Linus Torvalds           2005-04-16   976   *              
requests.
^1da177e4c3f41 Linus Torvalds           2005-04-16   977   *    RFC 1122: 
3.2.2.6 Data received in the ICMP_ECHO request MUST be
^1da177e4c3f41 Linus Torvalds           2005-04-16   978   *              
included in the reply.
^1da177e4c3f41 Linus Torvalds           2005-04-16   979   *    RFC 1812: 
4.3.3.6 SHOULD have a config option for silently ignoring
^1da177e4c3f41 Linus Torvalds           2005-04-16   980   *              echo 
requests, MUST have default=NOT.
^1da177e4c3f41 Linus Torvalds           2005-04-16   981   *    See also WRT 
handling of options once they are done and working.
^1da177e4c3f41 Linus Torvalds           2005-04-16   982   */
^1da177e4c3f41 Linus Torvalds           2005-04-16   983  
e3e3217029a35c Rick Jones               2014-11-17   984  static bool 
icmp_echo(struct sk_buff *skb)
^1da177e4c3f41 Linus Torvalds           2005-04-16   985  {
872bc41b1e24e1 Andreas Roeseler         2021-02-03   986        struct icmp_bxm 
icmp_param;
b34a95ee6e0557 Pavel Emelyanov          2008-03-26   987        struct net *net;
872bc41b1e24e1 Andreas Roeseler         2021-02-03   988        struct 
net_device *dev;
872bc41b1e24e1 Andreas Roeseler         2021-02-03   989        struct 
icmp_extobj_hdr *extobj_hdr;
872bc41b1e24e1 Andreas Roeseler         2021-02-03   990        struct 
icmp_ext_ctype3_hdr *ctype3_hdr;
872bc41b1e24e1 Andreas Roeseler         2021-02-03   991        __u8 status;
b34a95ee6e0557 Pavel Emelyanov          2008-03-26   992  
adf30907d63893 Eric Dumazet             2009-06-02   993        net = 
dev_net(skb_dst(skb)->dev);
872bc41b1e24e1 Andreas Roeseler         2021-02-03   994        /* should there 
be an ICMP stat for ignored echos? */
872bc41b1e24e1 Andreas Roeseler         2021-02-03   995        if 
(net->ipv4.sysctl_icmp_echo_ignore_all)
872bc41b1e24e1 Andreas Roeseler         2021-02-03   996                return 
true;
^1da177e4c3f41 Linus Torvalds           2005-04-16   997  
88c7664f13bd1a Arnaldo Carvalho de Melo 2007-03-13   998        
icmp_param.data.icmph           = *icmp_hdr(skb);
^1da177e4c3f41 Linus Torvalds           2005-04-16   999        icmp_param.skb  
                = skb;
^1da177e4c3f41 Linus Torvalds           2005-04-16  1000        
icmp_param.offset               = 0;
^1da177e4c3f41 Linus Torvalds           2005-04-16  1001        
icmp_param.data_len             = skb->len;
^1da177e4c3f41 Linus Torvalds           2005-04-16  1002        
icmp_param.head_len             = sizeof(struct icmphdr);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1003  
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1004        if 
(icmp_param.data.icmph.type == ICMP_ECHO) {
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1005                
icmp_param.data.icmph.type = ICMP_ECHOREPLY;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1006                goto 
send_reply;
^1da177e4c3f41 Linus Torvalds           2005-04-16  1007        }
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1008        if 
(!net->ipv4.sysctl_icmp_echo_enable_probe)
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1009                return 
true;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1010        /* We currently 
do not support probing off the proxy node */
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1011        if 
(!(ntohs(icmp_param.data.icmph.un.echo.sequence) & 1))
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1012                return 
true;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1013  
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1014        
icmp_param.data.icmph.type = ICMP_EXT_ECHOREPLY;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1015        
icmp_param.data.icmph.un.echo.sequence &= htons(0xFF00);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1016        extobj_hdr = 
(struct icmp_extobj_hdr *)(skb->data + sizeof(struct icmp_ext_hdr));
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1017        ctype3_hdr = 
(struct icmp_ext_ctype3_hdr *)(extobj_hdr + 1);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1018        status = 0;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1019        switch 
(extobj_hdr->class_type) {
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1020        case CTYPE_NAME:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1021                dev = 
dev_get_by_name(net, (char *)(extobj_hdr + 1));
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1022                break;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1023        case 
CTYPE_INDEX:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1024                dev = 
dev_get_by_index(net, ntohl(*((uint32_t *)(extobj_hdr + 1))));
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1025                break;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1026        case CTYPE_ADDR:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1027                switch 
(ntohs(ctype3_hdr->afi)) {
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1028                case 
AFI_IP:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1029                        
dev = ip_dev_find(net, *(__be32 *)(ctype3_hdr + 1));
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1030                        
break;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1031                case 
AFI_IP6:
872bc41b1e24e1 Andreas Roeseler         2021-02-03 @1032                        
dev = ipv6_dev_find(net, (struct in6_addr *)(ctype3_hdr + 1), dev);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1033                        
if(dev) dev_hold(dev);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1034                        
break;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1035                default:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1036                        
icmp_param.data.icmph.code = ICMP_EXT_MAL_QUERY;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1037                        
goto send_reply;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1038                }
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1039                break;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1040        default:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1041                
icmp_param.data.icmph.code = ICMP_EXT_MAL_QUERY;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1042                goto 
send_reply;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1043        }
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1044        if(!dev) {
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1045                
icmp_param.data.icmph.code = ICMP_EXT_NO_IF;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1046                goto 
send_reply;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1047        }
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1048        /* RFC 8335: 3 
the last 8 bits of the Extended Echo Reply Message
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1049         *  are laid 
out as follows:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1050         *      
+-+-+-+-+-+-+-+-+
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1051         *      
|State|Res|A|4|6|
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1052         *      
+-+-+-+-+-+-+-+-+
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1053         */
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1054        if (dev->flags 
& IFF_UP)
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1055                status 
|= EXT_ECHOREPLY_ACTIVE;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1056        if 
(dev->ip_ptr->ifa_list)
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1057                status 
|= EXT_ECHOREPLY_IPV4;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1058        if 
(!list_empty(&dev->ip6_ptr->addr_list))
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1059                status 
|= EXT_ECHOREPLY_IPV6;
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1060        dev_put(dev);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1061        
icmp_param.data.icmph.un.echo.sequence |= htons(status);
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1062  
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1063  send_reply:
872bc41b1e24e1 Andreas Roeseler         2021-02-03  1064        
icmp_reply(&icmp_param, skb);
e3e3217029a35c Rick Jones               2014-11-17  1065        return true;
^1da177e4c3f41 Linus Torvalds           2005-04-16  1066  }
^1da177e4c3f41 Linus Torvalds           2005-04-16  1067  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to