Subject: Re: [RFC PATCH] tuntap: Fix for a race in accessing numqueue

From: Sergei Shtylyov <[email-masked]>
Date: Sat, 18 Jan 2014 21:43:17 +0400

Hello.

On 18-01-2014 4:26, Dominic Curran wrote:

> A patch for fixing a race between queue selection and changing queues
> was introduced in commit 92bb73ea2c434618a68a5.

    Please also specify that commit's summary line in parens.

> The fix was to prevent the driver from re-reading the tun->numqueues
> more than once within tun_select_queue().

> We have been experiancing  'Divide-by-zero' errors in
> tun_net_xmit() since we moved from 3.6 to 3.10, and believe that they
> come from a simular source where the value of tun->numqueues changes
> to zero between the first and second read of tun->numqueues.

> Signed-off-by: Dominic Curran <[email-masked]>
> Cc: Jason Wang <[email-masked]>
> Cc: Maxim Krasnyansky <[email-masked]>

WBR, Sergei