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]
Message-Id: <20150113.172239.2262191030096000641.davem@davemloft.net>
Date:	Tue, 13 Jan 2015 17:22:39 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	david.vrabel@...rix.com
Cc:	netdev@...r.kernel.org, xen-devel@...ts.xenproject.org,
	konrad.wilk@...cle.com, boris.ostrovsky@...cle.com
Subject: Re: [PATCHv2 net] xen-netfront: use different locks for Rx and Tx
 stats

From: David Vrabel <david.vrabel@...rix.com>
Date: Tue, 13 Jan 2015 16:42:42 +0000

> In netfront the Rx and Tx path are independent and use different
> locks.  The Tx lock is held with hard irqs disabled, but Rx lock is
> held with only BH disabled.  Since both sides use the same stats lock,
> a deadlock may occur.
> 
>   [ INFO: possible irq lock inversion dependency detected ]
>   3.16.2 #16 Not tainted
>   ---------------------------------------------------------
>   swapper/0/0 just changed the state of lock:
>    (&(&queue->tx_lock)->rlock){-.....}, at: [<c03adec8>]
>   xennet_tx_interrupt+0x14/0x34
>   but this lock took another, HARDIRQ-unsafe lock in the past:
>    (&stat->syncp.seq#2){+.-...}
>   and interrupts could create inverse lock ordering between them.
>   other info that might help us debug this:
>    Possible interrupt unsafe locking scenario:
> 
>          CPU0                    CPU1
>          ----                    ----
>     lock(&stat->syncp.seq#2);
>                                  local_irq_disable();
>                                  lock(&(&queue->tx_lock)->rlock);
>                                  lock(&stat->syncp.seq#2);
>     <Interrupt>
>       lock(&(&queue->tx_lock)->rlock);
> 
> Using separate locks for the Rx and Tx stats fixes this deadlock.
> 
> Reported-by: Dmitry Piotrovsky <piotrovskydmitry@...il.com>
> Signed-off-by: David Vrabel <david.vrabel@...rix.com>

Applied, thanks.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ