lkml.org 
[lkml]   [2007]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subject[PATCH 000 of 2] Fix some bugs with 'read' racing with 'truncate'
The following two patches fix a couple of bugs which trigger when read
races with truncate.

As there is no locking between read and truncate, we need to be
careful about sequencing. In some cases were aren't careful enough.

The first patch ensures that we check i_size *after* gaining a
reference to an uptodate page, thus ensuring that we don't unknowingly
returns NUL characters that are beyond the end of the file.

The second ensures that we don't deliver partial reads to more than
one sub-buffer in a readv call.

These bugs have been around for a while and are quite subtle, so I
don't think there is any rush for them to go into 2.6.22. Rather they
should sit in -mm at least until .23 opens up.

Thanks,
NeilBrown



[PATCH 001 of 2] Fix read/truncate race.
[PATCH 002 of 2] Make sure readv stops reading when it hits end-of-file.
-
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/

\
 
 \ /
  Last update: 2007-06-07 03:49    [W:0.050 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site