On Tue, Mar 12, 2024 at 03:10:46PM +0100, Florian Westphal wrote: > 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, > nft_trans_table_udata(trans), > lockdep_commit_lock_is_held(trans->ctx.net)); > > This will swap and ensure all stores are visible. Thank you Pablo and Florian for pointing it out. I will fix it following your suggestions. Thanks, Quan