[OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54 for 18.06

Stijn Segers foss at volatilesystems.org
Thu Jul 12 16:10:07 EDT 2018


Op wo, 11 jul 2018 om 10:31 , schreef Koen Vandeputte 
<koen.vandeputte at ncentric.com>:
> 
> 
> On 2018-07-11 10:11, Kevin Darbyshire-Bryant wrote:
> >
> > Really not convinced I agree with the "patch 335 removes the whole 
> code block where that one line changed in upstream”.  Did a refresh 
> myself, several times, and patch 335 is a right confusing pain in the 
> backside.  I think the block in question should look like:
> >
> > @@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
> >   	rcu_read_lock();
> >   	cb->seq = net->nft.base_seq;
> >
> > -	list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
> > -		if (family != NFPROTO_UNSPEC && family != afi->family)
> > +	list_for_each_entry_rcu(table, &net->nft.tables, list) {
> > +		if (family != NFPROTO_UNSPEC && family != table->afi->family)
> >   			continue;
> >
> > -		list_for_each_entry_rcu(table, &afi->tables, list) {
> > -			list_for_each_entry_rcu(obj, &table->objects, list) {
> > -				if (!nft_is_active(net, obj))
> > -					goto cont;
> > -				if (idx < s_idx)
> > -					goto cont;
> > -				if (idx > s_idx)
> > -					memset(&cb->args[1], 0,
> > -					       sizeof(cb->args) - sizeof(cb->args[0]));
> > -				if (filter && filter->table &&
> > -				    strcmp(filter->table, table->name))
> > -					goto cont;
> > -				if (filter &&
> > -				    filter->type != NFT_OBJECT_UNSPEC &&
> > -				    obj->ops->type->type != filter->type)
> > -					goto cont;
> > +		list_for_each_entry_rcu(obj, &table->objects, list) {
> > +			if (!nft_is_active(net, obj))
> > +				goto cont;
> > +			if (idx < s_idx)
> > +				goto cont;
> > +			if (idx > s_idx)
> > +				memset(&cb->args[1], 0,
> > +				       sizeof(cb->args) - sizeof(cb->args[0]));
> > +			if (filter && filter->table &&
> > +			    strcmp(filter->table, table->name))
> > +				goto cont;
> > +			if (filter &&
> > +			    filter->type != NFT_OBJECT_UNSPEC &&
> > +			    obj->ops->type->type != filter->type)
> > +				goto cont;
> >
> > -				if (nf_tables_fill_obj_info(skb, net, 
> NETLINK_CB(cb->skb).portid,
> > -							    cb->nlh->nlmsg_seq,
> > -							    NFT_MSG_NEWOBJ,
> > -							    NLM_F_MULTI | NLM_F_APPEND,
> > -							    afi->family, table, obj, reset) < 0)
> > -					goto done;
> > +			if (nf_tables_fill_obj_info(skb, net, 
> NETLINK_CB(cb->skb).portid,
> > +						    cb->nlh->nlmsg_seq,
> > +						    NFT_MSG_NEWOBJ,
> > +						    NLM_F_MULTI | NLM_F_APPEND,
> > +						    table->afi->family, table,
> > +						    obj, reset) < 0)
> > +				goto done;
> >
> > -				nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> > -cont:
> > -				idx++;
> > -			}
> > +			nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> > +  cont:
> > +			idx++;
> >   		}
> >   	}
> >   done:
> >
> > There are a couple of similar blocks, which have probably confused 
> me anyway.
> >
> > Overall this one patch in the refresh makes me distinctly 
> uncomfortable.
> >
> >
> +1 to get this cleaned up properly, but I would propose to do it
> separately and after the kernel bump patch.
> 
> Koen

Hi Koen,

Thanks, you beat me to it - thank you.

Stijn
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list