All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/nvidia/forcedeth.c:4291:9: sparse: sparse: context imbalance in 'nv_do_stats_poll' - wrong count at exit
Date: Tue, 11 May 2021 14:10:10 +0800	[thread overview]
Message-ID: <202105111454.gm3osCyf-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4551 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Greg Ungerer <gerg@linux-m68k.org>
CC: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: d4aa8affa1e9e51c237a1ec47a97e96dce76c98c m68knommu: fix use of cpu_to_le() on IO access
date:   10 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
config: m68k-randconfig-s032-20210511 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4aa8affa1e9e51c237a1ec47a97e96dce76c98c
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d4aa8affa1e9e51c237a1ec47a97e96dce76c98c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/nvidia/forcedeth.c:4291:9: sparse: sparse: context imbalance in 'nv_do_stats_poll' - wrong count at exit
   drivers/net/ethernet/nvidia/forcedeth.c:4789:9: sparse: sparse: context imbalance in 'nv_set_ringparam' - different lock contexts for basic block

vim +/nv_do_stats_poll +4291 drivers/net/ethernet/nvidia/forcedeth.c

2918c35d311263 drivers/net/forcedeth.c                 Michal Schmidt  2005-05-12  4276  
d99356797a8f3a drivers/net/ethernet/nvidia/forcedeth.c Kees Cook       2017-10-16  4277  static void nv_do_stats_poll(struct timer_list *t)
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4278  	__acquires(&netdev_priv(dev)->hwstats_lock)
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4279  	__releases(&netdev_priv(dev)->hwstats_lock)
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10  4280  {
d99356797a8f3a drivers/net/ethernet/nvidia/forcedeth.c Kees Cook       2017-10-16  4281  	struct fe_priv *np = from_timer(np, t, stats_poll);
d99356797a8f3a drivers/net/ethernet/nvidia/forcedeth.c Kees Cook       2017-10-16  4282  	struct net_device *dev = np->dev;
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10  4283  
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4284  	/* If lock is currently taken, the stats are being refreshed
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4285  	 * and hence fresh enough */
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4286  	if (spin_trylock(&np->hwstats_lock)) {
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4287  		nv_update_stats(dev);
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4288  		spin_unlock(&np->hwstats_lock);
f5d827aece3630 drivers/net/ethernet/nvidia/forcedeth.c david decotigny 2011-11-16  4289  	}
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10  4290  
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10 @4291  	if (!np->in_shutdown)
bfebbb88eca12a drivers/net/forcedeth.c                 Daniel Drake    2008-03-18  4292  		mod_timer(&np->stats_poll,
bfebbb88eca12a drivers/net/forcedeth.c                 Daniel Drake    2008-03-18  4293  			round_jiffies(jiffies + STATS_INTERVAL));
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10  4294  }
52da35789c305f drivers/net/forcedeth.c                 Ayaz Abdulla    2006-06-10  4295  

:::::: The code at line 4291 was first introduced by commit
:::::: 52da35789c305f6f44d0e85b294a9845c1271898 [PATCH] forcedeth config: statistics

:::::: TO: Ayaz Abdulla <aabdulla@nvidia.com>
:::::: CC: Jeff Garzik <jeff@garzik.org>

---
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: 29856 bytes --]

                 reply	other threads:[~2021-05-11  6:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202105111454.gm3osCyf-lkp@intel.com \
    --to=lkp@intel.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.