Messages in this thread | | | Date | Sat, 20 Mar 1999 12:26:32 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [patch] fix for buffer hash leakage |
| |
On Sat, 20 Mar 1999, Stephen C. Tweedie wrote: > > On Sat, 20 Mar 1999 11:59:30 +0100 (CET), Andrea Arcangeli > <andrea@e-mind.com> said: > > > Here the real fix that can be applyed with `patch`: > > Looks OK to me.
The patch looks fine, but I wonder..
I don't think we should move a buffer to the unused list without making damn sure that it doesn't have any IO active on it.
I'll apply it anyway, because it _is_ obviously cleaner (the old code was meant to handle the case where the buffer might still be shared with some MM mapping - something that can't happen any more), and I /think/ it's actually harmless even if we have some old active write to the buffer, but it still makes me worry.
Stephen, would you mind thinking about this for five minutes? I wonder if it shouldn't look something like this:
if (bh->b_count == 1) { forget(); } else { brelse(); }
to be truly safe. Comments?
Linus
- 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/
| |