Re: [PATCH][RFC] truncate vs add_to_page_cache race
From: Nick Piggin
Date: Thu May 13 2004 - 22:21:10 EST
Andrew Morton wrote:
Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
OK, I made a debug patch to printk and schedule_timeout in this
race window so I can easily truncate the file. When this happens,
it turns out that the readpage thinks it is reading a hole and
fills the page with zeros -> invalid result?
A zero-filled pagecache page outside i_size is OK.
Yes. But in this case the zero filled page actually gets
read by read(2).
In any case, I think my patch won't close the race completely.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/