All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: Thibaut VARENE <T-Bone@parisc-linux.org>,
	netdev@vger.kernel.org, mlachwani@mvista.com
Subject: Re: [PATCH] Re: kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069!
Date: Tue, 23 Jan 2007 09:17:09 +0100	[thread overview]
Message-ID: <20070123081709.GA1925@ff.dom.local> (raw)
In-Reply-To: <20070122170615.GA15293@xyzzy.farnsworth.org>

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@farnsworth.org>
> 
> mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
> 
> The bug was found and isolated by Thibaut VARENE <T-Bone@parisc-linux.org>
> and Jarek Poplawski <jarkao2@o2.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@farnsworth.org>
 
mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
 
The bug was found and isolated by Thibaut VARENE <T-Bone@parisc-linux.org>
and Jarek Poplawski <jarkao2@o2.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.

  reply	other threads:[~2007-01-23  8:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 19:03 kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069! Thibaut VARENE
2007-01-09  9:26 ` Jarek Poplawski
2007-01-09 10:27   ` Thibaut VARENE
2007-01-09 10:52     ` Jarek Poplawski
2007-01-09 10:56       ` Thibaut VARENE
2007-01-09 11:48         ` Jarek Poplawski
2007-01-09 10:57     ` Jarek Poplawski
2007-01-09 13:02     ` Jarek Poplawski
2007-01-09 17:44       ` Thibaut VARENE
2007-01-09 20:05         ` Dale Farnsworth
2007-01-09 21:05           ` Thibaut VARENE
2007-01-10 17:12             ` Thibaut VARENE
2007-01-11 10:42               ` [PATCH] " Jarek Poplawski
2007-01-21 12:18                 ` Thibaut VARENE
2007-01-21 13:02                   ` Thibaut VARENE
2007-01-22 10:02                     ` Jarek Poplawski
2007-01-22 17:06                       ` Dale Farnsworth
2007-01-23  8:17                         ` Jarek Poplawski [this message]
2007-01-23 11:52                         ` Thibaut VARENE
2007-01-23 12:42                           ` Thibaut VARENE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070123081709.GA1925@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=T-Bone@parisc-linux.org \
    --cc=dale@farnsworth.org \
    --cc=mlachwani@mvista.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.