lkml.org 
[lkml]   [2013]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] tuntap: fix a possible race between queue selection and changing queues
From
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 5 Jun 2013 13:33:32 +0300

> On Wed, Jun 05, 2013 at 04:44:57PM +0800, Jason Wang wrote:
>> Complier may generate codes that re-read the tun->numqueues during
>> tun_select_queue(). This may be a race if vlan->numqueues were changed in the
>> same time and can lead unexpected result (e.g. very huge value).
>>
>> We need prevent the compiler from generating such codes by adding an
>> ACCESS_ONCE() to make sure tun->numqueues were only read once.
>>
>> Bug were introduced by commit c8d68e6be1c3b242f1c598595830890b65cea64a
>> (tuntap: multiqueue support).
>>
>> Reported-by: Michael S. Tsirkin <mst@redhat.com>
>> Cc: Michael S. Tsirkin <mst@redhat.com>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>
> This is a theoretical problem, right?
> So no need for stable.

Applied, thanks.


\
 
 \ /
  Last update: 2013-06-11 01:01    [W:0.070 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site