Re: [PATCH] ptr_ring: Add barriers to fix NULL-pointer exception

2017-12-06 Thread Michael S. Tsirkin
On Wed, Dec 06, 2017 at 02:08:54PM +, Cherian, George wrote: > > @@ -275,6 +281,13 @@ static inline void *__ptr_ring_consume(struct ptr_ring > *r) > > if (ptr) > > __ptr_ring_discard_one(r); > > > > + /* > > + * This barrier is necessary in order to prevent race condition with > > + * with __pt

Re: [PATCH] ptr_ring: Add barriers to fix NULL-pointer exception

2017-12-06 Thread Michael S. Tsirkin
On Wed, Dec 06, 2017 at 09:57:41AM +, George Cherian wrote: > While running a multiple VM testscase with each VM running iperf > traffic between others the following kernel NULL pointer exception > was seen. > > Race appears when the tun driver instance of one VM calls skb_array_produce > (fro

[PATCH] ptr_ring: Add barriers to fix NULL-pointer exception

2017-12-06 Thread George Cherian
While running a multiple VM testscase with each VM running iperf traffic between others the following kernel NULL pointer exception was seen. Race appears when the tun driver instance of one VM calls skb_array_produce (from tun_net_xmit) and the the destined VM's skb_array_consume (from tun_ring_r