All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Kim <kim.andrewsy@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org,
	"open list:NETFILTER" <netfilter-devel@vger.kernel.org>,
	"open list:NETFILTER" <coreteam@netfilter.org>,
	Julian Anastasov <ja@ssi.bg>
Subject: Re: [nf-next:master 2/3] net/netfilter/ipvs/ip_vs_conn.c:1394:6: sparse: sparse: context imbalance in 'ip_vs_expire_nodest_conn_flush' - wrong count at exit
Date: Thu, 16 Jul 2020 12:47:21 -0400	[thread overview]
Message-ID: <CABc050FZViqeAfLkkn0nQPJ4Zf045aV9gfajzjuGc9Ksnh7_4g@mail.gmail.com> (raw)
In-Reply-To: <20200716161414.GA27494@salvia>

Will send a patch to fix this shortly :)

On Thu, Jul 16, 2020 at 12:14 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> On Thu, Jul 16, 2020 at 10:42:53PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
> > head:   3354c27699652b271b78c85f275b818e6b9843e6
> > commit: 04231e52d3557475231abe8a8fa1be0330826ed6 [2/3] ipvs: queue delayed work to expire no destination connections if expire_nodest_conn=1
> > :::::: branch date: 5 hours ago
> > :::::: commit date: 5 hours ago
> > config: mips-randconfig-s032-20200715 (attached as .config)
> > compiler: mipsel-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.2-49-g707c5017-dirty
> >         git checkout 04231e52d3557475231abe8a8fa1be0330826ed6
> >         # 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__' ARCH=mips
> >
> > 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 >>)
> >
> > >> net/netfilter/ipvs/ip_vs_conn.c:1394:6: sparse: sparse: context imbalance in 'ip_vs_expire_nodest_conn_flush' - wrong count at exit
> >
> > # https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=04231e52d3557475231abe8a8fa1be0330826ed6
> > git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
> > git remote update nf-next
> > git checkout 04231e52d3557475231abe8a8fa1be0330826ed6
> > vim +/ip_vs_expire_nodest_conn_flush +1394 net/netfilter/ipvs/ip_vs_conn.c
> >
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1392
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1393  #ifdef CONFIG_SYSCTL
> > 04231e52d355747 Andrew Sy Kim 2020-07-08 @1394  void ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1395  {
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1396        int idx;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1397        struct ip_vs_conn *cp, *cp_c;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1398        struct ip_vs_dest *dest;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1399
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1400        rcu_read_lock();
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1401        for (idx = 0; idx < ip_vs_conn_tab_size; idx++) {
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1402                hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) {
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1403                        if (cp->ipvs != ipvs)
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1404                                continue;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1405
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1406                        dest = cp->dest;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1407                        if (!dest || (dest->flags & IP_VS_DEST_F_AVAILABLE))
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1408                                continue;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1409
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1410                        if (atomic_read(&cp->n_control))
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1411                                continue;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1412
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1413                        cp_c = cp->control;
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1414                        IP_VS_DBG(4, "del connection\n");
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1415                        ip_vs_conn_del(cp);
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1416                        if (cp_c && !atomic_read(&cp_c->n_control)) {
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1417                                IP_VS_DBG(4, "del controlling connection\n");
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1418                                ip_vs_conn_del(cp_c);
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1419                        }
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1420                }
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1421                cond_resched_rcu();
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1422
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1423                /* netns clean up started, abort delayed work */
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1424                if (!ipvs->enable)
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1425                        return;
>
>                                         Missing rcu_read_unlock() here ?
>
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1426        }
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1427        rcu_read_unlock();
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1428  }
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1429  #endif
> > 04231e52d355747 Andrew Sy Kim 2020-07-08  1430
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
>

  reply	other threads:[~2020-07-16 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 14:42 [nf-next:master 2/3] net/netfilter/ipvs/ip_vs_conn.c:1394:6: sparse: sparse: context imbalance in 'ip_vs_expire_nodest_conn_flush' - wrong count at exit kernel test robot
2020-07-16 14:42 ` kernel test robot
2020-07-16 16:14 ` Pablo Neira Ayuso
2020-07-16 16:14   ` Pablo Neira Ayuso
2020-07-16 16:47   ` Andrew Kim [this message]
2020-07-16 16:55   ` Julian Anastasov
2020-07-16 16:55     ` Julian Anastasov
  -- strict thread matches above, loose matches on Subject: below --
2020-07-16  1:33 kernel test robot

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=CABc050FZViqeAfLkkn0nQPJ4Zf045aV9gfajzjuGc9Ksnh7_4g@mail.gmail.com \
    --to=kim.andrewsy@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=ja@ssi.bg \
    --cc=kbuild-all@lists.01.org \
    --cc=lkp@intel.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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.