Hi Li, Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net/master] [also build test WARNING on v5.0-rc4 next-20190222] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Li-RongQing/ipv6-sanitize-RCU-usage-on-fib6_next/20190224-083824 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All warnings (new ones prefixed by >>): >> net/ipv6/ip6_fib.c:1764:14: sparse: warning: incorrect type in assignment >> (different address spaces) net/ipv6/ip6_fib.c:1764:14: sparse: expected struct fib6_info [noderef] <asn:4> * net/ipv6/ip6_fib.c:1764:14: sparse: got struct fib6_info * sparse warnings: (new ones prefixed by >>) net/ipv6/ip6_fib.c:1764:14: sparse: warning: incorrect type in assignment (different address spaces) >> net/ipv6/ip6_fib.c:1764:14: sparse: expected struct fib6_info [noderef] >> <asn:4> * >> net/ipv6/ip6_fib.c:1764:14: sparse: got struct fib6_info * vim +1764 net/ipv6/ip6_fib.c 1752 1753 static void fib6_del_route(struct fib6_table *table, struct fib6_node *fn, 1754 struct fib6_info __rcu **rtp, struct nl_info *info) 1755 { 1756 struct fib6_walker *w; 1757 struct fib6_info *rt = rcu_dereference_protected(*rtp, 1758 lockdep_is_held(&table->tb6_lock)); 1759 struct net *net = info->nl_net; 1760 1761 RT6_TRACE("fib6_del_route\n"); 1762 1763 /* Unlink it */ > 1764 *rtp = rcu_dereference_protected(rt->fib6_next, 1765 lockdep_is_held(&rt->fib6_table->tb6_lock)); 1766 1767 rt->fib6_node = NULL; 1768 net->ipv6.rt6_stats->fib_rt_entries--; 1769 net->ipv6.rt6_stats->fib_discarded_routes++; 1770 1771 /* Flush all cached dst in exception table */ 1772 rt6_flush_exceptions(rt); 1773 1774 /* Reset round-robin state, if necessary */ 1775 if (rcu_access_pointer(fn->rr_ptr) == rt) 1776 fn->rr_ptr = NULL; 1777 1778 /* Remove this entry from other siblings */ 1779 if (rt->fib6_nsiblings) { 1780 struct fib6_info *sibling, *next_sibling; 1781 1782 list_for_each_entry_safe(sibling, next_sibling, 1783 &rt->fib6_siblings, fib6_siblings) 1784 sibling->fib6_nsiblings--; 1785 rt->fib6_nsiblings = 0; 1786 list_del_init(&rt->fib6_siblings); 1787 rt6_multipath_rebalance(next_sibling); 1788 } 1789 1790 /* Adjust walkers */ 1791 read_lock(&net->ipv6.fib6_walker_lock); 1792 FOR_WALKERS(net, w) { 1793 if (w->state == FWS_C && w->leaf == rt) { 1794 RT6_TRACE("walker %p adjusted by delroute\n", w); 1795 w->leaf = rcu_dereference_protected(rt->fib6_next, 1796 lockdep_is_held(&table->tb6_lock)); 1797 if (!w->leaf) 1798 w->state = FWS_U; 1799 } 1800 } 1801 read_unlock(&net->ipv6.fib6_walker_lock); 1802 1803 /* If it was last route, call fib6_repair_tree() to: 1804 * 1. For root node, put back null_entry as how the table was created. 1805 * 2. For other nodes, expunge its radix tree node. 1806 */ 1807 if (!rcu_access_pointer(fn->leaf)) { 1808 if (!(fn->fn_flags & RTN_TL_ROOT)) { 1809 fn->fn_flags &= ~RTN_RTINFO; 1810 net->ipv6.rt6_stats->fib_route_nodes--; 1811 } 1812 fn = fib6_repair_tree(net, table, fn); 1813 } 1814 1815 fib6_purge_rt(rt, fn, net); 1816 1817 call_fib6_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, rt, NULL); 1818 if (!info->skip_notify) 1819 inet6_rt_notify(RTM_DELROUTE, rt, info, 0); 1820 fib6_info_release(rt); 1821 } 1822 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip