[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202102140415.2XlaQadr-lkp@intel.com>
Date: Sun, 14 Feb 2021 04:47:40 +0800
From: kernel test robot <lkp@...el.com>
To: Taehee Yoo <ap420073@...il.com>, davem@...emloft.net,
kuba@...nel.org, xiyou.wangcong@...il.com, netdev@...r.kernel.org,
jwi@...ux.ibm.com, kgraul@...ux.ibm.com, hca@...ux.ibm.com,
gor@...ux.ibm.com, borntraeger@...ibm.com,
mareklindner@...mailbox.ch
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH net-next v2 7/7] mld: convert ifmcaddr6 to RCU
Hi Taehee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Taehee-Yoo/mld-change-context-from-atomic-to-sleepable/20210214-015930
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3c5a2fd042d0bfac71a2dfb99515723d318df47b
config: x86_64-randconfig-s022-20210214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/05d3b96bdcaec52bc3f2ef1f96e571dc17bf9f5a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taehee-Yoo/mld-change-context-from-atomic-to-sleepable/20210214-015930
git checkout 05d3b96bdcaec52bc3f2ef1f96e571dc17bf9f5a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
"sparse warnings: (new ones prefixed by >>)"
>> net/ipv6/mcast.c:764:44: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *[assigned] pmc @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:764:44: sparse: expected struct ifmcaddr6 *[assigned] pmc
net/ipv6/mcast.c:764:44: sparse: got struct ifmcaddr6 [noderef] __rcu *next
>> net/ipv6/mcast.c:773:39: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *mc_tomb @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:773:39: sparse: expected struct ifmcaddr6 *mc_tomb
net/ipv6/mcast.c:773:39: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:781:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *__tmp @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:781:35: sparse: expected struct ip6_sf_list [noderef] __rcu *__tmp
net/ipv6/mcast.c:781:35: sparse: got struct ip6_sf_list *
net/ipv6/mcast.c:781:33: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *sources @@ got struct ip6_sf_list [noderef] __rcu *__tmp @@
net/ipv6/mcast.c:781:33: sparse: expected struct ip6_sf_list *sources
net/ipv6/mcast.c:781:33: sparse: got struct ip6_sf_list [noderef] __rcu *__tmp
>> net/ipv6/mcast.c:804:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *nextpmc @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:804:25: sparse: expected struct ifmcaddr6 *nextpmc
net/ipv6/mcast.c:804:25: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:2301:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2301:43: sparse: expected struct ip6_sf_list *[assigned] dpsf
net/ipv6/mcast.c:2301:43: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2311:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *mca_tomb @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2311:63: sparse: expected struct ip6_sf_list *mca_tomb
net/ipv6/mcast.c:2311:63: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2323:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2323:63: sparse: expected struct ip6_sf_list *[assigned] dpsf
net/ipv6/mcast.c:2323:63: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2332:47: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *sf_next @@ got struct ip6_sf_list *mca_tomb @@
net/ipv6/mcast.c:2332:47: sparse: expected struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2332:47: sparse: got struct ip6_sf_list *mca_tomb
net/ipv6/mcast.c:2410:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *nextpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2410:25: sparse: expected struct ip6_sf_list *nextpsf
net/ipv6/mcast.c:2410:25: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:449:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:449:17: sparse: struct ip6_sf_socklist [noderef] __rcu *
net/ipv6/mcast.c:449:17: sparse: struct ip6_sf_socklist *
>> net/ipv6/mcast.c:935:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 [noderef] __rcu * @@ got struct ifmcaddr6 * @@
net/ipv6/mcast.c: note: in included file:
include/net/mld.h:32:43: sparse: sparse: array of flexible structures
net/ipv6/mcast.c:1777:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1833:51: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1901:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:1901:20: sparse: struct ip6_sf_list [noderef] __rcu *
net/ipv6/mcast.c:1901:20: sparse: struct ip6_sf_list *
>> net/ipv6/mcast.c:1925:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *pmc_next @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:1925:26: sparse: expected struct ifmcaddr6 *pmc_next
net/ipv6/mcast.c:1925:26: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:1940:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ip6_sf_list **ppsf @@ got struct ip6_sf_list [noderef] __rcu ** @@
net/ipv6/mcast.c:1940:50: sparse: expected struct ip6_sf_list **ppsf
net/ipv6/mcast.c:1940:50: sparse: got struct ip6_sf_list [noderef] __rcu **
>> net/ipv6/mcast.c:1946:48: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 [noderef] __rcu *next @@ got struct ifmcaddr6 *pmc_next @@
net/ipv6/mcast.c:1946:48: sparse: expected struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:1946:48: sparse: got struct ifmcaddr6 *pmc_next
net/ipv6/mcast.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:700:9: sparse: sparse: context imbalance in 'ip6_mc_msfget' - unexpected unlock
vim +764 net/ipv6/mcast.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 756
1666d49e1d416f Hangbin Liu 2017-01-12 757 static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
^1da177e4c3f41 Linus Torvalds 2005-04-16 758 {
1666d49e1d416f Hangbin Liu 2017-01-12 759 struct in6_addr *pmca = &im->mca_addr;
50d689e601cc17 Taehee Yoo 2021-02-13 760 struct ip6_sf_list *psf, *sources;
50d689e601cc17 Taehee Yoo 2021-02-13 761 struct ifmcaddr6 *pmc, *pmc_prev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 762
^1da177e4c3f41 Linus Torvalds 2005-04-16 763 pmc_prev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @764 for (pmc = idev->mc_tomb; pmc; pmc = pmc->next) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 765 if (ipv6_addr_equal(&pmc->mca_addr, pmca))
^1da177e4c3f41 Linus Torvalds 2005-04-16 766 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 767 pmc_prev = pmc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 768 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 769 if (pmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 770 if (pmc_prev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 771 pmc_prev->next = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 772 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 @773 idev->mc_tomb = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 774 }
6457d26bd40077 Stephen Hemminger 2010-02-17 775
^1da177e4c3f41 Linus Torvalds 2005-04-16 776 if (pmc) {
1666d49e1d416f Hangbin Liu 2017-01-12 777 im->idev = pmc->idev;
08d3ffcc0cfaba Hangbin Liu 2018-07-20 778 if (im->mca_sfmode == MCAST_INCLUDE) {
a84d016479896b Eric Dumazet 2019-08-27 779 swap(im->mca_tomb, pmc->mca_tomb);
50d689e601cc17 Taehee Yoo 2021-02-13 780
50d689e601cc17 Taehee Yoo 2021-02-13 781 sources = rcu_replace_pointer(im->mca_sources,
50d689e601cc17 Taehee Yoo 2021-02-13 782 pmc->mca_sources,
50d689e601cc17 Taehee Yoo 2021-02-13 783 lockdep_rtnl_is_held());
50d689e601cc17 Taehee Yoo 2021-02-13 784 rcu_assign_pointer(pmc->mca_sources, sources);
50d689e601cc17 Taehee Yoo 2021-02-13 785 for_each_psf_rtnl(im, psf)
c7ea20c9da5b94 Hangbin Liu 2018-07-10 786 psf->sf_crcount = idev->mc_qrv;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 787 } else {
c7ea20c9da5b94 Hangbin Liu 2018-07-10 788 im->mca_crcount = idev->mc_qrv;
^1da177e4c3f41 Linus Torvalds 2005-04-16 789 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 790 in6_dev_put(pmc->idev);
a84d016479896b Eric Dumazet 2019-08-27 791 ip6_mc_clear_src(pmc);
9c8bb163ae784b Hangbin Liu 2017-02-08 792 kfree(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 793 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 794 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 795
^1da177e4c3f41 Linus Torvalds 2005-04-16 796 static void mld_clear_delrec(struct inet6_dev *idev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 797 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 798 struct ifmcaddr6 *pmc, *nextpmc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 799
^1da177e4c3f41 Linus Torvalds 2005-04-16 800 pmc = idev->mc_tomb;
^1da177e4c3f41 Linus Torvalds 2005-04-16 801 idev->mc_tomb = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 802
^1da177e4c3f41 Linus Torvalds 2005-04-16 803 for (; pmc; pmc = nextpmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @804 nextpmc = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 805 ip6_mc_clear_src(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 806 in6_dev_put(pmc->idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 807 kfree(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 808 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 809
^1da177e4c3f41 Linus Torvalds 2005-04-16 810 /* clear dead sources, too */
05d3b96bdcaec5 Taehee Yoo 2021-02-13 811 for_each_mc_rtnl(idev, pmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 812 struct ip6_sf_list *psf, *psf_next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 813
^1da177e4c3f41 Linus Torvalds 2005-04-16 814 psf = pmc->mca_tomb;
^1da177e4c3f41 Linus Torvalds 2005-04-16 815 pmc->mca_tomb = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 816 for (; psf; psf = psf_next) {
50d689e601cc17 Taehee Yoo 2021-02-13 817 psf_next = rtnl_dereference(psf->sf_next);
50d689e601cc17 Taehee Yoo 2021-02-13 818 kfree_rcu(psf, rcu);
^1da177e4c3f41 Linus Torvalds 2005-04-16 819 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 820 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 821 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 822
1691c63ea42d6f WANG Cong 2014-09-11 823 static void mca_get(struct ifmcaddr6 *mc)
1691c63ea42d6f WANG Cong 2014-09-11 824 {
d3981bc615f652 Reshetova, Elena 2017-07-04 825 refcount_inc(&mc->mca_refcnt);
1691c63ea42d6f WANG Cong 2014-09-11 826 }
1691c63ea42d6f WANG Cong 2014-09-11 827
1691c63ea42d6f WANG Cong 2014-09-11 828 static void ma_put(struct ifmcaddr6 *mc)
1691c63ea42d6f WANG Cong 2014-09-11 829 {
d3981bc615f652 Reshetova, Elena 2017-07-04 830 if (refcount_dec_and_test(&mc->mca_refcnt)) {
1691c63ea42d6f WANG Cong 2014-09-11 831 in6_dev_put(mc->idev);
05d3b96bdcaec5 Taehee Yoo 2021-02-13 832 kfree_rcu(mc, rcu);
1691c63ea42d6f WANG Cong 2014-09-11 833 }
1691c63ea42d6f WANG Cong 2014-09-11 834 }
1691c63ea42d6f WANG Cong 2014-09-11 835
1691c63ea42d6f WANG Cong 2014-09-11 836 static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 837 const struct in6_addr *addr,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 838 unsigned int mode)
1691c63ea42d6f WANG Cong 2014-09-11 839 {
1691c63ea42d6f WANG Cong 2014-09-11 840 struct ifmcaddr6 *mc;
1691c63ea42d6f WANG Cong 2014-09-11 841
05d3b96bdcaec5 Taehee Yoo 2021-02-13 842 mc = kzalloc(sizeof(*mc), GFP_KERNEL);
63159f29be1df7 Ian Morris 2015-03-29 843 if (!mc)
1691c63ea42d6f WANG Cong 2014-09-11 844 return NULL;
1691c63ea42d6f WANG Cong 2014-09-11 845
da82b573563d55 Taehee Yoo 2021-02-13 846 INIT_DELAYED_WORK(&mc->mca_work, mld_mca_work);
1691c63ea42d6f WANG Cong 2014-09-11 847
1691c63ea42d6f WANG Cong 2014-09-11 848 mc->mca_addr = *addr;
1691c63ea42d6f WANG Cong 2014-09-11 849 mc->idev = idev; /* reference taken by caller */
1691c63ea42d6f WANG Cong 2014-09-11 850 mc->mca_users = 1;
1691c63ea42d6f WANG Cong 2014-09-11 851 /* mca_stamp should be updated upon changes */
1691c63ea42d6f WANG Cong 2014-09-11 852 mc->mca_cstamp = mc->mca_tstamp = jiffies;
d3981bc615f652 Reshetova, Elena 2017-07-04 853 refcount_set(&mc->mca_refcnt, 1);
1691c63ea42d6f WANG Cong 2014-09-11 854 spin_lock_init(&mc->mca_lock);
1691c63ea42d6f WANG Cong 2014-09-11 855
c7ea20c9da5b94 Hangbin Liu 2018-07-10 856 mc->mca_sfmode = mode;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 857 mc->mca_sfcount[mode] = 1;
1691c63ea42d6f WANG Cong 2014-09-11 858
1691c63ea42d6f WANG Cong 2014-09-11 859 if (ipv6_addr_is_ll_all_nodes(&mc->mca_addr) ||
1691c63ea42d6f WANG Cong 2014-09-11 860 IPV6_ADDR_MC_SCOPE(&mc->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL)
a3403c9c2ef72a Taehee Yoo 2021-02-13 861 mc->mca_noreport = true;
1691c63ea42d6f WANG Cong 2014-09-11 862
1691c63ea42d6f WANG Cong 2014-09-11 863 return mc;
1691c63ea42d6f WANG Cong 2014-09-11 864 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 865
^1da177e4c3f41 Linus Torvalds 2005-04-16 866 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 867 * device multicast group inc (add if not found)
^1da177e4c3f41 Linus Torvalds 2005-04-16 868 */
c7ea20c9da5b94 Hangbin Liu 2018-07-10 869 static int __ipv6_dev_mc_inc(struct net_device *dev,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 870 const struct in6_addr *addr, unsigned int mode)
^1da177e4c3f41 Linus Torvalds 2005-04-16 871 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 872 struct ifmcaddr6 *mc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 873 struct inet6_dev *idev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 874
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 875 ASSERT_RTNL();
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 876
96b52e61be1ad4 Eric Dumazet 2010-06-07 877 /* we need to take a reference on idev */
^1da177e4c3f41 Linus Torvalds 2005-04-16 878 idev = in6_dev_get(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 879
63159f29be1df7 Ian Morris 2015-03-29 880 if (!idev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 881 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 882
^1da177e4c3f41 Linus Torvalds 2005-04-16 883 if (idev->dead) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 884 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 885 return -ENODEV;
^1da177e4c3f41 Linus Torvalds 2005-04-16 886 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 887
05d3b96bdcaec5 Taehee Yoo 2021-02-13 888 for_each_mc_rtnl(idev, mc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 889 if (ipv6_addr_equal(&mc->mca_addr, addr)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 890 mc->mca_users++;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 891 ip6_mc_add_src(idev, &mc->mca_addr, mode, 0, NULL, 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 892 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 893 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 894 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 895 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 896
c7ea20c9da5b94 Hangbin Liu 2018-07-10 897 mc = mca_alloc(idev, addr, mode);
1691c63ea42d6f WANG Cong 2014-09-11 898 if (!mc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 899 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 900 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 901 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 902
05d3b96bdcaec5 Taehee Yoo 2021-02-13 903 rcu_assign_pointer(mc->next, idev->mc_list);
05d3b96bdcaec5 Taehee Yoo 2021-02-13 904 rcu_assign_pointer(idev->mc_list, mc);
1691c63ea42d6f WANG Cong 2014-09-11 905
1691c63ea42d6f WANG Cong 2014-09-11 906 mca_get(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 907
1666d49e1d416f Hangbin Liu 2017-01-12 908 mld_del_delrec(idev, mc);
0ae0d60a379c11 Hangbin Liu 2018-07-20 909 igmp6_group_added(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 910 ma_put(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 911 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 912 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 913
c7ea20c9da5b94 Hangbin Liu 2018-07-10 914 int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr)
c7ea20c9da5b94 Hangbin Liu 2018-07-10 915 {
c7ea20c9da5b94 Hangbin Liu 2018-07-10 916 return __ipv6_dev_mc_inc(dev, addr, MCAST_EXCLUDE);
c7ea20c9da5b94 Hangbin Liu 2018-07-10 917 }
4effd28c124530 Linus Lüssing 2019-01-21 918 EXPORT_SYMBOL(ipv6_dev_mc_inc);
c7ea20c9da5b94 Hangbin Liu 2018-07-10 919
^1da177e4c3f41 Linus Torvalds 2005-04-16 920 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 921 * device multicast group del
^1da177e4c3f41 Linus Torvalds 2005-04-16 922 */
9acd9f3ae92d0d YOSHIFUJI Hideaki 2008-04-10 923 int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 924 {
05d3b96bdcaec5 Taehee Yoo 2021-02-13 925 struct ifmcaddr6 __rcu **map;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 926 struct ifmcaddr6 *ma;
^1da177e4c3f41 Linus Torvalds 2005-04-16 927
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 928 ASSERT_RTNL();
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 929
05d3b96bdcaec5 Taehee Yoo 2021-02-13 930 for (map = &idev->mc_list;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 931 (ma = rtnl_dereference(*map)) != NULL;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 932 map = &ma->next) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 933 if (ipv6_addr_equal(&ma->mca_addr, addr)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 934 if (--ma->mca_users == 0) {
05d3b96bdcaec5 Taehee Yoo 2021-02-13 @935 *map = rtnl_dereference(ma->next);
^1da177e4c3f41 Linus Torvalds 2005-04-16 936
^1da177e4c3f41 Linus Torvalds 2005-04-16 937 igmp6_group_dropped(ma);
1666d49e1d416f Hangbin Liu 2017-01-12 938 ip6_mc_clear_src(ma);
^1da177e4c3f41 Linus Torvalds 2005-04-16 939
^1da177e4c3f41 Linus Torvalds 2005-04-16 940 ma_put(ma);
^1da177e4c3f41 Linus Torvalds 2005-04-16 941 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 942 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 943 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 944 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 945 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 946
^1da177e4c3f41 Linus Torvalds 2005-04-16 947 return -ENOENT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 948 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 949
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32333 bytes)
Powered by blists - more mailing lists