lkml.org 
[lkml]   [1999]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.144 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site