pNFS: Fix use after free issues in pnfs_do_read()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 25 Apr 2017 15:26:53 +0000 (11:26 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 25 Apr 2017 19:42:34 +0000 (15:42 -0400)
commit6aeafd05eca9bc8ab6b03d7e56d09ffd18190f44
tree4cdc02f84e2246efef3fe50dfb138e9cff9aeadd
parentb3230e80a6d115d2eb50fe3f4794ad04d84766de
pNFS: Fix use after free issues in pnfs_do_read()

The assumption should be that if the caller returns PNFS_ATTEMPTED, then hdr
has been consumed, and so we should not be testing hdr->task.tk_status.
If the caller returns PNFS_TRY_AGAIN, then we need to recoalesce and
free hdr.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.c