Re: Bug in buffer.c

David S. Miller (davem@redhat.com)
Mon, 21 Jun 1999 19:44:35 -0700


Date: Tue, 22 Jun 1999 01:46:45 +0200 (CEST)
From: Andrea Arcangeli <andrea@suse.de>

On Mon, 21 Jun 1999, Jeremy Katz wrote:

>kernel BUG at buffer.c:1236!

This seems to be a bug in the debugging code. We should remove all the
"owner" debugging code since it looks it can race. We end changing the
onwer field just to avoid UnlockPage to Oops, but changing it we allow the
irq handler to Oops.

Are you so sure??? The debugging statements there are descriptions of
invariants believed to be true by the programmer. Given that, you
should take a moment to show that the assertion is false.

I don't believe the debugging statement is wrong, and after days of
studying this new code here is my reasoning:

1) Only one async IO completion interrupt finishes the final buffer
head's I/O

2) The page is locked, therefore anyone else who legitimately wants to
get at the page and do something to it, must wait for the lock to
fall.

3) Nobody should attach themselves as the owner of the page until the
page is unlocked, therefore page->owner had better be -1 and
(because of #1) only _one_ interrupt thread of execution should
unlock and thus play with the owner setting.

I believe the debugging statement is correct, and that this assertion
is pointing out a real bug, please don't remove it until we resolve
this. Or even better, if you can, please show us how you believe the
assertion to be false. :-)

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/