Re: [PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-15 Thread Sebastian Andrzej Siewior
On 2020-10-15 10:11:31 [+0200], Eelco Chaudron wrote: > Thanks for your reply! Yes I had it replaced with local_bh_disable() in my > v2, as I noticed the hard IRQ to softirq part earlier. Okay. Resend the complete thing once you ready and I take a look. > Thanks, > > Eelco Sebastian

Re: [PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-15 Thread Eelco Chaudron
On 15 Oct 2020, at 9:55, Sebastian Andrzej Siewior wrote: On 2020-10-14 12:44:23 [+0200], Eelco Chaudron wrote: Let me know your thoughts. better. If your seccount is per-CPU then you get away without explicit writer locking if you rely on global per-CPU locking. You can't do preempt_disab

Re: [PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-15 Thread Sebastian Andrzej Siewior
On 2020-10-14 12:44:23 [+0200], Eelco Chaudron wrote: > Let me know your thoughts. better. If your seccount is per-CPU then you get away without explicit writer locking if you rely on global per-CPU locking. You can't do preempt_disable() because this section can be interrupt by softirq. You need

Re: [PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-14 Thread Eelco Chaudron
On 13 Oct 2020, at 14:53, Sebastian Andrzej Siewior wrote: On 2020-10-13 14:44:19 [+0200], Eelco Chaudron wrote: The flow_lookup() function uses per CPU variables, which must not be preempted. However, this is fine in the general napi use case where the local BH is disabled. But, it's also c

Re: [PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-13 Thread Sebastian Andrzej Siewior
On 2020-10-13 14:44:19 [+0200], Eelco Chaudron wrote: > The flow_lookup() function uses per CPU variables, which must not be > preempted. However, this is fine in the general napi use case where > the local BH is disabled. But, it's also called in the netlink > context, which is preemptible. The be

[PATCH net-next] net: openvswitch: fix to make sure flow_lookup() is not preempted

2020-10-13 Thread Eelco Chaudron
The flow_lookup() function uses per CPU variables, which must not be preempted. However, this is fine in the general napi use case where the local BH is disabled. But, it's also called in the netlink context, which is preemptible. The below patch makes sure that even in the netlink path, preemption