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] [day] [month] [year] [list]
Date:   Thu, 07 Nov 2019 16:12:49 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     salil.mehta@...wei.com
Cc:     maz@...nel.org, edumazet@...gle.com, yisen.zhuang@...wei.com,
        lipeng321@...wei.com, mehta.salil@...src.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linuxarm@...wei.com
Subject: Re: [PATCH V2 net] net: hns: Fix the stray netpoll locks causing
 deadlock in NAPI path

From: Salil Mehta <salil.mehta@...wei.com>
Date: Thu, 7 Nov 2019 17:09:53 +0000

> This patch fixes the problem of the spin locks, originally
> meant for the netpoll path of hns driver, causing deadlock in
> the normal NAPI poll path. The issue happened due to the presence
> of the stray leftover spin lock code related to the netpoll,
> whose support was earlier removed from the HNS[1], got activated
> due to enabling of NET_POLL_CONTROLLER switch.
> 
> Earlier background:
> The netpoll handling code originally had this bug(as identified
> by Marc Zyngier[2]) of wrong spin lock API being used which did
> not disable the interrupts and hence could cause locking issues.
> i.e. if the lock were first acquired in context to thread like
> 'ip' util and this lock if ever got later acquired again in
> context to the interrupt context like TX/RX (Interrupts could
> always pre-empt the lock holding task and acquire the lock again)
> and hence could cause deadlock.
> 
> Proposed Solution:
> 1. If the netpoll was enabled in the HNS driver, which is not
>    right now, we could have simply used spin_[un]lock_irqsave()
> 2. But as netpoll is disabled, therefore, it is best to get rid
>    of the existing locks and stray code for now. This should
>    solve the problem reported by Marc.
> 
> [1] https://git.kernel.org/torvalds/c/4bd2c03be7
> [2] https://patchwork.ozlabs.org/patch/1189139/
> 
> Fixes: 4bd2c03be707 ("net: hns: remove ndo_poll_controller")
> Reported-by: Marc Zyngier <maz@...nel.org>
> Acked-by: Marc Zyngier <maz@...nel.org>
> Tested-by: Marc Zyngier <maz@...nel.org>
> Signed-off-by: Salil Mehta <salil.mehta@...wei.com>

Applied and queued up for -stable, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ