linux-brain/fs/nfs/filelayout
Dan Carpenter e411df81cd NFS: fix an incorrect limit in filelayout_decode_layout()
commit 769b01ea68b6c49dc3cde6adf7e53927dacbd3a8 upstream.

The "sizeof(struct nfs_fh)" is two bytes too large and could lead to
memory corruption.  It should be NFS_MAXFHSIZE because that's the size
of the ->data[] buffer.

I reversed the size of the arguments to put the variable on the left.

Fixes: 16b374ca43 ("NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-03 08:59:06 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
filelayout.c NFS: fix an incorrect limit in filelayout_decode_layout() 2021-06-03 08:59:06 +02:00
filelayout.h NFS store nfs4_deviceid in struct nfs4_filelayout_segment 2017-03-28 11:21:52 -04:00
filelayoutdev.c pNFS/flexfiles: never nfs4_mark_deviceid_unavailable 2017-03-17 16:07:17 -04:00