lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2017 15:23:32 +0100
From:   Ben Hutchings <ben.hutchings@...ethink.co.uk>
To:     Hayes Wang <hayeswang@...ltek.com>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Sasha Levin <alexander.levin@...izon.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 4.4 37/46] r8152: re-schedule napi for tx

On Thu, 2017-06-15 at 19:52 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: hayeswang <hayeswang@...ltek.com>
> 
> 
> [ Upstream commit 248b213ad908b88db15941202ef7cb7eb137c1a0 ]
> 
> Re-schedule napi after napi_complete() for tx, if it is necessay.
> 
> In r8152_poll(), if the tx is completed after tx_bottom() and before
> napi_complete(), the scheduling of napi would be lost. Then, no
> one handles the next tx until the next napi_schedule() is called.
[...]

This (and other) tests of list_empty() aren't going to be reliable
unless you take the same spinlock used when enqueueing packets.
Alternately you could count packets added and removed from the driver
internal queues and then you should only need memory barriers for
synchronisation when comparing counters.

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ