lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202201220354.fJ3VzqBt-lkp@intel.com>
Date:   Tue, 25 Jan 2022 17:47:12 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
Subject: net/kcm/kcmsock.c:645 kcm_write_msgs() error: we previously assumed
 'psock' could be null (see line 585)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9b57f458985742bd1c585f4c7f36d04634ce1143
commit: 1e688dd2a3d6759d416616ff07afc4bb836c4213 powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto
config: powerpc64-randconfig-m031-20220120 (https://download.01.org/0day-ci/archive/20220122/202201220354.fJ3VzqBt-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
net/kcm/kcmsock.c:645 kcm_write_msgs() error: we previously assumed 'psock' could be null (see line 585)

vim +/psock +645 net/kcm/kcmsock.c

ab7ac4eb9832e32 Tom Herbert             2016-03-07  589  		unreserve_psock(kcm);
cd6e111bf5be5c7 Tom Herbert             2016-03-07  590  		kcm_report_tx_retry(kcm);
ab7ac4eb9832e32 Tom Herbert             2016-03-07  591  		if (skb_queue_empty(&sk->sk_write_queue))
ab7ac4eb9832e32 Tom Herbert             2016-03-07  592  			return 0;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  593  
ab7ac4eb9832e32 Tom Herbert             2016-03-07  594  		kcm_tx_msg(skb_peek(&sk->sk_write_queue))->sent = 0;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  595  
ab7ac4eb9832e32 Tom Herbert             2016-03-07  596  	} else if (skb_queue_empty(&sk->sk_write_queue)) {
ab7ac4eb9832e32 Tom Herbert             2016-03-07  597  		return 0;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  598  	}
ab7ac4eb9832e32 Tom Herbert             2016-03-07  599  
ab7ac4eb9832e32 Tom Herbert             2016-03-07  600  	head = skb_peek(&sk->sk_write_queue);
ab7ac4eb9832e32 Tom Herbert             2016-03-07  601  	txm = kcm_tx_msg(head);
ab7ac4eb9832e32 Tom Herbert             2016-03-07  602  
ab7ac4eb9832e32 Tom Herbert             2016-03-07  603  	if (txm->sent) {
ab7ac4eb9832e32 Tom Herbert             2016-03-07  604  		/* Send of first skbuff in queue already in progress */
ab7ac4eb9832e32 Tom Herbert             2016-03-07  605  		if (WARN_ON(!psock)) {

This warning is a false positive.

The new Power PC implementation of WARN_ON() is written in asm and
Smatch can only parse C.  I don't have a cross compile system set up so
fixing this is going to be a big headache.  :/

ab7ac4eb9832e32 Tom Herbert             2016-03-07  606  			ret = -EINVAL;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  607  			goto out;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  608  		}
ab7ac4eb9832e32 Tom Herbert             2016-03-07  609  		sent = txm->sent;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  610  		frag_offset = txm->frag_offset;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  611  		fragidx = txm->fragidx;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  612  		skb = txm->frag_skb;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  613  
ab7ac4eb9832e32 Tom Herbert             2016-03-07  614  		goto do_frag;
ab7ac4eb9832e32 Tom Herbert             2016-03-07  615  	}

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ