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: <20110412.143329.59682750.davem@davemloft.net>
Date:	Tue, 12 Apr 2011 14:33:29 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	srk@...com
Cc:	netdev@...r.kernel.org,
	davinci-linux-open-source@...ux.davincidsp.com
Subject: Re: [PATCH] net: davinci_emac: fix spinlock bug with dma channel
 cleanup

From: Sriramakrishnan A G <srk@...com>
Date: Tue, 12 Apr 2011 10:12:31 +0530

> The DMA cleanup function was holding the spinlock across
> a busy loop where it waits for HW to indicate teardown is complete.
> This generates a backtrace, when DEBUG_SPINLOCK is enabled. Make the
> locking more granular.
> 
> Signed-off-by: Sriramakrishnan A G <srk@...com>

You can't really sleep in this function at all.

For example, it gets invoked from the ->ndo_tx_timeout() method in
davinci_emac.c, which runs from a timer.

So even if you hack the spinlock usage, there are still major issues
here.

We could conditionalize the timeout handling, but I don't think so
much complexity is worth it here.

Just do a udelay()/mdelay() or similar, instead of the timed sleeps.

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