Re: [crypto 1/4] net/tls: connect routine for Inine TLS Client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Atul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on crypto/master]

url:    https://github.com/0day-ci/linux/commits/Atul-Gupta/Inline-TLS-client-and-v6-support/20190412-034407
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git master
config: i386-randconfig-x017-201914 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   net/tls/tls_main.c: In function 'tls_hw_connect':
>> net/tls/tls_main.c:641:9: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return err;
            ^~~

vim +/err +641 net/tls/tls_main.c

   621	
   622	static int tls_hw_connect(struct sock *sk, struct sockaddr *uaddr,
   623				  int addr_len)
   624	{
   625		struct tls_device *dev;
   626		int err;
   627	
   628		spin_lock_bh(&device_spinlock);
   629		list_for_each_entry(dev, &device_list, dev_list) {
   630			if (dev->connect) {
   631				kref_get(&dev->kref);
   632				spin_unlock_bh(&device_spinlock);
   633				err = dev->connect(dev, sk, uaddr, addr_len);
   634				kref_put(&dev->kref, dev->release);
   635				spin_lock_bh(&device_spinlock);
   636				if (!err)
   637					break;
   638			}
   639		}
   640		spin_unlock_bh(&device_spinlock);
 > 641		return err;
   642	}
   643	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux