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:	Tue, 23 Jan 2007 09:17:09 +0100
From:	Jarek Poplawski <jarkao2@...pl>
To:	Dale Farnsworth <dale@...nsworth.org>
Cc:	Thibaut VARENE <T-Bone@...isc-linux.org>, netdev@...r.kernel.org,
	mlachwani@...sta.com
Subject: Re: [PATCH] Re: kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069!

On Mon, Jan 22, 2007 at 10:06:16AM -0700, Dale Farnsworth wrote:
> Jarek and Thibaut,
> 
> Thank you both very much for your work finding and fixing this bug.
> Jarek, can you verify that the following patch fixes the problem you
> were seeing?
> 
> -Dale

Sorry, only Thibaut can verify this. I don't have
such card.

I can only confirm that your patch fixes unproper
locking of mp->tx_desc_count in the while condition.
But I'm not sure your way is optimal now because
mp->tx_desc_count is checked 2 times per every loop.
I think it is right only if you know the function
mv643xx_eth_free_tx_descs is called mostly while 
mp->tx_desc_count == 0 or 1.

> ----- Patch follows -----
> 
> From: Dale Farnsworth <dale@...nsworth.org>
> 
> mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
> 
> The bug was found and isolated by Thibaut VARENE <T-Bone@...isc-linux.org>
> and Jarek Poplawski <jarkao2@...pl>.  This patch is a modification of their
> fixes.  We acquire and release the lock for each descriptor that is freed
> to minimize the time the lock is held.
> 
> ---

From: Dale Farnsworth <dale@...nsworth.org>
 
mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
 
The bug was found and isolated by Thibaut VARENE <T-Bone@...isc-linux.org>
and Jarek Poplawski <jarkao2@...pl> noticed a locking problem.  This patch
is a modification of their fixes.  We acquire and release the lock for each
descriptor that is freed to minimize the time the lock is held.
 
---

I did small adjustment of my role here.

Regards,
Jarek P.
-
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