OSDN Git Service

NFS: Fix a few constant_table array definitions
authorScott Mayhew <smayhew@redhat.com>
Thu, 2 Apr 2020 21:20:44 +0000 (17:20 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 2 Apr 2020 22:37:13 +0000 (18:37 -0400)
commit529af90576cfa44aa107e9876e2ebaa053983986
treeeeb5341e351a85d9664e3bb3ffedd0e58bc0e612
parented5d588fe47feef290f271022820e255d8371561
NFS: Fix a few constant_table array definitions

nfs_vers_tokens, nfs_xprt_protocol_tokens, and nfs_secflavor_tokens were
all missing an empty item at the end of the array, allowing
lookup_constant() to potentially walk off the end and trigger and oops.

Reported-by: Olga Kornievskaia <aglo@umich.edu>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Fixes: e38bb238ed8c ("NFS: Convert mount option parsing to use functionality from fs_parser.h")
Cc: stable@vger.kernel.org # v5.6
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/fs_context.c