[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140122.213316.1975984315340872670.davem@davemloft.net>
Date: Wed, 22 Jan 2014 21:33:16 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dominic.curran@...rix.com
Cc: netdev@...r.kernel.org, jasowang@...hat.com, maxk@....qualcomm.com
Subject: Re: [PATCH net-next v3] tuntap: Fix for a race in accessing
numqueues
From: Dominic Curran <dominic.curran@...rix.com>
Date: Wed, 22 Jan 2014 03:03:23 +0000
> A patch for fixing a race between queue selection and changing queues
> was introduced in commit 92bb73ea2("tuntap: fix a possible race between
> queue selection and changing queues").
>
> The fix was to prevent the driver from re-reading the tun->numqueues
> more than once within tun_select_queue() using ACCESS_ONCE().
>
> 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 a subsequent read of tun->numqueues.
>
> The fix is a simular use of ACCESS_ONCE(), as well as a multiply
> instead of a divide in the if statement.
>
> Signed-off-by: Dominic Curran <dominic.curran@...rix.com>
Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists