Subject: Re: [PATCH] Re: kernel BUG in eth_alloc_tx_desc_index at drivers/net/mv643xx_eth.c:1069!

From: Jarek Poplawski <[email-masked]>
Date: Mon, 22 Jan 2007 11:02:36 +0100

On Sun, Jan 21, 2007 at 02:02:15PM +0100, Thibaut VARENE wrote:
> On 1/21/07, Thibaut VARENE <[email-masked]> wrote:
...
> >Hmm, I think this is guaranteed not to work. In between those lines
> >the lock is released, while data in the mp structure is still being
> >accessed. It seems that this bit of code is indeed not race-safe
> >though, I'm gonna try to figure something.

I only changed the part I was quite sure is wrong. 
I didn't know the internals of this place but thought
probably somebody had some reasons to enable irqs here.

I hope the maintainers will decide the range of necessary
changes considering your testing and the patch.

> This was indeed the right spot. The attached raw hack seems to fix the
> bug (I couldn't crash the box so far).  I haven't checked that the
> same "situation" happens elsewhere in the code, I leave that as an
> exercise for the maintainers (or until I experience another kind of
> crash :)
> 
> The patch is a bit ugly (printk with irq disabled will not show, etc)
> but at least it does work. I'm sure somebody will figure something

Congratulations and regards,

Jarek P.