mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
pnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error
mirror->mirror_ds can be NULL if uninitialised, but can contain
a PTR_ERR() if call to GETDEVICEINFO failed.
Fixes: 65990d1afb ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET")
Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected] # 4.10+
This commit is contained in:
1 parent
d9aba2b40d
commit
8e04fdfadd
1 file changed
+1
-1
@@ -257,7 +257,7 @@ int ff_layout_track_ds_error(struct nfs4_flexfile_layout *flo,
|
||||
if (status == 0)
|
||||
return 0;
|
||||
|
||||
if (mirror->mirror_ds == NULL)
|
||||
if (IS_ERR_OR_NULL(mirror->mirror_ds))
|
||||
return -EINVAL;
|
||||
|
||||
dserr = kmalloc(sizeof(*dserr), gfp_flags);
|
||||
|
||||
Reference in new issue
Block a user