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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 01 May 2023 08:04:41 -0700
From:   Alexander H Duyck <alexander.duyck@...il.com>
To:     Shmuel Hazan <shmuel.h@...lu.com>,
        Russell King <linux@...linux.org.uk>
Cc:     Marcin Wojtas <mw@...ihalf.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Richard Cochran <richardcochran@...il.com>,
        horatiu.vultur@...rochip.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v4 1/3] net: mvpp2: tai: add refcount for ptp worker

On Sun, 2023-04-30 at 20:06 +0300, Shmuel Hazan wrote:
> In some configurations, a single TAI can be responsible for multiple
> mvpp2 interfaces. However, the mvpp2 driver will call mvpp22_tai_stop
> and mvpp22_tai_start per interface RX timestamp disable/enable.
> 
> As a result, disabling timestamping for one interface would stop the
> worker and corrupt the other interface's RX timestamps.
> 
> This commit solves the issue by introducing a simpler ref count for each
> TAI instance.
> 
> Due to the ref count, we need now to lock tai->refcount_lock before
> doing anything. As a result, we can't call mvpp22_tai_do_aux_work as it
> will cause a deadlock. Therefore, we will just schedule the worker to
> start immediately.
> 
> Fixes: ce3497e2072e ("net: mvpp2: ptp: add support for receive timestamping")
> Signed-off-by: Shmuel Hazan <shmuel.h@...lu.com>
> ---
> v1 -> v2: lock tai->lock before touching poll_worker_refcount.
> v2 -> v3: no change
> v3 -> v4: added additional lock for poll_worker_refcount due to
> 	  a possible deadlock.
> ---
>  .../net/ethernet/marvell/mvpp2/mvpp2_tai.c    | 28 +++++++++++++++++--
>  1 file changed, 25 insertions(+), 3 deletions(-)
> 

So this patch looks fine to me. However you submitted this and the
other 2 for net. The other 2 patches in this series seem to be a
feature add rather than a fix. As such you may want to split up this
set and submit the other two patches for net-next instead of net.

Reviewed-by: Alexander Duyck <alexanderduyck@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ