Re: [PATCH v3 nf-next 2/2] netfilter: nf_tables: support updating userdata for nft_table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Quan Tian <tianquan23@xxxxxxxxx> wrote:
> -				trans->ctx.table->flags &= ~__NFT_TABLE_F_UPDATE;
> +				swap(trans->ctx.table->udata, nft_trans_table_udata(trans));
> +				nf_tables_table_notify(&trans->ctx, NFT_MSG_NEWTABLE);

I missed this in my review, as Pablo pointed out you can't use swap()
here, because table->udata is rcu protected.

Something like this should work as replacement:

nft_trans_table_udata(trans) = rcu_replace_pointer(trans->ctx.table->udata,

This will swap and ensure all stores are visible.

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux