From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [linux-next:master 4829/6579] net/ipv6/route.c:661 rt6_probe() warn: sleeping in atomic context
Date: Sun, 12 Dec 2021 21:39:30 +0800 [thread overview]
Message-ID: <202112122113.vbkR1Jss-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6858 bytes --]
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ea922272cbe547bdf58da2aaf240d59782c6a009
commit: fb67510ba9bd3ed1f8a2db4946e847ca0418f8dc [4829/6579] ipv6: add net device refcount tracker to rt6_probe_deferred()
:::::: branch date: 2 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-m021-20211209 (https://download.01.org/0day-ci/archive/20211212/202112122113.vbkR1Jss-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
net/ipv6/route.c:661 rt6_probe() warn: sleeping in atomic context
Old smatch warnings:
net/ipv6/route.c:3424 ip6_route_check_nh() error: we previously assumed '_dev' could be null (see line 3384)
vim +661 net/ipv6/route.c
c2f17e827b4199 Hannes Frederic Sowa 2013-10-21 610
cc3a86c802f0ba David Ahern 2019-04-09 611 static void rt6_probe(struct fib6_nh *fib6_nh)
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 612 {
f547fac624be53 Sabrina Dubroca 2018-10-12 613 struct __rt6_probe_work *work = NULL;
5e670d844b2a4e David Ahern 2018-04-17 614 const struct in6_addr *nh_gw;
1bef4c223b8588 Eric Dumazet 2019-11-07 615 unsigned long last_probe;
f2c31e32b378a6 Eric Dumazet 2011-07-29 616 struct neighbour *neigh;
5e670d844b2a4e David Ahern 2018-04-17 617 struct net_device *dev;
f547fac624be53 Sabrina Dubroca 2018-10-12 618 struct inet6_dev *idev;
5e670d844b2a4e David Ahern 2018-04-17 619
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 620 /*
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 621 * Okay, this does not seem to be appropriate
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 622 * for now, however, we need to check if it
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 623 * is really so; aka Router Reachability Probing.
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 624 *
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 625 * Router Reachability Probe MUST be rate-limited
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 626 * to no more than one per minute.
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 627 */
004b39427f9456 Hangbin Liu 2019-11-20 628 if (!fib6_nh->fib_nh_gw_family)
7ff74a596b6aa4 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 629 return;
5e670d844b2a4e David Ahern 2018-04-17 630
cc3a86c802f0ba David Ahern 2019-04-09 631 nh_gw = &fib6_nh->fib_nh_gw6;
cc3a86c802f0ba David Ahern 2019-04-09 632 dev = fib6_nh->fib_nh_dev;
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 633 rcu_read_lock_bh();
1bef4c223b8588 Eric Dumazet 2019-11-07 634 last_probe = READ_ONCE(fib6_nh->last_probe);
f547fac624be53 Sabrina Dubroca 2018-10-12 635 idev = __in6_dev_get(dev);
5e670d844b2a4e David Ahern 2018-04-17 636 neigh = __ipv6_neigh_lookup_noref(dev, nh_gw);
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 637 if (neigh) {
8d6c31bf574177 Martin KaFai Lau 2015-07-24 638 if (neigh->nud_state & NUD_VALID)
8d6c31bf574177 Martin KaFai Lau 2015-07-24 639 goto out;
8d6c31bf574177 Martin KaFai Lau 2015-07-24 640
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 641 write_lock(&neigh->lock);
990edb428c2c85 Martin KaFai Lau 2015-07-24 642 if (!(neigh->nud_state & NUD_VALID) &&
990edb428c2c85 Martin KaFai Lau 2015-07-24 643 time_after(jiffies,
dcd1f572954f9d David Ahern 2018-04-18 644 neigh->updated + idev->cnf.rtr_probe_interval)) {
c2f17e827b4199 Hannes Frederic Sowa 2013-10-21 645 work = kmalloc(sizeof(*work), GFP_ATOMIC);
990edb428c2c85 Martin KaFai Lau 2015-07-24 646 if (work)
7e980569642811 Jiri Benc 2013-12-11 647 __neigh_set_probe_once(neigh);
990edb428c2c85 Martin KaFai Lau 2015-07-24 648 }
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 649 write_unlock(&neigh->lock);
1bef4c223b8588 Eric Dumazet 2019-11-07 650 } else if (time_after(jiffies, last_probe +
f547fac624be53 Sabrina Dubroca 2018-10-12 651 idev->cnf.rtr_probe_interval)) {
990edb428c2c85 Martin KaFai Lau 2015-07-24 652 work = kmalloc(sizeof(*work), GFP_ATOMIC);
990edb428c2c85 Martin KaFai Lau 2015-07-24 653 }
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 654
1bef4c223b8588 Eric Dumazet 2019-11-07 655 if (!work || cmpxchg(&fib6_nh->last_probe,
1bef4c223b8588 Eric Dumazet 2019-11-07 656 last_probe, jiffies) != last_probe) {
1bef4c223b8588 Eric Dumazet 2019-11-07 657 kfree(work);
1bef4c223b8588 Eric Dumazet 2019-11-07 658 } else {
c2f17e827b4199 Hannes Frederic Sowa 2013-10-21 659 INIT_WORK(&work->work, rt6_probe_deferred);
5e670d844b2a4e David Ahern 2018-04-17 660 work->target = *nh_gw;
fb67510ba9bd3e Eric Dumazet 2021-12-04 @661 dev_hold_track(dev, &work->dev_tracker, GFP_KERNEL);
5e670d844b2a4e David Ahern 2018-04-17 662 work->dev = dev;
c2f17e827b4199 Hannes Frederic Sowa 2013-10-21 663 schedule_work(&work->work);
c2f17e827b4199 Hannes Frederic Sowa 2013-10-21 664 }
990edb428c2c85 Martin KaFai Lau 2015-07-24 665
8d6c31bf574177 Martin KaFai Lau 2015-07-24 666 out:
2152caea719657 YOSHIFUJI Hideaki / 吉藤英明 2013-01-17 667 rcu_read_unlock_bh();
f2c31e32b378a6 Eric Dumazet 2011-07-29 668 }
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 669 #else
cc3a86c802f0ba David Ahern 2019-04-09 670 static inline void rt6_probe(struct fib6_nh *fib6_nh)
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 671 {
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 672 }
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 673 #endif
270972554c91ac YOSHIFUJI Hideaki 2006-03-20 674
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-12-12 13:39 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=202112122113.vbkR1Jss-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.