]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 26 Feb 2019 16:19:46 +0000 (11:19 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 1 Mar 2019 21:20:16 +0000 (16:20 -0500)
commit5b89846426f6f24962a407173f3feac1a01b524e
tree5424da4ab5c98f6c7bc56894b49b55cd246033bd
parent5673188d7284848b41898bc2ce2aab8f0ca2f952
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()

If the attempt to instantiate the mirror's layout DS pointer failed,
then that pointer may hold a value of type ERR_PTR(), so we need
to check that before we dereference it.

Fixes: eae9c36784e47 ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/flexfilelayout/flexfilelayout.h