diff options
author | Fred Isaman | 2008-03-19 16:24:39 +0100 |
---|---|---|
committer | Trond Myklebust | 2008-03-19 22:59:02 +0100 |
commit | f8512ad0da16cbe156f3a7627971cdf0b39c4138 (patch) | |
tree | 2658c63faeda07505793ccc747ee4efbffdaa69c /drivers/ata/ahci.c | |
parent | Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/as... (diff) | |
download | kernel-qcow2-linux-f8512ad0da16cbe156f3a7627971cdf0b39c4138.tar.gz kernel-qcow2-linux-f8512ad0da16cbe156f3a7627971cdf0b39c4138.tar.xz kernel-qcow2-linux-f8512ad0da16cbe156f3a7627971cdf0b39c4138.zip |
nfs: don't ignore return value from nfs_pageio_add_request
Ignoring the return value from nfs_pageio_add_request can cause deadlocks.
In read path:
call nfs_pageio_add_request from readpage_async_filler
assume at this point that there are requests already in desc, that
can't be merged with the current request.
so nfs_pageio_doio is fired up to clear out desc.
assume something goes wrong in setting up the io, so desc->pg_error is set.
This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
request.
BUT, since return code is ignored, readpage_async_filler assumes it has
been added, and does nothing further, leaving page locked.
do_generic_mapping_read will eventually call lock_page, resulting in deadlock
In write path:
page is marked dirty by generic_perform_write
nfs_writepages is called
call nfs_pageio_add_request from nfs_page_async_flush
assume at this point that there are requests already in desc, that
can't be merged with the current request.
so nfs_pageio_doio is fired up to clear out desc.
assume something goes wrong in setting up the io, so desc->pg_error is set.
This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
request, yet marking the request as locked (PG_BUSY) and in writeback,
clearing dirty marks.
The next time a write is done to the page, deadlock will result as
nfs_write_end calls nfs_update_request
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'drivers/ata/ahci.c')
0 files changed, 0 insertions, 0 deletions