diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-12-02 10:59:59 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-12-02 11:24:14 -0500 |
commit | 032c09d76cdb448484859cc84dac4bba8f5f8f14 (patch) | |
tree | d6dded3df8c7240a17554b25ece04c9c766e21af /drivers/scsi/st.c | |
parent | 6bc733e9f71c937f3c64159bf1e569321726a44c (diff) |
[SCSI] sg and st unmap_user_pages allow PageReserved
2.6.15-rc1 made sg's st_unmap_user_pages and st's sgl_unmap_user_pages
BUG on a PageReserved page. But that's wrong: they could be unmapping
the ZERO_PAGE, which is marked PG_reserved; and perhaps others (while
get_user_pages is still permitted on VM_PFNMAP areas - that may change).
More change is needed here: sg claims to dirty even pages written from,
and st claims not to dirty even pages read into; and SetPageDirty is not
adequate for this nowadays. Fixes to those follow in a later patch: for
the moment just fix the 2.6.15 regression.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index b1056d290ae2..7ac6ea141fff 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4525,8 +4525,6 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p | |||
4525 | for (i=0; i < nr_pages; i++) { | 4525 | for (i=0; i < nr_pages; i++) { |
4526 | struct page *page = sgl[i].page; | 4526 | struct page *page = sgl[i].page; |
4527 | 4527 | ||
4528 | /* XXX: just for debug. Remove when PageReserved is removed */ | ||
4529 | BUG_ON(PageReserved(page)); | ||
4530 | if (dirtied) | 4528 | if (dirtied) |
4531 | SetPageDirty(page); | 4529 | SetPageDirty(page); |
4532 | /* FIXME: cache flush missing for rw==READ | 4530 | /* FIXME: cache flush missing for rw==READ |