Messages in this thread | | | Date | Sat, 3 Apr 2004 02:07:40 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] Fix kernel lockup in RTL-8169 gigabit ethernet driver |
| |
Francois Romieu <romieu@fr.zoreil.com> wrote: > > Adam Nielsen <a.nielsen@optushome.com.au> : > [...] > > in the Realtek 8169 gigabit ethernet driver. Due to a logic error, > > there is a loop in an interrupt handler that often goes infinite, thus > > locking up the entire computer. The attached patch fixes the problem. > > - until there is an explanation on _why_ this condition happens, this is a > band-aid for an unexplained condition, not a fix for a "logic error" (it > may have interesting performance effects though); >
The logic is faulty, or at least very odd.
tx_left = tp->cur_tx - dirty_tx;
while (tx_left > 0) { int entry = dirty_tx % NUM_TX_DESC;
if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) { ... } }
Why is that `if' test there at all? If it ever returns false, the box locks up. A BUG_ON(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit) might make more sense. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |