Re: [PATCH nf-next v2 3/3] netfilter: nft_set_pipapo: Use nested-BH locking for nft_pipapo_scratch

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

 



Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
> @@ -1170,20 +1170,18 @@ nft_pipapo_avx2_lookup(const struct net *net, const struct nft_set *set,
>  	}
>  
>  	m = rcu_dereference(priv->match);
> -
> +	scratch = *raw_cpu_ptr(m->scratch);
> +	if (unlikely(!scratch)) {
> +		local_bh_enable();
> +		return false;

The function has been changed upstream to return a pointer.

> +	}
> +	__local_lock_nested_bh(&scratch->bh_lock);
>  	/* Note that we don't need a valid MXCSR state for any of the
>  	 * operations we use here, so pass 0 as mask and spare a LDMXCSR
>  	 * instruction.
>  	 */
>  	kernel_fpu_begin_mask(0);

Not sure this is correct.  If RT allows to migrate in BH before
the local lock is taken, then the if (unlikely(!irq_fpu_usable()))
check needs to be done after the local lock was taken, no?

I will place a pending pipapo change in the nf-next:testing
branch shortly in case you need to resend.

If its fine as-is, I can also rebase the pending pipapo_avx2 patches.

Let me know.




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

  Powered by Linux